Thursday, February 2, 2023

How To Install Apache, MariaDB, PHP (LAMP) on Oracle Linux 9

 LAMP stands for Linux, Apache, MySQL, and PHP. Together, they provide a proven set of software for delivering high-performance web applications.
__________________________________________________________________________________________________________________________________
Server - Os:  Oracle Linux Server 9   64Bit      | IP -192.168.1.50        |Hostname - server.testbox.com
__________________________________________________________________________________________________________________________________
cat /etc/system-release ; sestatus ; dnf groupinstall "Development Tools" -y
dnf update -y
dnf install epel-release -y
dnf install php php-cli php-fpm php-gd php-mysqlnd php-json php-curl php-intl php-pdo php-mbstring php-dom php-xml unzip httpd mariadb-server httpd -y
systemctl start httpd mariadb ; systemctl enable httpd mariadb
mysql_secure_installation

chown --recursive  apache:apache /var/www/html/ ; chmod -R 777 /var/www/html/
nano /etc/httpd/conf.d/testbox.conf
<VirtualHost *:80>
    ServerName server.testbox.com
    DocumentRoot /var/www/html/
    <Directory /var/www/html/public>
        AllowOverride All
        Require all granted
    </Directory>
    RewriteEngine on
    CustomLog /var/log/httpd/testbox.access.log common
    ErrorLog  /var/log/httpd/testbox.error.log

</VirtualHost>

apachectl configtest
nano /etc/hosts
192.168.1.50    server.testbox.com
systemctl restart httpd
__________________________________________________________________________________________________________________________________






No comments:

Post a Comment