动静分离
1.创建NFS挂载点
mkdir /static
vim /etc/exports
/static 172.16.1.0/20(rw,sync,all_squash,anonuid=666,anongid=666)
systemctl restart nfs-server
chown -R www.www /static/
2.将静态资源放置于挂载点内
mkdir /opt/static/s
[root@web01 static]# cp -r /opt/bbs/static/* /opt/static/s/
3.挂载到lb
yum install nfs-utils -y
mount -t nfs 172.16.1.31:/static /opt/static/
4.测试

浙公网安备 33010602011771号