Linux file sharing

Source: Internet
Author: User

First, the service side settings

I am using virtual machine to simulate the virtual environment, the server, the client's operating system RHEL6.1

1, first determine whether to install NFS packet rpm-qa|grep nfs-utils command to view.
If not installed, the NFS package we are installing is: nfs-utils-1.2.2-7.el6.x86_64.rpm

2. Modify the NFS service configuration file/etc/export

Share represents the folder to be shared 192.168.1.0/24 means that all computers in the 1 segment are allowed access.
The RW in parentheses indicates that the read-write No_root_squash indicates that if the root user is logged in, it has root privileges and other parameters are not listed here.
Note: This network segment match cannot be used * as 192.168.1.* is wrong

3. Start the NFS service
and general server Start similar service NFS Start command

Such a simple NFS server is complete, and here's how to apply it.

Second, the client configuration

1, first also ensure that the client has installed the NFS-UTILS-1.2.2-7.EL6.X86_64.RPM package
2. List server shared directory

3. Mount the NFS shared directory on the client

The share directory is the directory where the service is shared Share1 is the local location to mount.

The share directory of the server can be accessed successfully on the mount.

In this way, a simple NFS server is complete.
Check the syntax, firewall settings, etc. when there is a problem in the installation.
I Caishuxueqian, if there is anything wrong in the place also please float over the experts to advise.


Develop the appropriate ports
-A input-m state--state new-m tcp-p TCP--dport 111-j ACCEPT
-A input-m state--state new-m udp-p UDP--dport 111-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 2049-j ACCEPT
-A input-m state--state new-m udp-p UDP--dport 2049-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 1011-j ACCEPT
-A input-m state--state new-m udp-p UDP--dport 1011-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 1012-j ACCEPT
-A input-m state--state new-m udp-p UDP--dport 1012-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 32768-j ACCEPT
-A input-m state--state new-m udp-p UDP--dport 32768-j ACCEPT

You also need to modify the file/etc/services
Mountd 1011/tcp #rpc. Mountd
Mountd 1011/udp #rpc. Mountd
Rquotad 1012/tcp #rpc. Rquotad
Rquotad 1012/udp #rpc. Rquotad

Linux file sharing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.