« Home | Pesan Saat Login dan Logout Ubuntu Server. » | Buat DHCP server on CentOS 5.0 » | Boot Loader raib.. » | instalasi SNORT di CentOS 5.0 » | Bukuku sayang Bukuku malang » | Petualangan Modern yang seru!! » | Rekorku yang pertama… » | Kehidupan Baruku... » | AC Milan menurutku.. » | Dapat CD Installer Slackware 12.. »

NFS Server 0n CentOS 5

Network File System (NFS) is a network file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a network as easily as if the network devices were attached to its local disks. NFS using at Linux/Unix network.

Setting of NFS server
1. Make new user for NFS access
[root@geek ~]# adduser share
[root@geek ~]# passwd share
Changing password for user share.
New UNIX password: //change new password
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password: //change again new password
passwd: all authentication tokens updated successfully.


2. Configuration exports file
[root@geek ~]# vim /etc/exports
/home/share 192.168.0.0/16(rw,sync,no_root_squash


3. Setting service portmap and nfs always on init.d script
[root@geek ~]# chkconfig portmap on
[root@geek ~]# chkconfig nfs on


4. Run portmap and nfs service
[root@geek ~]# service portmap start
Starting portmap: [ OK ]
[root@geek ~]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
Starting RPC idmapd: [ OK ]


Until here NFS server all ready. Next, make NFS client

Setting NFS Client On CentOS

1. Setting service portmap and nfs always on init.d script
[root@client ~]# chkconfig portmap on
[root@client ~]# chkconfig nfs on


2. Run portmap and nfs service
[root@client ~]# service portmap start
Starting portmap: [ OK ]
[root@client ~]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
Starting RPC idmapd: [ OK ]


3. Make directory /mnt/share then mount nfs server files
[root@client ~]# mkdir /mnt/share
[root@client ~]# mount -t nfs xeon3:/home/share /mnt/share


4. Check if /mnt/share have mounted.
[root@client ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 224G 18G 195G 9% /
tmpfs 1013M 0 1013M 0% /dev/shm
geek:/home/share
224G 20G 193G 10% /mnt/share


Automatic start NFS mount on client
1. Make a new file /etc/init.d/mount_nfs
[root@client ~]# vim /etc/init.d/mount_nfs
#!/bin/sh
#mount nfs
#ip 192.168.52.10 is NFS server on geek
mount -t nfs 192.168.52.10:/home/share /mnt/share


2. Change permission mount_nfs 755
[root@client ~]# chmod 755 /etc/init.d/mount_nfs

3. Make symbolic link to rc3.d directory
[root@client ~]# cd /etc/rc.d/rc3.d/
[root@client ~]# ln –s /etc/init.d/mount_nfs S99mount_nfs


4. Restart server then check /mnt/share
[root@client ~]# ls /mnt/share/
vxeon_template.2008-05-26
[root@client ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 224G 20G 193G 10% /
/dev/sda1 99M 16M 78M 17% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
192.168.52.10:/home/share
224G 23G 190G 11% /mnt/share


Enjoy it yaa…
You can call me if you have a problem with this reference.

nice info..thanks for share..:D

Post a Comment
Diambil dari http://blogger-templates.blogspot.com | editor: Mr Wevils