页次: 1
nfs
[root@nfs ~]# wget https://cn.wordpress.org/wordpress-6.1.1-zh_CN.zip
-2023-05-29 14:17:56-- https://cn.wordpress.org/wordpress-6.1.1-zh_CN.zip
正在解析主机 cn.wordpress.org (cn.wordpress.org)... 198.143.164.252
正在连接 cn.wordpress.org (cn.wordpress.org)|198.143.164.252|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:25206808 (24M) [application/zip]
正在保存至: “wordpress-6.1.1-zh_CN.zip”
wordpress-6.1.1-zh_CN.zip 100%[=============================================>] 24.04M 3.71MB/s 用时 9.4s
2023-05-29 14:18:10 (2.55 MB/s) - 已保存 “wordpress-6.1.1-zh_CN.zip” [25206808/25206808])
[root@nfs ~]# ls -l
总用量 24628
-rw-------. 1 root root 1340 4月 10 19:50 anaconda-ks.cfg
drwxr-xr-x 5 root root 4096 12月 18 15:00 wordpress
-rw-r--r-- 1 root root 25206808 12月 18 15:00 wordpress-6.1.1-zh_CN.zip
[root@nfsserver ~]# mkdir -p /wordpress
[root@nfsserver ~]# chmod -R 777 /wordpress
[root@nfsserver ~]# vi /etc/exports
[root@nfsserver ~]# cat /etc/exports
[root@nfsserver ~]# systemctl restart rpcbind.service
[root@nfsserver ~]# systemctl restart nfs.service
[root@nfsserver ~]# systemctl enable rpcbind.service nfs.service
[root@nfsserver ~]# showmount -e 10.0.42.7
Export list for 10.0.42.7:
/wordpress 10.0.42.0/24
web
[root@webserver ~]# showmount -e 10.0.42.7
Export list for 10.0.16.7:
/wordpress 10.0.16.0/24
[root@webserver ~]# echo "10.0.16.7:/wordpress /var/www/html nfs defaults 0 0" >>
/etc/fstab
[root@webserver ~]# mount -a
[root@webserver ~]# df -hT | grep wordpress
10.0.16.7:/wordpress nfs4 294G 2.4G 277G 1% /var/www/html
[root@webserver ~]# cat /var/www/html/phpinfo.php
<?php
phpinfo();
?>
[root@webserver ~]# echo "servername www.lxx.com" >> /etc/httpd/conf/httpd.conf
[root@webserver ~]# vi /etc/httpd/conf/httpd.conf
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
[root@webserver ~]# httpd -t
Syntax OK
[root@nfsserver ~]# systemctl restart httpd.service php-fpm.service
[root@nfsserver ~]# systemctl enable httpd.service php-fpm.service
离线
/wordpress 10.0.0.0/24(rw,no_root_squash,no_all_squash)
离线
页次: 1