SlideShare a Scribd company logo
Frédéric Descamps
Community Manager
MySQL
September 2020
MySQL Webinar Series
Installing WordPress on OCI with MySQL Database Service
1 / 83
2 / 83
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
Who am I ?
about.me/lefred
Copyright @ 2020 Oracle and/or its affiliates.
4 / 83
Frédéric Descamps
@lefred
MySQL Evangelist
Managing MySQL since 3.20
devops believer
living in Belgium
h ps://lefred.be
Copyright @ 2020 Oracle and/or its affiliates.
5 / 83
What do we need ?
Using OCI & MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
6 / 83
Requirements
an Internet Connection
Copyright @ 2020 Oracle and/or its affiliates.
7 / 83
Requirements
an Internet Connection
an OCI account
Copyright @ 2020 Oracle and/or its affiliates.
8 / 83
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
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
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
OCI Dashboard
Copyright @ 2020 Oracle and/or its affiliates.
12 /
83
VCN Creation
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
13 /
83
VCN
Copyright @ 2020 Oracle and/or its affiliates.
14 /
83
VCN (2)
Copyright @ 2020 Oracle and/or its affiliates.
15 /
83
VCN (3)
This is our network architecture:
VCN
10.0.0.0/16
MySQL Database Service Instance
WordPress
Private Subnet
10.0.1.0/24
Public Subnet
10.0.0.0/24
Copyright @ 2020 Oracle and/or its affiliates.
16 /
83
VCN (4)
Copyright @ 2020 Oracle and/or its affiliates.
17 /
83
VCN (5)
Now we have:
Copyright @ 2020 Oracle and/or its affiliates.
18 /
83
MDS Instance Creation
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
19 /
83
MDS Instance Creation
Copyright @ 2020 Oracle and/or its affiliates.
20 /
83
MDS Instance Creation (2)
Copyright @ 2020 Oracle and/or its affiliates.
21 /
83
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
MDS Instance Creation (3)
Copyright @ 2020 Oracle and/or its affiliates.
23 /
83
MDS Instance Creation (4)
Copyright @ 2020 Oracle and/or its affiliates.
24 /
83
MDS Instance Creation (5)
Copyright @ 2020 Oracle and/or its affiliates.
25 /
83
MDS Instance Details
Copyright @ 2020 Oracle and/or its affiliates.
26 /
83
Wordpress Compute Instance Creation
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
27 /
83
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
WordPress Instance Creation (2)
Copyright @ 2020 Oracle and/or its affiliates.
29 /
83
WordPress Instance Creation (3)
Copyright @ 2020 Oracle and/or its affiliates.
30 /
83
don't forget to add
your ssh key !
ssh
WordPress Instance Creation (4)
Copyright @ 2020 Oracle and/or its affiliates.
31 /
83
WordPress Instance Creation (5)
Copyright @ 2020 Oracle and/or its affiliates.
32 /
83
WordPress Instance: SSH Connection
We can now connect to our compute instance:
Copyright @ 2020 Oracle and/or its affiliates.
33 /
83
Intsalling Wordpress
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
34 /
83
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
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
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
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
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
Security: Firewalls & SELinux
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
40 /
83
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
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
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
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
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
[opc@mywordpress ~]$ sudo rewall-cmd --zone=public --permanent 
--add-port=80/tcp
success
[opc@mywordpress ~]$ sudo rewall-cmd --reload
success
Security: Compute Instance
Firewall
Copyright @ 2020 Oracle and/or its affiliates.
46 /
83
[opc@mywordpress ~]$ sudo rewall-cmd --zone=public --permanent 
--add-port=80/tcp
success
[opc@mywordpress ~]$ sudo rewall-cmd --reload
success
[opc@mywordpress ~]$ sudo chcon --type httpd_sys_rw_content_t /var/www/html/*
[opc@mywordpress ~]$ sudo setsebool -P httpd_can_network_connect_db 1
Security: Compute Instance
Firewall
 
SELinux
Copyright @ 2020 Oracle and/or its affiliates.
47 /
83
Security: OCI
Copyright @ 2020 Oracle and/or its affiliates.
48 /
83
Security: OCI (2)
Copyright @ 2020 Oracle and/or its affiliates.
49 /
83
Security: OCI (3) - adding rules
Copyright @ 2020 Oracle and/or its affiliates.
50 /
83
Security: OCI (4) - h p(s) access
Copyright @ 2020 Oracle and/or its affiliates.
51 /
83
Security: OCI (5) - MySQL classic and X protocol
Copyright @ 2020 Oracle and/or its affiliates.
52 /
83
Security: OCI (6) - adding security list to MDS
Copyright @ 2020 Oracle and/or its affiliates.
53 /
83
Security: OCI (7) - adding security list to MDS
Copyright @ 2020 Oracle and/or its affiliates.
54 /
83
WordPress database & user in MySQL
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
55 /
83
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
[opc@mywordpress ~]$ mysqlsh --sql 
admin@10.0.1.9:3306
Database & user creation
Copyright @ 2020 Oracle and/or its affiliates.
57 /
83
[opc@mywordpress ~]$ mysqlsh --sql 
admin@10.0.1.9:3306
Database & user creation
Copyright @ 2020 Oracle and/or its affiliates.
58 /
83
[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
Finishing WordPress Installation
Copyright @ 2020 Oracle and/or its affiliates.
60 /
83
Finishing WordPress Installation (2)
Copyright @ 2020 Oracle and/or its affiliates.
61 /
83
Finishing WordPress Installation (3)
Copyright @ 2020 Oracle and/or its affiliates.
62 /
83
Finishing WordPress Installation (4)
Copyright @ 2020 Oracle and/or its affiliates.
63 /
83
Finishing WordPress Installation (5)
Copyright @ 2020 Oracle and/or its affiliates.
64 /
83
Finishing WordPress Installation (6)
Copyright @ 2020 Oracle and/or its affiliates.
65 /
83
WordPress Login
Copyright @ 2020 Oracle and/or its affiliates.
66 /
83
WordPress Dashboard
Copyright @ 2020 Oracle and/or its affiliates.
67 /
83
WordPress Using MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
68 /
83
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
What's next ?
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
70 /
83
Automate all this !
Copyright @ 2020 Oracle and/or its affiliates.
71 /
83
With OCI Resource Manager
Copyright @ 2020 Oracle and/or its affiliates.
72 /
83
With OCI Resource Manager (2)
Copyright @ 2020 Oracle and/or its affiliates.
73 /
83
With OCI Resource Manager - soon !
Copyright @ 2020 Oracle and/or its affiliates.
74 /
83
And more ?
Installing Wordpress on OCI with MySQL Database Service
Copyright @ 2020 Oracle and/or its affiliates.
75 /
83
Multiple WordPress & MDS Instances
MySQL 2
WordPress 2
MySQL 1
WordPress 1
MySQL 3
WordPress 3
OCI Load Balancer
VCN
10.0.0.0/16
Public Subnet
10.0.0.0/24
Private Subnet
10.0.1.0/24
Private Subnet
10.0.1.0/24
Fault Domain 1
Fault Domain2
Fault Domain3
Replication
Replication
Copyright @ 2020 Oracle and/or its affiliates.
76 /
83
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
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
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
80 /
83
81 /
83
82 /
83
83 /
83

More Related Content

PDF
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
PDF
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
PDF
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
PDF
MySQL Shell - the best DBA tool !
PDF
How to operate MySQL InnoDB Cluster with MySQL Shell
PDF
MySQL Group Replication: Handling Network Glitches - Best Practices
PDF
MySQL Tech Café #8: MySQL 8.0 for Python Developers
PDF
MySQL InnoDB Cluster - Advanced Configuration & Operations
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL Shell - the best DBA tool !
How to operate MySQL InnoDB Cluster with MySQL Shell
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL InnoDB Cluster - Advanced Configuration & Operations

What's hot (20)

PDF
MySQL Shell: the best DBA tool !
PDF
Python and MySQL 8.0 Document Store
PDF
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
PDF
MySQL Shell - the best DBA tool ?
PDF
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
PDF
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
PDF
MySQL 8.0 : High Availability Solution for Everybody
PDF
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0
PDF
Looking Inside the MySQL 8.0 Document Store
PDF
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
PDF
the State of the Dolphin - October 2020
PDF
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
PDF
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
PDF
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
PDF
Hash join in MySQL 8
PDF
MySQL : State of the Dolphin May 2019
PDF
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
PDF
Deploying Magento on OCI with MDS
PDF
MySQL InnoDB Cluster and Group Replication in a Nutshell
PDF
MySQL 8.0 Document Store - how to mix NoSQL & SQL in MySQL 8.0
MySQL Shell: the best DBA tool !
Python and MySQL 8.0 Document Store
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
MySQL Shell - the best DBA tool ?
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
MySQL 8.0 : High Availability Solution for Everybody
preFOSDEM MySQL Day - Best Practices to Upgrade to MySQL 8.0
Looking Inside the MySQL 8.0 Document Store
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
the State of the Dolphin - October 2020
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Hash join in MySQL 8
MySQL : State of the Dolphin May 2019
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
Deploying Magento on OCI with MDS
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL 8.0 Document Store - how to mix NoSQL & SQL in MySQL 8.0
Ad

Similar to MySQL Database Service Webinar - Installing WordPress in OCI with MDS (20)

PDF
MySQL Database Service Webinar: Installing Drupal in oci with mds
PPTX
01 - Velociraptor Installation and Overview.pptx
PPTX
01 - Velociraptor Installation and Overview.pptx
PDF
Developing and Deploying PHP with Docker
ODT
Kioptrix 2014 5
PDF
How to become cloud backup provider with Cloudian HyperStore and CloudBerry L...
PDF
349916_EPM – Setup and Use of EPM Automate on OCI (Gen 2) Environments.pdf
PDF
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
PDF
Percona Live 2022 - MySQL Shell for Visual Studio Code
PDF
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
PDF
MySQL docker with demo by Ramana Yeruva
PDF
State of The Dolphin - May 2021
PPTX
Dockerizing WordPress
PDF
MySQL Proxy. A powerful, flexible MySQL toolbox.
PPTX
MuleSoft Meetup Vancouver 5th Virtual Event
PPTX
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
PPTX
Deploying R for Production - SRUG
PPTX
Dockerizing WordPress
PPTX
07 - Extending VQL and API in Velociraptor.pptx
PDF
CloudStack - Top 5 Technical Issues and Troubleshooting
MySQL Database Service Webinar: Installing Drupal in oci with mds
01 - Velociraptor Installation and Overview.pptx
01 - Velociraptor Installation and Overview.pptx
Developing and Deploying PHP with Docker
Kioptrix 2014 5
How to become cloud backup provider with Cloudian HyperStore and CloudBerry L...
349916_EPM – Setup and Use of EPM Automate on OCI (Gen 2) Environments.pdf
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
Percona Live 2022 - MySQL Shell for Visual Studio Code
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL docker with demo by Ramana Yeruva
State of The Dolphin - May 2021
Dockerizing WordPress
MySQL Proxy. A powerful, flexible MySQL toolbox.
MuleSoft Meetup Vancouver 5th Virtual Event
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Deploying R for Production - SRUG
Dockerizing WordPress
07 - Extending VQL and API in Velociraptor.pptx
CloudStack - Top 5 Technical Issues and Troubleshooting
Ad

More from Frederic Descamps (19)

PDF
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
PDF
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
PDF
RivieraJUG - MySQL Indexes and Histograms
PDF
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
PDF
MySQL User Group NL - MySQL 8
PDF
State of the Dolphin - May 2022
PDF
Percona Live 2022 - The Evolution of a MySQL Database System
PDF
Percona Live 2022 - MySQL Architectures
PDF
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
PDF
Open Source 101 2022 - MySQL Indexes and Histograms
PDF
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
PDF
Confoo 2022 - le cycle d'une instance MySQL
PDF
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
PDF
Les nouveautés de MySQL 8.0
PDF
Les nouveautés de MySQL 8.0
PDF
MySQL Shell for DBAs
PDF
MySQL Router REST API
PDF
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
PDF
MySQL 8.0 Document Store - Discovery of a New World
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
MySQL User Group NL - MySQL 8
State of the Dolphin - May 2022
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - MySQL Architectures
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
Open Source 101 2022 - MySQL Indexes and Histograms
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Confoo 2022 - le cycle d'une instance MySQL
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
MySQL Shell for DBAs
MySQL Router REST API
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
MySQL 8.0 Document Store - Discovery of a New World

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
cuic standard and advanced reporting.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
MYSQL Presentation for SQL database connectivity
The Rise and Fall of 3GPP – Time for a Sabbatical?
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Understanding_Digital_Forensics_Presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Modernizing your data center with Dell and AMD
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
cuic standard and advanced reporting.pdf
A Presentation on Artificial Intelligence
MYSQL Presentation for SQL database connectivity

MySQL Database Service Webinar - Installing WordPress in OCI with MDS

  • 1. Frédéric Descamps Community Manager MySQL September 2020 MySQL Webinar Series Installing WordPress on OCI with MySQL Database Service 1 / 83
  • 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
  • 5. Frédéric Descamps @lefred MySQL Evangelist Managing MySQL since 3.20 devops believer living in Belgium h ps://lefred.be Copyright @ 2020 Oracle and/or its affiliates. 5 / 83
  • 6. What do we need ? Using OCI & MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 6 / 83
  • 7. Requirements an Internet Connection Copyright @ 2020 Oracle and/or its affiliates. 7 / 83
  • 8. Requirements an Internet Connection an OCI account Copyright @ 2020 Oracle and/or its affiliates. 8 / 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
  • 12. OCI Dashboard Copyright @ 2020 Oracle and/or its affiliates. 12 / 83
  • 13. VCN Creation Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 13 / 83
  • 14. VCN Copyright @ 2020 Oracle and/or its affiliates. 14 / 83
  • 15. VCN (2) Copyright @ 2020 Oracle and/or its affiliates. 15 / 83
  • 16. VCN (3) This is our network architecture: VCN 10.0.0.0/16 MySQL Database Service Instance WordPress Private Subnet 10.0.1.0/24 Public Subnet 10.0.0.0/24 Copyright @ 2020 Oracle and/or its affiliates. 16 / 83
  • 17. VCN (4) Copyright @ 2020 Oracle and/or its affiliates. 17 / 83
  • 18. VCN (5) Now we have: Copyright @ 2020 Oracle and/or its affiliates. 18 / 83
  • 19. MDS Instance Creation Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 19 / 83
  • 20. MDS Instance Creation Copyright @ 2020 Oracle and/or its affiliates. 20 / 83
  • 21. MDS Instance Creation (2) Copyright @ 2020 Oracle and/or its affiliates. 21 / 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
  • 23. MDS Instance Creation (3) Copyright @ 2020 Oracle and/or its affiliates. 23 / 83
  • 24. MDS Instance Creation (4) Copyright @ 2020 Oracle and/or its affiliates. 24 / 83
  • 25. MDS Instance Creation (5) Copyright @ 2020 Oracle and/or its affiliates. 25 / 83
  • 26. MDS Instance Details Copyright @ 2020 Oracle and/or its affiliates. 26 / 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
  • 29. WordPress Instance Creation (2) Copyright @ 2020 Oracle and/or its affiliates. 29 / 83
  • 30. WordPress Instance Creation (3) Copyright @ 2020 Oracle and/or its affiliates. 30 / 83
  • 31. don't forget to add your ssh key ! ssh WordPress Instance Creation (4) Copyright @ 2020 Oracle and/or its affiliates. 31 / 83
  • 32. WordPress Instance Creation (5) Copyright @ 2020 Oracle and/or its affiliates. 32 / 83
  • 33. WordPress Instance: SSH Connection We can now connect to our compute instance: Copyright @ 2020 Oracle and/or its affiliates. 33 / 83
  • 34. Intsalling Wordpress Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 34 / 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
  • 46. [opc@mywordpress ~]$ sudo rewall-cmd --zone=public --permanent --add-port=80/tcp success [opc@mywordpress ~]$ sudo rewall-cmd --reload success Security: Compute Instance Firewall Copyright @ 2020 Oracle and/or its affiliates. 46 / 83
  • 47. [opc@mywordpress ~]$ sudo rewall-cmd --zone=public --permanent --add-port=80/tcp success [opc@mywordpress ~]$ sudo rewall-cmd --reload success [opc@mywordpress ~]$ sudo chcon --type httpd_sys_rw_content_t /var/www/html/* [opc@mywordpress ~]$ sudo setsebool -P httpd_can_network_connect_db 1 Security: Compute Instance Firewall   SELinux Copyright @ 2020 Oracle and/or its affiliates. 47 / 83
  • 48. Security: OCI Copyright @ 2020 Oracle and/or its affiliates. 48 / 83
  • 49. Security: OCI (2) Copyright @ 2020 Oracle and/or its affiliates. 49 / 83
  • 50. Security: OCI (3) - adding rules Copyright @ 2020 Oracle and/or its affiliates. 50 / 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 [email protected]:3306 Database & user creation Copyright @ 2020 Oracle and/or its affiliates. 57 / 83
  • 58. [opc@mywordpress ~]$ mysqlsh --sql [email protected]:3306 Database & user creation Copyright @ 2020 Oracle and/or its affiliates. 58 / 83
  • 59. [opc@mywordpress ~]$ mysqlsh --sql [email protected]: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
  • 60. Finishing WordPress Installation Copyright @ 2020 Oracle and/or its affiliates. 60 / 83
  • 61. Finishing WordPress Installation (2) Copyright @ 2020 Oracle and/or its affiliates. 61 / 83
  • 62. Finishing WordPress Installation (3) Copyright @ 2020 Oracle and/or its affiliates. 62 / 83
  • 63. Finishing WordPress Installation (4) Copyright @ 2020 Oracle and/or its affiliates. 63 / 83
  • 64. Finishing WordPress Installation (5) Copyright @ 2020 Oracle and/or its affiliates. 64 / 83
  • 65. Finishing WordPress Installation (6) Copyright @ 2020 Oracle and/or its affiliates. 65 / 83
  • 66. WordPress Login Copyright @ 2020 Oracle and/or its affiliates. 66 / 83
  • 67. WordPress Dashboard Copyright @ 2020 Oracle and/or its affiliates. 67 / 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
  • 76. Multiple WordPress & MDS Instances MySQL 2 WordPress 2 MySQL 1 WordPress 1 MySQL 3 WordPress 3 OCI Load Balancer VCN 10.0.0.0/16 Public Subnet 10.0.0.0/24 Private Subnet 10.0.1.0/24 Private Subnet 10.0.1.0/24 Fault Domain 1 Fault Domain2 Fault Domain3 Replication Replication Copyright @ 2020 Oracle and/or its affiliates. 76 / 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