The deployment of WordPress blog system in different systems may be slightly different, but similar, so today to CentOS6 system as an example of WordPress blog system deployment.
Install the software first before deploying it, and use the following command after you have configured the software source:
Implemented in CentOS 7:
Yum install httpd php php-mysql mariadb-server
Implemented in CentOS 6:
Yum install httpd php php-mysql mysql-server
After installation, first restart the HTTPD service with the following command:
~]# Service httpd Restart
At this point we can access the Web page of this host, where you can test whether the installation is successful, such as the/var/www/html/folder is stored in the browser directly after the IP access to the URL, where the use of vim to create a named "text.php "File and then save and exit after writing the following content:
<?phpphpinfo ()?>
Then go back to Windows casually open a browser to enter the Linux system IP see the following interface is already configured on behalf of PHP:
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/06/5A/wKiom1m2pRTyuN8fAAHMhWKmnG8253.png-wh_500x0-wm_ 3-wmp_4-s_498930763.png "title=" Tim20170911225911.png "alt=" Wkiom1m2prtyun8faahmhwkmng8253.png-wh_50 "/>
Next, execute the following command to turn on the MySQL service:
Implemented in CentOS 6:
~]# Service mysqld Start
After MySQL is installed, you can use the MySQL command to enter MySQL, and then create a WordPress user, the method to create a user has the following:
CREATE USER ' wordpress ' @ ' localhost ' identified by ' 123456 ';
This method is to create a WordPress user, and then give it a password: 123456, but only in the local login. Can not connect remotely
CREATE USER 'wordpress' @ ' 172.16.%._ ' identified by ' 123456 ';
This method creates a user who can log on using a remote user, but only a user with a 172.16 field is allowed to log in, and the last field must be single digit
CREATE USER 'wordpress' @ '% ' identified by ' 123456 ';
This method allows any remote connection
CREATE USER 'wordpress' @ '% ' identified by ';
CREATE USER 'wordpress' @ '% ';
You can select a suitable method in the above methods to create a user using the following command:
mysql> create user ' wordpress ' @ ' localhost ' identified by ' 123456 ';mysql> CREATE database wordpress;mysql> Grant All privileges in wordpress.* to WordPress;
This way, MySQL configuration is complete, then you can use the following command to check whether WordPress is available (my native IP is 172.16.6.11, check the IP address of the machine that MySQL installed before you log in):
~]# mysql-u wordpress-p123456-h 172.16.6.11
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/A4/EC/wKioL1m0mwmymJCjAACoZsfd4ZE025.png-wh_500x0-wm_ 3-wmp_4-s_910744372.png "title=" Tim20170910095145.png "alt=" Wkiol1m0mwmymjcjaacozsfd4ze025.png-wh_50 "/>
As shown, here I use this command on another IP 172.16.128.1 host to connect to MySQL on the host with IP 172.16.6.11, and to be able to find the WordPress database, at this time the steps to build the database are complete.
Next need to download WordPress website, the following URL:
Https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz
To get this installation package after downloading:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/A4/EC/wKioL1m0nA2zouSYAAALQdYzTdY989.png-wh_500x0-wm_ 3-wmp_4-s_525272320.png "title=" Tim20170910095647.png "alt=" Wkiol1m0na2zousyaaalqdyztdy989.png-wh_50 "/>
If this software is downloaded in Windows, you need to use some FTP software to transfer the software to Linux.
If your Linux system can connect directly to the network, you can download it directly using the following command:
~]# wget-c https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz
After downloading, execute the following command to output the WordPress file to the/var/www/html/directory:
~]# TAR-ZXVF wordpress-4.8.1-zh_cn.tar.gz-c/var/www/html/
At this point, access the URL from the browser under Windows: http://172.16.6.11/wordpress/index.php can see the following screen:
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/A5/0B/wKioL1m2pgKxHIVwAAD38uXGLCc902.png-wh_500x0-wm_ 3-wmp_4-s_2167871390.png "title=" Tim20170911230354.png "alt=" Wkiol1m2pgkxhivwaad38uxglcc902.png-wh_50 "/>
This means that we have all the things installed, then we need to configure them, first copy a wordpress own configuration file, and modify its configuration information:
~]# cp/var/www/html/wordpress/wp-config-sample.php/var/www/html/wordpress/wp-config.php
~]# vim/var/www/html/wordpress/wp-config.php
Modify the configuration information in one of the three places you want to modify:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/06/5A/wKiom1m2p7uDekluAADEpZ9by4g386.png-wh_500x0-wm_ 3-wmp_4-s_3904510062.png "title=" Tim20170911231008.png "alt=" Wkiom1m2p7udekluaadepz9by4g386.png-wh_50 "/>
After saving the exit, go back to the page that you just opened in Windows and refresh the following to see:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/A5/0B/wKioL1m2qK7BhYyXAAD-CmEuKfM218.png-wh_500x0-wm_ 3-wmp_4-s_2334497839.png "title=" Tim20170911231523.png "alt=" Wkiol1m2qk7bhyyxaad-cmeukfm218.png-wh_50 "/>
Fill in the information in the inside and click Install:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/06/5A/wKiom1m2qVDTo8l7AACx8s7FcB4796.png-wh_500x0-wm_ 3-wmp_4-s_1619939589.png "title=" Tim20170911231658.png "alt=" Wkiom1m2qvdto8l7aacx8s7fcb4796.png-wh_50 "/>
After clicking on the installation after a while will jump to the landing page, enter the account number and password you just set to see the following page:
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/06/5A/wKiom1m2qeDSRKbgAAGphrNByy4780.png-wh_500x0-wm_ 3-wmp_4-s_3151202443.png "title=" Tim20170911231904.png "alt=" Wkiom1m2qedsrkbgaagphrnbyy4780.png-wh_50 "/>
To this, Mysql+php+wordpress blog system has been installed!
CentOS6 System Deployment Mysql+php+wordpress Blog System