Virtual Machine UBUNTU14 Configure NFS server host win7 mount host in LAN

Source: Internet
Author: User
Tags dns2 nameserver

Host win7 system, System installed virtual machine UBUNTU14, LAN other host also for Win7 system, all to open the NFS client program, Win7 home version does not have this function, open the way as follows:



Because the corporate network is connected to a large switch with a static IP, the virtual machine bridging mode connection is described here, and the virtual machine bridge configuration is as follows:




Then set up the Ubuntu 14 network adapter:




Here the software setup is complete, now configure the static IP for Ubuntu 14:

The IP information for the host is as follows:

ip:10.19.155.100

netmask:255.255.255.0

gateway:10.19.155.254

dns1:10.16.5.88

dns2:10.16.6.88

LAN Internal testing Machine IP information:

ip:10.19.155.210

netmask:255.255.255.0

gateway:10.19.155.254

dns1:10.16.5.88

dns2:10.16.6.88

You will configure the IP information for Ubuntu 14:

ip:10.19.155.41

netmask:255.255.255.0

gateway:10.19.155.254

dns1:10.16.5.88

dns2:10.16.6.88


Before configuring IP information, make sure Ubuntu 14 has an NFS server program, the general automatic installation complete is not, with Apt-get install Nfs-kernel-server installed, and then installed Vim,apt-get install vim

You can use ifconfig eth0 to see the current IP

Then use ifconfig eth0 10.19.155.41 netmask 255.255.255.0来 set IP address and subnet mask

Use route add default GW 10.19.155.254来 set up the gateway

Then use vim/etc/resolv.conf to enter the file.

Add two sentences nameserver 10.16.5.88 and nameserver 10.16.6.88来 set two DNS, need to wrap between two sentences, finally ESC exits, save the exit file with: Wq

It is important to note that the IP address, subnet mask, and gateway are set temporarily, which is the initial value after the virtual machine restarts.

Want to permanently modify these three information need to modify the file with Vim/etc/network/interfaces to modify, enter after adding a statement:

Auto Eth0

Iface eth0 inet Static

Address 10.19.155.41

Gateway 10.19.155.254

Netmask 255.255.255.0

After you save the exit, you need to be aware that files need to be restarted after Ubuntu 14 is in effect, and after configuring the IP information, you can use ifconfig eth0 to view it.


Now start configuring Server for NFS on Ubuntu 14:

Use the Vim/etc/exports statement to enter the output editing document and add the following/home/hou 10.19.155.* (Rw,sync,no_subtree_check).

One of the first NFS servers to share the directory, 10.19.155.* as long as the IP address of this segment in 10.19.155 can be mounted on an NFS server on Ubuntu 14. Here are some common parameters:

RO read-only access

RW Read-Write access

Sync all data is written to share on request

Async NFS can respond to requests before writing data

Secure NFS is sent over a secured TCP/IP port below 1024

Insecure NFS is sent over 1024 ports

Wdelay If multiple users are writing to the NFS directory, the group is written to (default)

No_wdelay if more than one user wants to write to the NFS directory, it is written immediately and does not require this setting when using Async.

Hide does not share its subdirectories in the NFS shared directory

No_hide subdirectories for shared NFS directories

Subtree_check if you share a subdirectory such as/usr/bin, Force NFS to check the permissions of the parent directory (default)

No_subtree_check and above, do not check parent directory permissions

All_squash shared file UID and GID mapping anonymous user anonymous, suitable for common directories.

No_all_squash preserve the UID and GID of shared files (default)

Root_squash all requests from the root user are mapped to the same permissions as the anonymous user (default)

No_root_squas Root user has full administrative access to the root directory

Anonuid=xxx specifying the UID of an anonymous user in an NFS server/etc/passwd file

Anongid=xxx specify GID for anonymous users in NFS server/etc/passwd files


Save exit after configuration, restart the NFS server with/etc/init.d/nfs-kernel-server restart, and use NETSTAT-LT to view the Server for NFS startup:



On the host Win7, or open a command prompt on the LAN test machine, Mount 10.19.155.41:/home/hou X: To mount the NFS server for Ubuntu 14:




This allows NFS servers in Ubuntu to be synchronized through the NFS client.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Virtual Machine UBUNTU14 Configure NFS server host win7 mount host in LAN

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.