Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure NFS Service for ubuntu12 under VMware Virtual Machine

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to configure NFS services in ubuntu12 under the VMware virtual machine, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

First, before configuring NFS, make sure that there are a few things:

1. The VMware virtual machine network connection is configured as bridging.

2. Ubuntu network connection is to obtain IP automatically.

3. Host, virtual machine and development board can communicate with each other by ping.

2. The problems that may be encountered during this period are as follows:

1. Ubuntu was previously set to static IP. After changing it back to dynamic automatic acquisition of IP, it was found that / etc/init.d/netwoking restart failed.

Resolve:

(1) modify / etc/network/interfaces correctly.

Before modification (once changed to static IP, if this step is not ignored):

Auto lo

Iface lo inet loopback

Auto eth0

Iface eth0 inet static # static IP

Address ip address

Netmask subnet mask

Gateway Gateway

Dns-nameservers Gateway (DNS)

After modification:

Auto lo

Iface lo inet loopback

Do not add the following:

Auto eth0

Iface eth0 inet dhcp # dynamic IP

(2) correct modification / etc/resolv.conf

After modification (changed to static IP, if this step is not ignored):

# Dynamic resolv.conf (5) file for glibc resolver (3) generated by resolvconf (8)

# DO NOT EDIT THIS FILE BY HAND-YOUR CHANGES WILL BE OVERWRITTEN

Nameserver Gateway

The gateway addresses of PS:/etc/network/interfaces and / etc/resolv.conf correspond.

(3) restart the service:

Sudo / etc/init.d/networking restart

Sudo / etc/init.d/resolvconf restart

(4) if you change these findings and still cannot get the IP normally, perform the following steps:

① enters the VMware virtual network editor, restores the default settings, waits for about one minute, selects the bridging mode, and bridges it to PCIe Family Controller. The screenshot is as follows:

② enters VMware, disconnects the network first, and then enables networking. The screenshot is as follows:

After checking the IP in the terminal ifconfig, you can find that the IP can be obtained normally.

2. Host, virtual machine and development board cannot communicate with each other by ping.

Resolve:

(1) there is no doubt that the host, virtual machine and development board IP are on the same network segment. In addition, if the network cable is connected through a switch, it is also necessary to ensure that they are on one switch, that is, the network cable of the host and the development board is drawn from the same network port of the same switch.

(2) if it is found that the host can ping the virtual machine and the development board, but the development board cannot ping the host and the virtual machine, please check whether the host firewall is turned off. The firewall shutdown method for win7 is as follows:

① opens the Control Panel.

② clicks "Windows Firewall".

③ Click "turn Windows Firewall on or off"

④ turns off the firewall.

The screenshot of shutting down the firewall is as follows:

After ubuntu can get IP correctly and ping each other, then you can configure nfs.

3. The installation steps are as follows:

1. Install the service in the virtual machine: sudo apt-get install nfs-kernel-server

2. Create a shared directory: sudo mkdir / home/nfsroot (take the establishment under the / home directory as an example)

3. Grant permissions: sudo chmod 777 / nfsroot

4. Modify the configuration file: sudo vim / etc/exports. Add the following at the end of the file:

5. Restart the service: sudo / etc/init.d/nfs-kernel-server restart

6. Test server: execute the instruction showmount-e under the shared directory, and you can view the following results:

PS: the representative can be mounted at any IP address.

7. Test the client and create files under the shared directory nfsroot:

Touch / nfsboot/testfile

Sudo mount 219.216..:/home/nfsboot / mnt

Ls / mnt

The file testfile is displayed, indicating that the mount was successful.

PS:219.216.. IP for the client (virtual machine).

8. Unmount the NFS file system to prepare for board mount: sudo umount 219.216..:/home/nfsboot / mnt

9. Create a mount directory in the development board and grant permissions:

Sudo mkdir / nfsroot

Sudo chmod 777 / nfsroot

10. Mount FNS:

Mount-t nfs-o nolock 219.216..:/home/nfsroot / nfsroot

PS:219.216.. IP for the client (virtual machine).

At this point, the NFS configuration is successful!

These are all the contents of the article "how to configure ubuntu12 Services under the VMware Virtual Machine". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report