Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

MySQL Database Service Webinar - Installing WordPress in OCI with MDS

98 vues

Publié le

How to Install WordPress on OCI using MySQL Database Service

Publié dans : Technologie
  • Soyez le premier à commenter

MySQL Database Service Webinar - Installing WordPress in OCI with MDS

  1. 1. Fr�d�ric Descamps Community Manager MySQL September 2020 MySQL Webinar Series Installing WordPress on OCI with MySQL Database Service 1 / 83
  2. 2. 2 / 83
  3. 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. 4. Who am I ? about.me/lefred Copyright @ 2020 Oracle and/or its affiliates. 4 / 83
  5. 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. 6. What do we need ? Using OCI & MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 6 / 83
  7. 7. Requirements an Internet Connection Copyright @ 2020 Oracle and/or its affiliates. 7 / 83
  8. 8. Requirements an Internet Connection an OCI account Copyright @ 2020 Oracle and/or its affiliates. 8 / 83
  9. 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. 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. 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. 12. OCI Dashboard Copyright @ 2020 Oracle and/or its affiliates. 12 / 83
  13. 13. VCN Creation Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 13 / 83
  14. 14. VCN Copyright @ 2020 Oracle and/or its affiliates. 14 / 83
  15. 15. VCN (2) Copyright @ 2020 Oracle and/or its affiliates. 15 / 83
  16. 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. 17. VCN (4) Copyright @ 2020 Oracle and/or its affiliates. 17 / 83
  18. 18. VCN (5) Now we have: Copyright @ 2020 Oracle and/or its affiliates. 18 / 83
  19. 19. MDS Instance Creation Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 19 / 83
  20. 20. MDS Instance Creation Copyright @ 2020 Oracle and/or its affiliates. 20 / 83
  21. 21. MDS Instance Creation (2) Copyright @ 2020 Oracle and/or its affiliates. 21 / 83
  22. 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. 23. MDS Instance Creation (3) Copyright @ 2020 Oracle and/or its affiliates. 23 / 83
  24. 24. MDS Instance Creation (4) Copyright @ 2020 Oracle and/or its affiliates. 24 / 83
  25. 25. MDS Instance Creation (5) Copyright @ 2020 Oracle and/or its affiliates. 25 / 83
  26. 26. MDS Instance Details Copyright @ 2020 Oracle and/or its affiliates. 26 / 83
  27. 27. Wordpress Compute Instance Creation Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 27 / 83
  28. 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. 29. WordPress Instance Creation (2) Copyright @ 2020 Oracle and/or its affiliates. 29 / 83
  30. 30. WordPress Instance Creation (3) Copyright @ 2020 Oracle and/or its affiliates. 30 / 83
  31. 31. don't forget to add your ssh key ! ssh WordPress Instance Creation (4) Copyright @ 2020 Oracle and/or its affiliates. 31 / 83
  32. 32. WordPress Instance Creation (5) Copyright @ 2020 Oracle and/or its affiliates. 32 / 83
  33. 33. WordPress Instance: SSH Connection We can now connect to our compute instance: Copyright @ 2020 Oracle and/or its affiliates. 33 / 83
  34. 34. Intsalling Wordpress Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 34 / 83
  35. 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. 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. 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. 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. 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. 40. Security: Firewalls & SELinux Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 40 / 83
  41. 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. 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. 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. 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. 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. 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. 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. 48. Security: OCI Copyright @ 2020 Oracle and/or its affiliates. 48 / 83
  49. 49. Security: OCI (2) Copyright @ 2020 Oracle and/or its affiliates. 49 / 83
  50. 50. Security: OCI (3) - adding rules Copyright @ 2020 Oracle and/or its affiliates. 50 / 83
  51. 51. Security: OCI (4) - h p(s) access Copyright @ 2020 Oracle and/or its affiliates. 51 / 83
  52. 52. Security: OCI (5) - MySQL classic and X protocol Copyright @ 2020 Oracle and/or its affiliates. 52 / 83
  53. 53. Security: OCI (6) - adding security list to MDS Copyright @ 2020 Oracle and/or its affiliates. 53 / 83
  54. 54. Security: OCI (7) - adding security list to MDS Copyright @ 2020 Oracle and/or its affiliates. 54 / 83
  55. 55. WordPress database & user in MySQL Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 55 / 83
  56. 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. 57. [opc@mywordpress ~]$ mysqlsh --sql admin@10.0.1.9:3306 Database & user creation Copyright @ 2020 Oracle and/or its affiliates. 57 / 83
  58. 58. [opc@mywordpress ~]$ mysqlsh --sql admin@10.0.1.9:3306 Database & user creation Copyright @ 2020 Oracle and/or its affiliates. 58 / 83
  59. 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
  60. 60. Finishing WordPress Installation Copyright @ 2020 Oracle and/or its affiliates. 60 / 83
  61. 61. Finishing WordPress Installation (2) Copyright @ 2020 Oracle and/or its affiliates. 61 / 83
  62. 62. Finishing WordPress Installation (3) Copyright @ 2020 Oracle and/or its affiliates. 62 / 83
  63. 63. Finishing WordPress Installation (4) Copyright @ 2020 Oracle and/or its affiliates. 63 / 83
  64. 64. Finishing WordPress Installation (5) Copyright @ 2020 Oracle and/or its affiliates. 64 / 83
  65. 65. Finishing WordPress Installation (6) Copyright @ 2020 Oracle and/or its affiliates. 65 / 83
  66. 66. WordPress Login Copyright @ 2020 Oracle and/or its affiliates. 66 / 83
  67. 67. WordPress Dashboard Copyright @ 2020 Oracle and/or its affiliates. 67 / 83
  68. 68. WordPress Using MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 68 / 83
  69. 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. 70. What's next ? Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 70 / 83
  71. 71. Automate all this ! Copyright @ 2020 Oracle and/or its affiliates. 71 / 83
  72. 72. With OCI Resource Manager Copyright @ 2020 Oracle and/or its affiliates. 72 / 83
  73. 73. With OCI Resource Manager (2) Copyright @ 2020 Oracle and/or its affiliates. 73 / 83
  74. 74. With OCI Resource Manager - soon ! Copyright @ 2020 Oracle and/or its affiliates. 74 / 83
  75. 75. And more ? Installing Wordpress on OCI with MySQL Database Service Copyright @ 2020 Oracle and/or its affiliates. 75 / 83
  76. 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. 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. 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. 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
  80. 80. 80 / 83
  81. 81. 81 / 83
  82. 82. 82 / 83
  83. 83. 83 / 83

×