Centos6.4NFS installation and configuration

Source: Internet
Author: User
Installation: [root @ localhostetc] # rpm-qa | grepnfsnfs-utils-lib-1.1.5-6.el6.i686nfs4-acl-tools-0.3.3-6.el6.i686nfs-utils-1.2.3-36.el6.i686 [root @ localhostetc] # rpm-qa | greprpcbindrpcbind-0.2.0-11.el6.i6 installation:


[Root @ localhost etc] # rpm-qa | grep nfs
Nfs-utils-lib-1.1.5-6.el6.i686
Nfs4-acl-tools-0.3.3-6.el6.i686
Nfs-utils-1.2.3-36.el6.i686


[Root @ localhost etc] # rpm-qa | grep rpcbind
Rpcbind-0.2.0-11.el6.i686
[Root @ localhost etc] #


If the above two software are not installed, you can use yum for online installation.


Configuration:


Main configuration file:/etc/exports
[Root @ localhost/] # vi/etc/exports
/Tmp 192.168.0.0/24 (rw) // Share "/tmp" to the 192.168.0.0 CIDR block (readable ).
/Tmp 192.168.0.65 (rw, sync, no_root_squash) // Share "/tmp" with 192.168.0.65 (readable and writable, synchronous ).


[Root @ localhost etc] # service portmap restart
Stop portmap: [OK]
Start portmap: [OK]
[Root @ localhost etc] # service nfs restart // restart the service after the configuration is complete
Disable NFS mountd: [OK]
Disable the NFS daemon: [OK]
Disable NFS quotas: [OK]
Disable NFS: [failed]
Start the NFS service: [OK]
Disable NFS quota: [OK]
Start the NFS daemon: [OK]
Start NFS mountd: [OK]


[Root @ localhost etc] # showmount-e // view your shared services
Export list for localhost. localdomain:
/Tmp 192.168.0.0/24, localhost


[Root @ localhost tmp] # showmount-a // displays the directory information that has been connected to the client
All mount points on localhost. localdomain:
192.168.0.213:/tmp
======================================


Client connection:

# Showmount-e 192.168.0.248 // list available NFS
Export list for 192.168.0.248:
/Tmp 192.168.0.65, 192.168.0.213


# Mount 192.168.0.248:/tmp/mnt // mount the "/tmp" directory to "/mnt.


========================================================== ==========================================

NFS mounting error:

# Mount 192.168.0.70:/tmp/mnt/tmp

Mount: 1831-008 discard:

192.168.0.70:/tmp

Vmount: The operation is not allowed.

# Nfso-p-o nfs_use_reserved_ports = 1

Setting nfs_use_reserved_ports to 1

Setting nfs_use_reserved_ports to 1 in the nextboot file

# Mount 192.168.0.70:/tmp/mnt/tmp

# Ls/mnt/tmp


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.