Prepare NFS sharing for the Web image server

Source: Internet
Author: User
Preparing a Web image server and planning to share images with NFS on different machines. Take a note on NFS configuration and mounting to avoid forgetting that environment: the server and client are both Ubuntu10.04NFSServer: 192.168.1.105 $ sudoapt-getinstallnfs-kernel-server $ sudomkdir-p/export/user

Preparing a Web image server and planning to share images with NFS on different machines.

Take notes on NFS configuration and mounting to avoid forgetting:

Environment: both the server and client are Ubuntu 10.04

NFS Server:192.168.1.105

$ Sudo apt-get install nfs-kernel-server
$ Sudo mkdir-p/export/users
$ Mount -- bind/home/ubuntub // export/users
$ Sudo mount -- bind/home/ubuntub // export/users
$ Sudo vi/etc/fstab

/Home/ubuntub/export/users none bind 0 0


$ Sudo vi/etc/default/nfs-kernel-server

NEED_SVCGSSD = no

$ Sudo vi/etc/default/nfs-common


NEED_IDMAPD = yes
NEED_GSSD = no

$ Sudo vim/etc/idmapd. conf # Check it here. If so, you do not need to modify it.

[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup


$ Sudo vim/etc/exports

/Export 192.168.1.0/24 (rw, fsid = 0, insecure, no_subtree_check, async)
/Export/users 192.168.1.0/24 (rw, nohide, insecure, no_subtree_check, async)


$ Sudo/etc/init. d/nfs-kernel-server restart


NFS Client:

$ Sudo apt-get install nfs-common
$ Sudo vim/etc/default/nfs-common

NEED_IDMAPD = yes
NEED_GSSD = no


$ Sudo mount-o proto = tcp and port = 2049 192.168.1.105:/export/mnt
$ Cd/mnt/
$ Cd users/
$ Touch hi
$ Sudo vim/etc/fstab # There is a problem here, and there is no response to restart

192.168.1.105:/export/mnt nfs4 _ netdev, auto, 0, 0


Now go to the/mnt directory of the client and operate on the directory. You can see it immediately on the server.

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.