2015년 1월 27일 화요일

centos nfs server 설정 MacOSX client 설정

centos 7 서버
 
[root@dlp ~]#yum -y install nfs-utils
[root@dlp ~]#vi /etc/idmapd.conf
# line 5: uncomment and change to your domain name
Domain =server.world
 
[root@dlp ~]#vi /etc/exports 
 
# write settings for NFS exports
/home 10.0.0.0/24(rw,no_root_squash)
 
[root@dlp ~]#restart rpcbind
[root@dlp ~]#start nfs-server
[root@dlp ~]#start nfs-lock
[root@dlp ~]#start nfs-idmap
[root@dlp ~]#enable rpcbind
[root@dlp ~]#enable nfs-server
[root@dlp ~]#enable nfs-lock
[root@dlp ~]#enable nfs-idmap  
 
 클라이언트 마운트
리눅스에 마운트한다면 링크를 참조 http://www.server-world.info/en/note?os=CentOS_7&p=nfs&f=2
 
맥에 nfs를 마운트하기 위해서 간단한 명령어를 사용하면 가능하다.
 
sudo mount -t nfs -o resvport 서버아이피-호스트네임:/data /Users/폴더/

sudo diskutil unmount /Users/폴더/

하지만 centos 7이라면 방화벽을 오픈해야 정상적으로 동작한다.

firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p tcp --dport 2049 -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p udp --dport 2049 -j ACCEPT

firewall-cmd --permanent --zone=public --add-port=2049/tcp
firewall-cmd --permanent --zone=public --add-port=2049/udp

firewall-cmd --reload

난 방화벽이 필요없다면 이것이 답이다.

systemctl stop firewalld

댓글 없음:

댓글 쓰기