Requirements:
(1) NFS server Export/data/application/web, in the directory to provide WordPress;
(2) NFS Client Mounts NFS Server exported file system to/var/www/html;
(3) the client (lamp) to deploy WordPress, and let its normal access, to ensure that the normal post, upload pictures;
(4) Client 2 (lamp), Mount NFS server exported file system to/var/www/html, check that its WordPress can be accessed, to ensure that the normal post, upload pictures;
Steps:
1. Prepare two hosts, one host (172.16.10.17) to deploy lamp, and one host (172.16.10.77) as the NFS server-side shared file system
2. To deploy the installation lamp on the 172.16.10.17 host, refer to the procedure http://11650412.blog.51cto.com/11640412/1827559
3. Make NFS server-related configuration on the 172.16.10.77 host
1) Install the Nfs-utils package
Yum Install Nfs-utils
2) Add a file system that needs to be shared in the/etc/exports file
Vim/etc/exports
The contents are:
/data/application/web172.16.10.17 (RO)
3) Create a shared directory
Mkdir-pv/data/application/web
4) Unzip the downloaded WordPress package and copy it to the/data/application/web directory.
Tar XF wordpress.tar.gz
Cp-r Wordpress/data/application/web
5) Edit the WordPress configuration file, indicating the account, password, etc. used when logging in to MySQL
6) Start the NFS service
Systemctl Start Nfs.service
4. Mount the shared NFS file on the 172.16.10.17 host
Mount.nfs 172.16.10.77:/DATA/APPLICATION/WEB/VAR/WWW/HTML/VHOST/WWW2
5. Log in to your browser
This article from "11640412" blog, declined reprint!
Using NFS file system for WordPress