jeecg 分布式部署附件共享问题(linux下配置共享磁盘nfs服务)
生活随笔
收集整理的這篇文章主要介紹了
jeecg 分布式部署附件共享问题(linux下配置共享磁盘nfs服务)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
假設共享磁盤服務器192.168.1.100,目錄/opt/resource/,只允許192.168.1.*網段訪問。
修改/etc/exports文件,添加:/opt/resource 192.168.1.*(rw,async,no_root_squash)
執行:exportfs -a
修改/etc/sysconfig/nfs文件,將下列內容的注釋去掉:
RQUOTAD_PORT=875
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
重啟nfs服務:service nfs restart
防火墻配置增加:
#portmap
iptables -A INPUT -p tcp --dport 111 -j ACCEPT
iptables -A INPUT -p udp --dport 111 -j ACCEPT
#nfsd
iptables -A INPUT -p tcp --dport 2049 -j ACCEPT
iptables -A INPUT -p udp --dport 2049 -j ACCEPT
#rquotad
iptables -A INPUT -p tcp --dport 875 -j ACCEPT
iptables -A INPUT -p udp --dport 875 -j ACCEPT
#mountd
iptables -A INPUT -p tcp --dport 892 -j ACCEPT
iptables -A INPUT -p udp --dport 892 -j ACCEPT
#lockd
iptables -A INPUT -p tcp --dport 32803 -j ACCEPT
進行掛載:mount -t nfs 192.168.1.100:/opt/resource /opt/web/resource
服務器啟動自動掛載需修改/etc/fstab文件,添加如下內容:
192.168.1.100:/opt/resource? /opt/web/resource nfs? defaults? 0 0
修改/etc/exports文件,添加:/opt/resource 192.168.1.*(rw,async,no_root_squash)
執行:exportfs -a
修改/etc/sysconfig/nfs文件,將下列內容的注釋去掉:
RQUOTAD_PORT=875
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
重啟nfs服務:service nfs restart
防火墻配置增加:
#portmap
iptables -A INPUT -p tcp --dport 111 -j ACCEPT
iptables -A INPUT -p udp --dport 111 -j ACCEPT
#nfsd
iptables -A INPUT -p tcp --dport 2049 -j ACCEPT
iptables -A INPUT -p udp --dport 2049 -j ACCEPT
#rquotad
iptables -A INPUT -p tcp --dport 875 -j ACCEPT
iptables -A INPUT -p udp --dport 875 -j ACCEPT
#mountd
iptables -A INPUT -p tcp --dport 892 -j ACCEPT
iptables -A INPUT -p udp --dport 892 -j ACCEPT
#lockd
iptables -A INPUT -p tcp --dport 32803 -j ACCEPT
iptables -A INPUT -p udp --dport 32769 -j ACCEPT
進行掛載:mount -t nfs 192.168.1.100:/opt/resource /opt/web/resource
服務器啟動自動掛載需修改/etc/fstab文件,添加如下內容:
192.168.1.100:/opt/resource? /opt/web/resource nfs? defaults? 0 0
總結
以上是生活随笔為你收集整理的jeecg 分布式部署附件共享问题(linux下配置共享磁盘nfs服务)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: nyoj 478
- 下一篇: Linux服务器中木马(肉鸡)手工清除方