Setup NFS Server On FreeBSD
Network File System(NFS) is a network file system protocol developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a network on other networked Computer.
1. Setting up a FreeBSD NFS Server
In this how-to my testbox is running with FreeBSD with IP Address 192.168.1.117.
The first step to setting up a NFS server is to edit the /etc/rc.conf file and add the following lines:
nfs_server_enable="YES" nfs_server_flags="-u -t -n 4" rpcbind_enable="YES" mountd_flags="-r" mountd_enable="YES"
Next, you have to set up /etc/exports file to define which machines have permission to which folders.
/data1 -maproot=user1 host1 host2 host3 /data2 -alldirs host1 host2 host3 /data3 host2
In the above example,
The user1 of host1, host2 and host3 systems has been given privileges to the /data1 directory.
The /data2 and its sub-directories has been given read access to host1, host2 and host3 systems.
The /data3 has been read access to host2 system(make sure you replace hosts with your desired host names).
To start NFS on FreeBSD server, do:
1 rpcbind 2 nfsd -u -t -n 4 3 mountd -r
2. Restarting the NFS Server
Once you have made changes to the exports file you need to restart NFS for the changes to take effect:
1 kill -HUP `cat /var/run/mountd.pid`
3. Setup the FreeBSD NFS Client
You need to add the following lines to /etc/rc.conf.
nfs_client_enable="YES" nfs_client_flags="-n 4" rpc_lockd_enable="YES" rpc_statd_enable="YES"
4. Mounting NFS Shares
Mounting can be done like below:
# mount_nfs IP:/data1 /data1
5. Auto Mounting NFS Shares
NFS shares can be automatically mounted by editing /etc/fstab file.
server:/data1 /data1 nfs rw 2 2
6. Mount FreeBSD NFS Shares On Centos Clients
Install Some NFS tools and Libraries:
# yum install nfs-utils nfs-utils-lib
Mount and list the remote folder.
# mount -t nfs FreBSD-Unixmen:/data1 -o vers=3 /NFS # ls /NFS/ testx testy testz
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Install Fail2Ban On Ubuntu Server 13.04/13.10 : Introduction Fail2Ban is an intrusion prevention framework written in the Python programming l...0 comments |
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful : Running a business can be very stressful. You have to think about team collaboration, making sure th...0 comments |
- install Git in Ubuntu : Git is a distributed revision control system with an emphasis on speed. Git was initially designed a...0 comments |
- Install Crashplan backup tool in Linux : CashPlan is an automated backup solution that either uses the CrashPlan Central server or any other ...0 comments |
- Install Corosync and Pacemaker On CentOS 6.5 : I will show you in this tutorial how to install your first cluster Corosync and the Linux Cluster Ma...0 comments |
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
- Puppet agent Install Using Script
- Install Corosync and Pacemaker On CentOS 6.5
- Install Fail2Ban On Ubuntu Server 13.04/13.10
- How to surf using Tor Browser Bundle
- New Games got Greenlit on Linux by Steam Today!
- Linux Basics: Zypper Usage On openSUSE
- GNOME’s 3.12 supports Google Cloud Print
- How to enable 32-bit support for 64-bit Ubuntu 13.10 or greater
- How To Change Plank Dock Position in Elementary OS “Luna”
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .