系统相关
首页 > 系统相关> > Linux之动静分离

Linux之动静分离

作者:互联网

创建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/

将静态资源放置于挂载点内

mkdir /opt/static/s
[root@web01 static]# cp -r /opt/bbs/static/* /opt/static/s/

挂载到lb01

yum install nfs-utils -y
mount -t nfs 172.16.1.31:/static /opt/static/

测试

 

标签:opt,www,动静,666,分离,挂载,static,Linux,nfs
来源: https://www.cnblogs.com/zhaoyuanshi/p/15781071.html