3. Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purpose only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied up in
making purchasing decisions. The development, release, timing and pricing of any features
or functionality described for Oracle´s product may change and remains at the sole
discretion of Oracle Corporation.
Copyright @ 2020 Oracle and/or its affiliates.
3 / 83
4. Who am I ?
about.me/lefred
Copyright @ 2020 Oracle and/or its affiliates.
4 / 83
9. Requirements
an Internet Connection
an OCI account
you can get a free trial on h ps://www.oracle.com/mysql/
Copyright @ 2020 Oracle and/or its affiliates.
9 / 83
10. Requirements
an Internet Connection
an OCI account
you can get a free trial on h ps://www.oracle.com/mysql/
Copyright @ 2020 Oracle and/or its affiliates.
10 /
83
11. Requirements
an Internet Connection
an OCI account
you can get a free trial on h ps://www.oracle.com/mysql/
Nothing else !
Copyright @ 2020 Oracle and/or its affiliates.
11 /
83
22. And we need to ll the next 3 screens from
the MySQL Instance creation wizard.
MDS Instance Creation (2)
Copyright @ 2020 Oracle and/or its affiliates.
22 /
83
27. Wordpress Compute Instance Creation
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
27 /
83
28. WordPress Instance Creation
Our WordPress server will be installed on a Compute Instance in the public subnet:
Copyright @ 2020 Oracle and/or its affiliates.
28 /
83
35. Installing WordPress: PHP 7.4
We start with the installation of PHP 7.4 from Remi's repo. PHP 7.4 fully supports all
authentication plugins of MySQL 8.0:
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-con g-manager --enable remi-php74
sudo yum install php php-cli php-mysqlnd php-zip php-gd
php-mcrypt php-mbstring php-xml php-json
Copyright @ 2020 Oracle and/or its affiliates.
35 /
83
36. Installing WordPress: PHP 7.4
We start with the installation of PHP 7.4 from Remi's repo. PHP 7.4 fully supports all
authentication plugins of MySQL 8.0:
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-con g-manager --enable remi-php74
sudo yum install php php-cli php-mysqlnd php-zip php-gd
php-mcrypt php-mbstring php-xml php-json
Let's verify if auth_plugin_caching_sha2_password is supported:
Copyright @ 2020 Oracle and/or its affiliates.
36 /
83
37. Installing WordPress: download & install
Now we will download WordPress and install it on the webroot:
[opc@mywordpress ~]$ cd /var/www/
[opc@mywordpress www]$ sudo wget https://wordpress.org/latest.tar.gz
Copyright @ 2020 Oracle and/or its affiliates.
37 /
83
38. Installing WordPress: download & install
Now we will download WordPress and install it on the webroot:
[opc@mywordpress ~]$ cd /var/www/
[opc@mywordpress www]$ sudo wget https://wordpress.org/latest.tar.gz
Unpack, rename the directory and change ownership:
[opc@mywordpress www]$ sudo tar zxvf latest.tar.gz
[opc@mywordpress www]$ sudo rm -rf html/ latest.tar.gz
[opc@mywordpress www]$ sudo mv wordpress html
[opc@mywordpress www]$ sudo chown apache. -R html
Copyright @ 2020 Oracle and/or its affiliates.
38 /
83
39. Installing WordPress: download & install
Now we will download WordPress and install it on the webroot:
[opc@mywordpress ~]$ cd /var/www/
[opc@mywordpress www]$ sudo wget https://wordpress.org/latest.tar.gz
Unpack, rename the directory and change ownership:
[opc@mywordpress www]$ sudo tar zxvf latest.tar.gz
[opc@mywordpress www]$ sudo rm -rf html/ latest.tar.gz
[opc@mywordpress www]$ sudo mv wordpress html
[opc@mywordpress www]$ sudo chown apache. -R html
And start Apache:
[opc@mywordpress www]$ sudo systemctl start httpd
[opc@mywordpress www]$ sudo systemctl enable httpd
Copyright @ 2020 Oracle and/or its affiliates.
39 /
83
40. Security: Firewalls & SELinux
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
40 /
83
41. Security
Security is a major concern for Oracle, therefore in OCI you need to deal a bit more with
security components than in other cloud providers.
In the WordPress compute instance we will need to:
allow connections to port 80 (and 443 if you use h ps)
Copyright @ 2020 Oracle and/or its affiliates.
41 /
83
42. Security
Security is a major concern for Oracle, therefore in OCI you need to deal a bit more with
security components than in other cloud providers.
In the WordPress compute instance we will need to:
allow connections to port 80 (and 443 if you use h ps)
allow Apache to connect to a remote database (SELinux)
Copyright @ 2020 Oracle and/or its affiliates.
42 /
83
43. Security
Security is a major concern for Oracle, therefore in OCI you need to deal a bit more with
security components than in other cloud providers.
In the WordPress compute instance we will need to:
allow connections to port 80 (and 443 if you use h ps)
allow Apache to connect to a remote database (SELinux)
allow Apache to write in WordPress folder.
Copyright @ 2020 Oracle and/or its affiliates.
43 /
83
44. Security
Security is a major concern for Oracle, therefore in OCI you need to deal a bit more with
security components than in other cloud providers.
In the WordPress compute instance we will need to:
allow connections to port 80 (and 443 if you use h ps)
allow Apache to connect to a remote database (SELinux)
allow Apache to write in WordPress folder.
And in OCI's dashboard we will need to:
allow connections from Internet to Public Subnet for h p (and h ps)
Copyright @ 2020 Oracle and/or its affiliates.
44 /
83
45. Security
Security is a major concern for Oracle, therefore in OCI you need to deal a bit more with
security components than in other cloud providers.
In the WordPress compute instance we will need to:
allow connections to port 80 (and 443 if you use h ps)
allow Apache to connect to a remote database (SELinux)
allow Apache to write in WordPress folder.
And in OCI's dashboard we will need to:
allow connections from Internet to Public Subnet for h p (and h ps)
allow connections from Public Subnet to Private Subnet for MySQL
Copyright @ 2020 Oracle and/or its affiliates.
45 /
83
51. Security: OCI (4) - h p(s) access
Copyright @ 2020 Oracle and/or its affiliates.
51 /
83
52. Security: OCI (5) - MySQL classic and X protocol
Copyright @ 2020 Oracle and/or its affiliates.
52 /
83
53. Security: OCI (6) - adding security list to MDS
Copyright @ 2020 Oracle and/or its affiliates.
53 /
83
54. Security: OCI (7) - adding security list to MDS
Copyright @ 2020 Oracle and/or its affiliates.
54 /
83
55. WordPress database & user in MySQL
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
55 /
83
56. Installing MySQL Shell
To create a database and a dedicated user for WordPress, we need to install a MySQL client
on the compute instance. We will use MySQL Shell:
[opc@mywordpress ~]$ sudo rpm -ivh
https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-8.0.21-1.el7.x86_64.rpm
Copyright @ 2020 Oracle and/or its affiliates.
56 /
83
57. [opc@mywordpress ~]$ mysqlsh --sql
admin@10.0.1.9:3306
Database & user creation
Copyright @ 2020 Oracle and/or its affiliates.
57 /
83
58. [opc@mywordpress ~]$ mysqlsh --sql
admin@10.0.1.9:3306
Database & user creation
Copyright @ 2020 Oracle and/or its affiliates.
58 /
83
59. [opc@mywordpress ~]$ mysqlsh --sql
admin@10.0.1.9:3306
Database & user creation
mysql-js> CREATE DATABASE wordpress;
mysql-js> CREATE USER wp IDENTIFIED BY 'MyComplic4tedPwd!';
mysql-js> GRANT ALL PRIVILEGES ON wordpress.* TO wp;
Copyright @ 2020 Oracle and/or its affiliates.
59 /
83
68. WordPress Using MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
68 /
83
69. WordPress is now installed, as DBA, you can relax and rely on
MySQL Database Service!
Time to Relax
Copyright @ 2020 Oracle and/or its affiliates.
69 /
83
70. What's next ?
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
70 /
83
71. Automate all this !
Copyright @ 2020 Oracle and/or its affiliates.
71 /
83
72. With OCI Resource Manager
Copyright @ 2020 Oracle and/or its affiliates.
72 /
83
73. With OCI Resource Manager (2)
Copyright @ 2020 Oracle and/or its affiliates.
73 /
83
74. With OCI Resource Manager - soon !
Copyright @ 2020 Oracle and/or its affiliates.
74 /
83
75. And more ?
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
75 /
83
77. Multiple WordPress & MDS Instances (2)
This architecture uses:
HyperDB for WordPress to split reads and writes
Copyright @ 2020 Oracle and/or its affiliates.
77 /
83
78. Multiple WordPress & MDS Instances (2)
This architecture uses:
HyperDB for WordPress to split reads and writes
MySQL Router
Copyright @ 2020 Oracle and/or its affiliates.
78 /
83
79. Multiple WordPress & MDS Instances (2)
This architecture uses:
HyperDB for WordPress to split reads and writes
MySQL Router
MDS Replication Channel
Copyright @ 2020 Oracle and/or its affiliates.
79 /
83