NFS server set up under ubuntu

NFS server set up under ubuntu

     NFS is one of the most commonly used Internet system architecture of data storage services, NFS network file system generally used to store static resource sharing video, images, attachments, etc. (usually the site's users to upload files into an NFS share in, for example, picture BBS products, accessories, the first time) in our server commonly used in daily work, so how to set up NFS server is very important! how to build it? Then I'll give you one by one to explain:

1. Download and install software

#apt-get install nfs-kernel-server nfs-common portmap

2. Create nfs directory and unzip the file system (to rootfs.tar.bz2 file system as an example, the current directory is the root directory)

#mkdir nfs_rootfs

#tar -xvf rootfs.tar.bz2 -C /nfs_rootfs/

3. Modify the configuration file

#vim /etc/exports

Add the following configuration file:

/nfs_rootfs *(rw,sync,no_root_squash)

4. Restart profiles and services

#exportfs -rv

#/etc/init.d/portmap restart

#/etc/init.d/nfs-kernel-server restart

5. Verify nfs server, executing the following command to view the / mnt directory, you will see just unzip the file system

#mount -t nfs -o nolock 192.168.2.51:/nfs_rootfs / mnt Note: 192.168.2.51 IP host as an NFS server

#ls / mnt /

Description: mount command can be executed in another Linux system.

This is OK! Hope can be useful to you. Like a lot of attention to it!

Guess you like

Origin www.cnblogs.com/dianyu/p/11780714.html