LAMP+NFS experiment to realize simultaneous use of WordPress to upload files

Source: Internet
Author: User
Tags mysql host install wordpress wordpress database

Two host computers

Install wordpress in directory/data/application/web for NFS server

Mount the NFS server/data/application/web in the NFS client/var/www/html directory

Implement two servers to use WordPress at the same time, and to complete uploading of articles and pictures

NFS Client: 172.16.34.1CentOS 7, Lamp and NFS installed

Server for NFS: 172.16.34.2CentOS 7, Lamp and NFS are installed, and Wordpress-4.5.3-zh_cn.zip will be downloaded into the directory/data/application/web.

Configuring the 172.16.34.2 httpd virtual host

[Email protected] html]# cd/etc/httpd/conf.d[[email protected] conf.d]# vim wp.conf<virtualhost *:80> Documentro Ot/data/application/web ServerName www.wp.com <directory "/data/application/web" > Options None Allo Woverride None Require All granted </Directory></VirtualHost>

Unzip the WordPress file

[Email protected] web]# cd/data/application/web[[email protected] web]# Unzipwordpress-4.5.3-zh_cn.zip

To modify an instance's configuration file to a formal profile

[Email protected] wordpress]# cpwp-config-sample.php wp-config.php

Editing a configuration file

[[email protected] wordpress]# vimwp-config.php//* * MySQL Settings-specific information from the host you are using * *///** the name of the WordPress database */define (' db_name ' , ' wpdb '); /** MySQL Database user name */define (' Db_user ', ' wpuser1 '); /** MySQL Database password */define (' Db_password ', ' wppass '); /** MySQL host */define (' Db_host ', ' 172.16.34.2 '); Add all files to the parent directory under "web/"

Create a WPDB database

MariaDB [(None)]> CREATE Database wpdb; Query OK, 1 row Affected (0.00 sec) MariaDB [(none)]> create user [email protected] ' 172.16.%.% ' identified by ' mppass '; Q Uery OK, 0 rows Affected (0.00 sec) MariaDB [(none)]> grant all on wpdb.* to "Wpuser" @ "172.16.%.%" identified by "Wppass "; Query OK, 0 rows Affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows Affected (0.00 sec)

Mount the directory on the client

[Email protected] ~]# mount-t nfs172.16.34.2:/data/application/web//var/www/html/

Access release validation

Server for NFS:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/84/75/wKioL1eQ2YfhpvyZAAMOB6RVZQo822.png "title=" 2.png " alt= "Wkiol1eq2yfhpvyzaamob6rvzqo822.png"/>

NFS Client

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/84/75/wKiom1eQ2aDC5e0ZAAIn31_2Llo177.png "title=" 3.png " alt= "Wkiom1eq2adc5e0zaain31_2llo177.png"/>

LAMP+NFS experiment to realize simultaneous use of WordPress to upload files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.