
Sudo vim /var/Add the following lines of markup to the page: Run the commands below once you've connected: CREATE DATABASE mydatabase ĬREATE USER identified by ‘ $word’ ĮXIT Step 4: Build Apache virtual host for your Websiteīuild a virtual host for your site using your chosen editor, as shown: sudo vim /etc/httpd/conf.d/ Run the following command to connect to MySQL: mysql -u root -pĮnter the root password you created earlier. You can now set up a database and a database user for our application. Re-enter new password: Re-enter New-root-password If you have a root password, enter it when prompted otherwise, press Enter and proceed to set a new root password as well as the other parameters mentioned below: Enter current password for root (enter for none): Just press Enter Run the following command to secure MySQL and set the root password: sudo mysql_secure_installation Start MariaDB after it has been installed, and set it to start automatically when the device is rebooted. sudo dnf -y install mariadb mariadb-server Install it on Oracle Linux 8 by running the command below. MySQL, which would be used to manage web application databases, is another module of LAMP. Step 3: MySQL server installation on Oracle Linux 8 The following should be the outcome of it: Make a file named info.php in the /var/Save the file with the following lines of code. sudo systemctl start php-fpmĬheck the status of php-fpm to make sure it's up and running. We'll need to start php-fpm and make it available at boot time. Instead of mod_php, Rhel 8 uses php-fpm by default. sudo dnf -y install php php-fpm php-mysqlnd php-opcache php-gd php-xml php-mbstring Please keep in mind that the command below will install php 7.2, which is presently available on Oracle Linux 8. Install the php modules mentioned as shown below. PHP is included in the Oracle Linux 8 official repository, much like httpd, making installation simple. Step 2: PHP installation on Oracle Linux 8 As shown, you will be able to access the Apache default page: sudo firewall-cmd -permanent -add-service=/tcpĬheck that the Apache Web Server was successfully installed using your browser. We'll configure our web application to run on port 80, so we'll need to open port 80 on the firewall. Start the httpd service and configure it to start when the device boots up. We'll use the dnf command to install it, as seen. Httpd is already available in Oracle Linux 8's official repository. In this blog, we'll look at the detailed steps on how to install MySQL, Apache, and PHP (the LAMP stack) on Oracle Linux 8. The backend programming language is PHP (Hypertext Pre-processor). The web server is Apache (httpd in Redhat operating systems), and MySQL is a database management system. The operating system used in this context is Linux. The open-source software frameworks Linux, Apache, MySQL, and PHP (LAMP) work together to create strong web applications.
