HuyPV
Thursday, December 22, 2011
# Data storage server: /home/nfs/storage
# IP: 10.10.10.87
vim /etc/exports
/home/nfs/storage 10.10.10.0/24(rw,sync)
==> export /home/nfs/storage directory for network 10.10.10.0 with netmask 255.255.255.0 with read write permissions and synchronized mode.
/etc/init.d/nfs restart
# Config ip tables
# vim /etc/sysconfig/iptables-config
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 32769 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 32769 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 32803 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 32803 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 662 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 662 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 892 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 892 -j ACCEPT
# Server 1:
# IP: 10.10.10.88
mkdir -p /srv/medias/storage
mount 10.10.10.87:/home/nfs/storage /srv/medias/storage
# Server 2:
# IP: 10.10.10.89
mkdir -p /srv/medias/storage
mount 10.10.10.87:/home/nfs/storage /srv/medias/storage
# auto mount on startup?
vim /etc/fstab
10.10.10.87:/home/nfs/storage /srv/medias/storage nfs defaults 0 0
Title:
Centos Configure NFS on Linux
Description:
# Data storage server: /home/nfs/storage # IP: 10.10.10.87 vim /etc/exports /home/nfs/storage 10.10.10.0/24(rw,sync) ==> export /ho...
...
Rating:
4