Deployment requirements: (1) CentOS 73 separated from two hosts, one deployed httpd and PHP, the other deployed mariadb;
(2) Deploy two virtual hosts, one provides WordPress, one provides phpmyadmin;
(3) Provide HTTPS virtual host for phpMyAdmin;
Deployment process:
First, install httpd and PHP, PHP-MYSQ, Mariadb-server and open the service
Install the httpd and PHP services on the first host (web):
Install here using Yum:
Yum-y Install httpd PHP
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7F/AE/wKiom1cokPuSVhwZAAAhwS7ppZU751.png "title=" 1.png " alt= "Wkiom1cokpusvhwzaaahws7ppzu751.png"/>
Communication with MARIADB also needs to be installed Php-mysql
Yum-y Install Php-mysql
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/AE/wKiom1cokpehgVOtAAAR4YIqQKI946.png "title=" 1.png " alt= "Wkiom1cokpehgvotaaar4yiqqki946.png"/>
Install the Mariadb-server service on the second host (MARIADB):
Yum-y Install Mariadb-server
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7F/AE/wKiom1cok5fxaKMHAAAVa4N_L-U672.png "title=" 1.png " alt= "Wkiom1cok5fxakmhaaava4n_l-u672.png"/>
Open httpd and MARIADB services separately:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7F/AC/wKioL1colU_DYgyBAAAsRhqgeKk505.png "title=" 1.png " alt= "Wkiol1colu_dygybaaasrhqgekk505.png"/>
HTTPD service is turned on, port 80 is already in listening state;
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/AC/wKioL1colcOStlAvAAAaqnzaHDQ578.png "title=" 1.png " alt= "Wkiol1colcostlavaaaaqnzahdq578.png"/>
MARIADB service is turned on, Port 3306 is already in listening state;
Second, httpd Service and PHP status test:
vim/var/www/html/index.php
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/AE/wKiom1colwrCNX_UAAAICse3xSs631.png "title=" 1.png " alt= "Wkiom1colwrcnx_uaaaicse3xss631.png"/>
Browser testing:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/AC/wKioL1comDKShek0AACGNDOsw8I449.png "title=" 1.png " alt= "Wkiol1comdkshek0aacgndosw8i449.png"/>
Third, test mariadb and PHP connectivity
To add and authorize users in MARIADB:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/AC/wKioL1comjGCPKj4AABVNDbKkNc786.png "title=" 1.png " alt= "Wkiol1comjgcpkj4aabvndbkknc786.png"/>
Turn on MARIADB reverse parsing and restart the service:
Vim/etc/my.cnf.d/server.cnf
Added: Skip_name_resolve = On
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/AC/wKioL1comvvT8cLQAAANIJIqpmA764.png "title=" 1.png " alt= "Wkiol1comvvt8clqaaanijiqpma764.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/AE/wKiom1comnWQ6k5aAAAJ0qBOlM0727.png "title=" 1.png " alt= "Wkiom1comnwq6k5aaaaj0qbolm0727.png"/>
Test mariadb and PHP connectivity:
vim/var/www/html/index.php
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7F/AC/wKioL1conHTTg5bMAAAb08RtH_E220.png "title=" 1.png " alt= "Wkiol1conhttg5bmaaab08rth_e220.png"/>
To perform a browser test:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7F/AE/wKiom1cong-DLaOVAACItMJUAKI043.png "title=" 1.png " alt= "Wkiom1cong-dlaovaacitmjuaki043.png"/>
Connectivity success;
Iv. Add two virtual hosts
To add a wordpress virtual Host:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/AE/wKiom1con4Lz0svTAAAQI3abxRM199.png "title=" 1.png " alt= "Wkiom1con4lz0svtaaaqi3abxrm199.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/AC/wKioL1cooyaBoH_VAAAgHbSfdGk396.png "title=" 1.png " alt= "Wkiol1cooyaboh_vaaaghbsfdgk396.png"/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7F/AE/wKiom1coonCC-rFVAAAXg3QZqow578.png "title=" 1.png " alt= "Wkiom1cooncc-rfvaaaxg3qzqow578.png"/>
To add a phpmyadmin virtual host:
conf.d]# Vim vhost_pma.conf
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7F/AE/wKiom1copKHSV-qSAAAgVKLdPjw992.png "title=" 1.png " alt= "Wkiom1copkhsv-qsaaagvkldpjw992.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/AE/wKiom1copR6zbJFvAAAOvr_v0LE784.png "title=" 1.png " alt= "Wkiom1copr6zbjfvaaaovr_v0le784.png"/>
Test two virtual hosts:
Comment out the main configuration file/etc/httpd/conf/httpd.conf in Doucumenroot:
Vim/etc/httpd/conf/httpd.conf
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/AC/wKioL1cop7zzKyEjAAAP81TEttY457.png "title=" 1.png " alt= "Wkiol1cop7zzkyejaaap81tetty457.png"/>
Create a test page under each virtual host DocumentRoot directory:
vim/www/mywp.com/index.php
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/AF/wKiom1cop0_jLvkLAAAIj-oiHu4108.png "title=" 1.png " alt= "Wkiom1cop0_jlvklaaaij-oihu4108.png"/>
vim/www/mypma.com/index.php
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/AF/wKiom1cop7OAyLv9AAAI7uJL0p8625.png "title=" 1.png " alt= "Wkiom1cop7oaylv9aaai7ujl0p8625.png"/>
Browser Test: Note: You need to add the domain name resolution in the Hosts file of the test host;
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/AC/wKioL1coqUCgl9hhAAB0oy0Gww8254.png "title=" 1.png " alt= "Wkiol1coqucgl9hhaab0oy0gww8254.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/AF/wKiom1coqKbSBpFAAAB2pvTqj1w018.png "title=" 1.png " alt= "Wkiom1coqkbsbpfaaab2pvtqj1w018.png"/>
V. Add WordPress and phpMyAdmin databases and users on the MARIADB host and authorize
To create a database:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/AC/wKioL1coqwfRH4qEAAA6SVX9Ieo028.png "title=" 1.png " alt= "Wkiol1coqwfrh4qeaaa6svx9ieo028.png"/>
Create a user and authorize:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/AF/wKiom1corknDReMWAABVDYzwt0o847.png "title=" 1.png " alt= "Wkiom1corkndremwaabvdyzwt0o847.png"/>
Test the virtual host with MARIADB connectivity:
vim/www/mywp.com/index.php
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7F/AF/wKiom1covK7zAdC-AAAbq8pzu8w140.png "title=" 1.png " alt= "Wkiom1covk7zadc-aaabq8pzu8w140.png"/>
vim/www/mypma.com/index.php
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/AF/wKiom1covujj_KYOAAAb0tpHh88214.png "title=" 1.png " alt= "Wkiom1covujj_kyoaaab0tphh88214.png"/>
Browser testing:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/AD/wKioL1covbThkHAcAAB1hx2CoY0220.png "title=" 1.png " alt= "Wkiol1covbthkhacaab1hx2coy0220.png"/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/AD/wKioL1cov-PQsl-bAAB4VJdvElU749.png "title=" 1.png " alt= "Wkiol1cov-pqsl-baab4vjdvelu749.png"/>
vi. Provision of WordPress
Download the WordPress tarball and unzip it to the WordPress virtual machine DocumentRoot Directory:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/B9/wKiom1cqlwCA5K3XAAAZJG5ZM4o304.png "title=" 1.png " alt= "Wkiom1cqlwca5k3xaaazjg5zm4o304.png"/>
Create and edit a configuration file: wp-config.php
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7F/B9/wKiom1cql5jBLLP4AABOxULyA5Q838.png "title=" 1.png " alt= "Wkiom1cql5jbllp4aaboxulya5q838.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/B9/wKiom1cqmCzyMWY9AABfkaNlQBQ905.png "title=" 1.png " alt= "Wkiom1cqmczymwy9aabfkanlqbq905.png"/>
Browser test: Www.mywp.com/wordpress
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/B9/wKiom1cqmRvjeZJdAAB__XHu66s227.png "title=" 1.png " alt= "Wkiom1cqmrvjezjdaab__xhu66s227.png"/>
Successful creation, can begin to register to use;
Vii. provide phpMyAdmin, and provide it with HTTPS virtual host
1. Provide HTTPS virtual host:
To request a certificate from a CA:
To create a private key:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/BA/wKiom1cqneGwLy5rAAAfBZTwleg811.png "title=" 1.png " alt= "Wkiom1cqnegwly5raaafbztwleg811.png"/>
Create the request certificate file and issue the certificate to the CA host:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/B7/wKioL1cqoBTgzOckAACNqHtxNSA633.png "title=" 1.png " alt= "Wkiol1cqobtgzockaacnqhtxnsa633.png"/>
Request certificate file sent to CA host process with CA host self-signed process no longer demonstrated;
CA Host Signing Certificate:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/BA/wKiom1cqoJPzogoDAACS6UwOftg068.png "title=" 1.png " alt= "Wkiom1cqojpzogodaacs6uwoftg068.png"/>
Sign the successful, and send the signed certificate to the application host, no longer demonstrate;
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/B7/wKioL1cqogGgEAJsAAAHAA6mQFw520.png "title=" 1.png " alt= "Wkiol1cqogggeajsaaahaa6mqfw520.png"/>
Installing the SSL module: yum-y Install Mod_ssl
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/B7/wKioL1cqo5Px3N7HAAAMRqy4cgQ534.png "title=" 1.png " alt= "Wkiol1cqo5px3n7haaamrqy4cgq534.png"/>
Edit SSL configuration file: vim/etc/httpd/conf.d/ssl.conf
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7F/B8/wKioL1cqq6my7ULeAAAqKPiJUK8920.png "title=" 1.png " alt= "Wkiol1cqq6my7uleaaaqkpijuk8920.png"/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/BA/wKiom1cqpc6xPtsiAAA7ZA3s0Ao877.png "title=" 1.png " alt= "Wkiom1cqpc6xptsiaaa7za3s0ao877.png"/>
Browser testing:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7F/B8/wKioL1cqpzuS2QHCAACZK1sr-ow838.png "title=" 1.png " alt= "Wkiol1cqpzus2qhcaaczk1sr-ow838.png"/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7F/B8/wKioL1cqq__TPJVBAAB99Zf9KSc933.png "title=" 1.png " alt= "Wkiol1cqq__tpjvbaab99zf9ksc933.png"/>
2, provide phpMyAdmin
Download the phpMyAdmin compressed package and unzip it to the DocumentRoot directory of the SSL virtual host:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/BA/wKiom1cqrBuAB8OzAAAcWVZ7N9w287.png "title=" 1.png " alt= "Wkiom1cqrbuab8ozaaacwvz7n9w287.png"/>
To create and edit a configuration file:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/B8/wKioL1cqrcqSfCykAAA1N5LEkCA641.png "title=" 1.png " alt= "Wkiol1cqrcqsfcykaaa1n5lekca641.png"/>
To create a configuration file:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/BA/wKiom1cqr57zlgCGAADF50YNkcY288.png "title=" 1.png " alt= "Wkiom1cqr57zlgcgaadf50ynkcy288.png"/>
Generate a random code:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/B9/wKioL1cquK6wmf3VAAAMV3-9nDo850.png "title=" 1.png " alt= "Wkiol1cquk6wmf3vaaamv3-9ndo850.png"/>
Edit the configuration file, add the random code to the configuration file: $cfg [' Blowfish_secret ']= ' Random code ';
and MARIADB server address;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7F/BB/wKiom1cquCODvBdsAAAOgoDMOQQ143.png "title=" 1.png " alt= "Wkiom1cqucodvbdsaaaogodmoqq143.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/B9/wKioL1cquwyioDD2AAAHh22LnCo975.png "title=" 1.png " alt= "Wkiol1cquwyiodd2aaahh22lnco975.png"/>
Need to install character conversion package php-mbstring:yum-y install Php-mbstring
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/BB/wKiom1cqsmqCCZ6fAAAMqmw_RTI123.png "title=" 1.png " alt= "Wkiom1cqsmqccz6faaamqmw_rti123.png"/>
Browser testing:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/BB/wKiom1cqsrbwG8pQAAClgIuTtRw845.png "title=" 1.png " alt= "Wkiom1cqsrbwg8pqaaclgiuttrw845.png"/>
Log in with a previously authorized user name password:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/BB/wKiom1cqunyDg6rTAAC-4yAAnpA228.png "title=" 1.png " alt= "Wkiom1cqunydg6rtaac-4yaanpa228.png"/>
At this point, the entire deployment is complete!
Deploy lamp based on PHP module