This is the second server I configured in Ubuntu. I feel much better about the configuration than the vsftpd server. For more information, see: configure the ftp server in Ubuntu at http://www.linuxidc.com/linux/2012-12/75233.htm.1to build the nfsserver NFS) developed by SUN and launched in 1984
This is the second server I configured in Ubuntu. It feels much better than the vsftpd server.
Configuration http://www.linuxidc.com/Linux/2012-12/75233.htm for ftp servers in Ubuntu
. 1. Set up an NFS server
Network FileSystem (NFS) was developed by SUN and launched in 1984. It is used to share files between different machines and operating systems over the Network. NFS was designed to be used between different systems. Therefore, its communication protocol design has nothing to do with hosts and operating systems.
NFS is divided into servers and clients. When using remote files, you only need to run the mount command to mount the file system on the remote NFS server to the local file system, the operation of remote files is no different from the operation of local files. The file or directory shared by the NFS server is recorded in the/etc/exports file.
NFS is often used in Embedded Linux development. The target system is usually used as an NFS client, and the Linux host is used as an NFS server. Mount the NFS shared directory of the server to a local directory through NFS on the target system to directly run files on the server. NFS is necessary to debug system driver modules and applications. In addition, Linux also supports the NFS root file system and can directly start the system from a remote NFS root, this is also necessary for cropping and integration of the embedded Linux root file system.
To install the nfs server in Ubuntu, follow these steps:
1. Install the NFS server and client:
# Sudo apt-get install nfs-kernel-server nfs-common portmap
The client can be installed on the local machine for testing.
2: configure the file on the host. After the above software is installed, there will be an exports file under the/etc directory (if not, you can create one by yourself)
Enter
Www.linuxidc.com @ linuxidc:/$ cd/etc
Www.linuxidc.com @ linuxidc:/etc $ sudo gedit exports
[Sudo] password for linuxidc:
#/Etc/exports: the access control list for filesystems which may be exported
# To NFS clients. See exports (5 ).
#
# Example for NFSv2 and NFSv3:
#/Srv/homes hostname1 (rw, sync, no_subtree_check) hostname2 (ro, sync, no_subtree_check)
#
# Example for NFSv4:
#/Srv/nfs4 gss/krb5i (rw, sync, fsid = 0, crossmnt, no_subtree_check)
#/Srv/nfs4/homes gss/krb5i (rw, sync, no_subtree_check)
#
/Home/linuxidc/NFS 172.18.71. * (rw, sync, no_root_squash)
The first/home/linuxidc/NFS is the directory you want to share
The second part 172.18.71. * refers to the directory that can be shared in this IP segment.
Part 3: The first parameter, rw: The write permission that can be erased; ro: the read-only permission
The second parameter: sync: data is synchronized to the memory and hard disk. async: data is temporarily written to the memory #.
The third parameter: no_root_aquash: the user who logs on to the NFS host and uses the shared directory. If it is root, for the shared directory,
It has the root permission. This project is very insecure, you know! Not recommended