Practice Requirements:
(CentOS 7) Two host A/b, where a host to build the lamp environment, B host as Server for NFS storage MARIADB data, and deploy Discuz to do testing, to achieve the database available.
A host: httpd2.4 PHP (Modular mode) Mariadb Nfs-utils
B Host: Nfs-utils Discuz
Ideas:
One, the solution B host for a host of MARIADB when the data directory problem (two directories of the genus owner must be a MySQL user, and the UID must be the same)
A host/mydata directory Mount B host NFS Service (/data directory)
① Each Create directory, b hosts edit/etc/exports files, write
/data 192.168. 1.102(Rw,root_squash)
② Execution:
# Exportfs-r
# Exportfs
③ Mount
# mount-t NFS 192.0.0.0:/data/mydata
④ try to start mariadb, if not start, according to the status of the log or mariadb to do the corresponding processing can
Second, in the B host deployment discuz, similar to the first step, respectively create the corresponding directory, mount it, modify the httpd configuration file point to this directory, and then create a database for Discuz and user authorization, the final effect:
NFS Practice Exercises