Install WordPress 5 In Oracle Linux 8.5 On A Virtual Machine
This tutorial presumes you have Oracle Linux 8.5 installed with Apache, MariaDB and php7.x. You need to be logged in to the server using Putty or equivalent as an administrator. During your server installation, you should have already installed nano and wget.
I highly recommend you create a new document in NotePad++ or your favorite text editor. Copy the commands found below into your new document where you can then make changes such as server name, user name etc. You can then copy and paste these lines of code one at a tine into Putty. This will give you a reliable document showing exactly how you created your WordPress installation. For this tutorial we will be using the domain 192.168.1.140/test/.
Now lets get started.
Check status of SELINUX
Disable SELINUX
Edit this line as shown.
Reboot.
Log back in using Putty and check the status of SELINUX.
SELinux status: disabled
Install WordPress.
With MariaDB installed and secured, it is time to create a database to accommodate WordPress files during & after the installation. Log in to the database server.
Now enter the root password.
MariaDB [(none)]>
Create a database for WordPress.
Next, create a user that will be associated with the WordPress database. Be sure to leave the single quotes in place.
Next, grant all permissions to the user on the database.
Finally, flush the privileges to save all the changes.
To exit from the database server, run EXIT.
To apply the changes, restart the MariaDB server by running the following command.
Disable SELINUX
Edit this line as shown.
Save the file and reboot.
Log back in using Putty and check the status of SELINUX.
With the WordPress database already created, proceed and download the WordPress tarball from WordPress repository as shown.
Next, extract the WordPress tarball file a shown. This unpacks the WordPress tarball to your /home directory and extracts the tarball into a folder labeled wordpress. This contains all the WordPress files that will be essential as we move along.
Move the ‘WordPress’ folder to the Webroot directory /var/www/html.
Change the directory name from wordpress to anything that identifies your domain.
At this point, you need to change permissions of the test folder to user ‘Apache’ .
Change file permissions as shown below. -R757 will allow your administrator to alter files.
Next, you need to create the upload directory manually.
We need to give the Apache webserver write permissions to the newly created uploads folder. This will enable Apache to create directories and files. You need to su to root to accomplish this.
Issue the command below.
Return to the administartor.
Navigate to the test directory.
Rename the wp-config-sample.php to wp-config.php as shown.
Open the newly renamed file using your favorite text editor. I will be using nano.
Fill out the database details accordingly as defined when creating the WordPress database. Be sure to leave the single quotes in place.
define( 'DB_USER', 'db_user' );
define( 'DB_PASSWORD', 'password' );
Save and exit the text editor. The final step is to complete the installation via a web browser. To do this, launch your web browser and enter your server’s IP address or domain name as shown below.
The first page will prompt you to select the language.
Click on your preferred language and hit the ‘Continue’ button.
In the next step, fill in the additional information required such as ‘Site Name’, ‘Username’ , ‘Password’, and ‘Email address’.
Once you’ve filled in all the required fields, click on ‘Install WordPress’.
If all went well, you will be directed to a “Success” page. Click the “Login” button to head to your login page.
Fill in your credentials to log in.
Click Log In and you will be in the WordPress Dashboard.