Selasa, 03 Maret 2009

NFS Server Repository

Server ( example : 192.168.100.1 )
1. redserver:~ # zypper in nfs-kernel-server yast2-nfs-server
2. yast > Network Services > NFS Server.
3. Choose Start (starting nfs service) and Open Port in Firewall, Next.
4. Add Directories to export.
5. Finish.
6. redserver:~ # cat /etc/exports
/opt/iso *(ro,root_squash,sync,no_subtree_check)

*Note :
- /opt/iso Directory.
- * Host or you can put with ip number.
- ro read only.
- root_squash root user on the client does not have full root privileges over the files on
the mounted share.
- sync sync means that the NFS server waits for local disk writes to complete, thus
minimizing the risk of data corruption if the server suddenly fails.
- no_subtree_check if only part of a volume is exported, a routine called subtree checking verifies that
a file that is requested from the client is in the appropriate part of the volume. If
the entire volume is exported, disabling this check will speed up transfers.

Client ( example : 192.168.100.6 )
1. Make sure portmap service is running
redarix:/home/syahal # rcportmap start
2. Show nfs server shared from 192.168.100.1 :
redarix:/home/syahal # showmount -e 192.168.100.1
Export list for 192.168.100.1:
/opt/iso *

3. Mounting nfs server 192.168.100.1
redarix:/home/syahal # mount -t nfs 192.168.100.1:/opt/iso/ /mnt/
4. Show mounting result.
redarix:/home/syahal # df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda5 ext3 7.9G 5.3G 2.3G 71% /
udev tmpfs 501M 176K 501M 1% /dev
/dev/sda7 ext3 46G 40G 3.9G 92% /data
/data/download/jakarta_map/Megapolitan.iso
iso9660 207M 207M 0 100% /data/program_files/jakarta
192.168.100.1:/opt/iso/
nfs 9.4G 8.0G 994M 90% /mnt

5. Try configure repository from yast
Yast > Softaware > Software Repositories > Add > NFS
Repository Name : update
Server Name : 192.168.100.1
Path to Directory or ISO Image : /opt/iso
Next.
6. Finish.

0 comments:

Posting Komentar