1. Environment Description NFS is short for NetworkFileSystem. It is used to share files between different machines and operating systems over the network. NFSserver can also be seen as a FILESERVER used to share files between UNIX-type systems. It can be easily mounted to a directory for convenient operations like local files. The NFS configuration idea is: File Server: Install the NFS component and RPCBIND component, and configure the export
1. Environment Description
NFS is short for Network File System. It is used to share files between different machines and operating systems over the Network. NFSserver can also be seen as a FILESERVER used to share files between UNIX-type systems. It can be easily mounted to a directory for convenient operations like local files.
The NFS configuration logic is as follows:
File Server: Install the NFS component and RPCBIND component, and configure the exports file;
Client: Install the NFS and RPCBIND components and mount the shared directory specified in the exports file.
The test environment in this article includes two virtual machines, both of which are installed with RedHat Enterprise Linux 6.1. The AGS-04 machine will be used to store the site configuration file and the main Server directory, and the AGS-03 machine will mount these shared directories.
Serial number |
Machine name |
IP |
Domain Name |
Role |
1 |
AGS-03 |
192.168.1.163 |
Gis. esricd |
NFS client |
2 |
AGS-04 |
192.168.1.164 |
Gis. esricd |
NFS server |
2 NFS component Installation
Note: When the author attempted to build an NFS file system, he encountered many problems. First, when installing the NFS component, there was a circular dependency. The two components were mutually dependent, no matter which one is installed, an error is reported. You must install another component first. The author crashes, and finally runs the yum command to install it so that yum can handle the annoying dependencies on its own.
In addition, after the installation configuration is complete on the AGS-04, and no matter how the AGS-03 can not mount the AGS-04 shared directory problem, always reported the following error:
I checked a lot of information and found many similar situations. The author tried one by one, but they could not solve the problem. Finally found that the lack of components, so the AGS-03 also installed NFS, a moment to solve the problem.
Therefore, the author suggests that you install NFS on both the file server and the client machine, which is less troublesome. In the future, each machine can also be used as a file server to facilitate expansion.
Okay, don't talk nonsense. Go to the topic. To install NFS components, you must first find these components. Just like installing the BIND component in the previous article, NFS-related components are also located in the Packages directory of the iso disc, copy the file to the temporary directory of the Linux machine, for example:
Similarly to the previous article, you also need to check the execution permissions of these files, so that you can directly grant 777 permissions.
Then run the yum command for installation, such:
An error occurred while installing the libevent component. The following message is displayed: The libevent component is missing. So to the disc, Packages directory to find, and indeed there is a libevent-1.4.13-1.el6.x86_64.rpm, copy to the directory just now, ensure that the execution permission, first install the component:
Run the yum command again to install the nfs component. The result is as follows:
This dependency check is passed and two packages are ready to be installed.
After the installation is complete, you can view the nfs service status and start the service:
Start the nfs service:
Now, the NFS component has been installed and the service can run properly. The next step is to install the RPCBIND component.