Install and Configure
Follow these steps to complete the installation and configuration.
Install Docker
SSH into the VM and run the following commands to install Docker:
sudo yum-config-manager --enable ol8_addons
sudo dnf install -y dnf-utils zip unzip
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce --nobest
sudo systemctl start docker
Proceed to the next topic and install MySQL.
Install MySQL
Run the following command to install and run MySQL:
sudo docker pull container-registry.oracle.com/mysql/community-server:8.0.33-aarch64
sudo docker run -e MYSQL_ROOT_PASSWORD=<password> -e MYSQL_USER=wp -e MYSQL_PASSWORD=<password> -e MYSQL_DATABASE=wordpress --name wordpressdb --restart on-failure -v
"$PWD/database":/var/lib/mysql -d container-registry.oracle.com/mysql/community-server:8.0.33-aarch64
Note:
- MYSQL_ROOT_PASSWORD - Enter the database password.
- MYSQL_DATABASE - Enter the database name as wordpress.
- MYSQL_USER - Enter the MySQL username.
- MYSQL_PASSWORD - Enter the MySQL password.
Proceed to the next topic and install WordPress.
Install WordPress
To install WordPress, follow this procedure:
Proceed to the next topic and create a load balancer for installing the SSL
certificate.
Create a load balancer and install the SSL certificate
You must create a load balancer and install the SSL certificate using this load balancer.
- Sign in to Oracle Cloud Infrastructure console with your Oracle Cloud credentials.
- In the left navigation pane, click Networking, then click Load Balancers, and then click Create Load Balancer.
- Select the Load Balancer option, and then click Create Load Balancer.
- Enter the Load Balancer Name.
- In the Choose Networking area, select the Virtual Cloud Network and Subnet, and then click Next.
- Click Add Backends, select the WordPress compute instance, and click Next.
- Enter the Listener Name.
- Complete these fields to handle HTTPS traffic:
- Select HTTPS as the listener type.
- Select 443 as the port your listener monitors for ingress traffic.
- In the SSL Certificate area, select Load Balancer Managed Certificate from the Certificate Resource drop-down list.
- Upload the SSL Certificate for your domain from the Certificate Authority.
- Select the Specify Private Key check box and upload the private key.
- Click Next.
- Select the required logging options.
- Click Save.
Copy the load balancer IP address and proceed to the next topic to update the DNS A
record for your domain to the load balancer IP address so it can access the WordPress
site hosted in OCI.
Update the DNS A record for your domain
You must update the DNS A record for your domain to the load balancer IP address so it can access the WordPress site hosted in OCI.
Note:
Use these steps as a reference as these steps might differ based on your domain hosting provider.- Go to the DNS Management page for your hosted domain.
- On the DNS Records page:
- Select the Type as A.
- Enter a Name.
- In the Value field, enter or paste the OCI load balancer IP address.
- Click Save.
The domain should now redirect you to the WordPress site hosted on Oracle Cloud
Free Tier.