coffee_cn

博客园 首页 新随笔 联系 订阅 管理

 

【需求】
web应用需要部署在两台机器,图片目录共用,MySQL共用。

【环境】
Server: 192.168.168.10
Client: 192.168.168.20

【配置步骤】
1、在两台机器上安装nfs
#yum install nfs-utils rpcbind

2、在Server机器上执行如下命令
#vi /etc/exports
/website/test.com/gallery/ 192.168.168.20/32(rw,sync)

#chkconfig nfs on
#/etc/init.d/rpcbind start
#/etc/init.d/nfs start

3、在Client机器上执行如下命令
#showmount -e 192.168.168.10
#mount -t nfs 192.168.168.10:/website/test.com/gallery/ /website/test.com/gallery/

#vi /etc/rc.d/rc.local
mount -t nfs 192.168.168.10:/website/test.com/gallery/ /website/test.com/gallery/

posted on 2014-06-18 14:14  coffee  阅读(165)  评论(0编辑  收藏  举报