HA专题: corosync+pacemaker实现nginx高可用
安装nginx# yum install nginx -y 注意: 需epel源
# ssh node2.anyisalin.com "yum install nginx -y "
# systemctl enable nginx #由于systemd的特性, 需将nginx设置开机自动启动
# ssh node2.anyisalin.com "systemctl enable nginx"
配置nfs
# mkdir /www/htdocs -pv
# echo "This is NFS on 172.16.1.4" > /www/htdocs/index.html #创建网页文件
# vim /etc/exports
/www/htdocs 172.16.1.0/24(ro)
# systemctl start rpcbind.service
# systemctl start nfs-server.service#启动nfs-server
测试nfs
# mount -t nfs 172.16.1.4:/www/htdocs /usr/share/nginx/html/#挂载成功
# df
Filesystem 1K-blocks Used Available Use% Mounted on
172.16.1.4:/www/htdocs 52403200 113433651268864 3% /usr/share/nginx/html
# umount /usr/share/nginx/html/
页:
[1]