设为首页 加入收藏

TOP

lvs+keepalived集群(八)
2023-07-23 13:36:27 】 浏览:126
Tags:lvs keepalived 集群
nbsp;  include fastcgi_params;

 
  

  }

 

[root@rs2 php-7.4.11]# systemctl restart nginx.service
[root@rs2 php-7.4.11]# 

 

2.5NFS服务器

  [root@nfs ~]# yum -y install nfs-utils


[root@nfs ~]# mkdir /code [root@nfs ~]# vim /etc/exports
/code * (rw)
[root@nfs
~]# chmod 777 /code/ [root@nfs ~]# systemctl start nfs-server.service

  客户端rs1rs2 挂载

yum -y install nfs-utils

systemctl restart nfs-server

yum -y install rpcbind

systemctl enable --now nfs-server rpcbind

showmount -e 192.168.26.105 测试

Export list for 192.168.26.105:

/code *                    #以上rs1,2都执行

[root@rs1 ~]# tar zcf xkf.tar.gz /usr/share/nginx/html/
tar: Removing leading `/' from member names
[root@rs1 ~]# ls
\  anaconda-ks.cfg  wordpress  wordpress-6.0.1-zh_CN.tar.gz  xkf.tar.gz
[root@rs1 ~]# scp xkf.tar.gz root@192.168.26.105:/root

[root@nfs ~]# tar xf xkf.tar.gz
[root@nfs ~]# cd usr/share/nginx/html/
[root@nfs html]# cd ..
[root@nfs nginx]# mv html/* /code
[root@nfs nginx]# ls /code/
404.html  img          nginx-logo.png   wp-admin              wp-config-sample.php  wp-links-opml.php  wp-settings.php
50x.html  index.html   poweredby.png    wp-blog-header.php    wp-content            wp-load.php        wp-signup.php
en-US     index.php    readme.html      wp-comments-post.php  wp-cron.php           wp-login.php       wp-trackback.php
icons     license.txt  wp-activate.php  wp-config.php         wp-includes           wp-mail.php        xmlrpc.php
[root@rs1 ~]# mount -t nfs 192.168.26.105:/code /usr/share/nginx/html/
[root@rs1 ~]# df -Th
192.168.26.105:/code    nfs4       40G  1.7G   39G   5% /usr/share/nginx/html

[root@rs2 php-7.4.11]# showmount -e 192.168.26.105
Export list for 192.168.26.105:
/code *
[root@rs2 php-7.4.11]# mount -t nfs 192.168.26.105:/code /usr/share/nginx/html/
[root@rs2 php-7.4.11]# df -Th
192.168.26.105:/code    nfs4       40G  1.7G   39G   5% /usr/share/nginx/htm

 最终实现

 

 

 

首页 上一页 5 6 7 8 下一页 尾页 8/8/8
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇centos 9 设置静态ip(带出错调试.. 下一篇在Windows系统的基础上安装Ubuntu..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目