In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Configuration of 1.NFS server
1)。 Set the network connection mode of the network adapter of the virtual machine to bridge mode, as shown in the figure:
2)。 Execute the command # ifconfig to view active network device nodes. As shown in the figure:
You can see from the figure that the IP of eth0 is 192.168.1.103.
3)。 Execute the command in the virtual machine: # apt-get install nfs-kernel-server. As shown in the figure:
Then add / dianyu1 to the file (add the absolute path, / dianyu1 can be changed to another folder, which means you can do whatever you want with the file under this path after the mount is successful) to save the file. As shown in the figure:
When the file is saved, click on the terminal window and press "ctal+c" in the keyboard to exit the file editing.
5)。 Execute the command at the terminal: # / etc/init.d/nfs-kernel-server restart. As shown in the figure:
Configuration of 2.NFS client
1)。 Open the development board, and after opening it successfully, plug the network cable into the network card 1, set the IP address of the network card 1 in the hyperterminal to 192.168.1.123, and use the command # ifconfig eth0 192.168.1.123. As shown in the figure:
Root@dianyu:~# ifconfig eth0 192.168.1.123root@dianyu:~#br/ > root@dianyu:~#
Root@dianyu:~# ifconfig eth0
Eth0 Link encap:Ethernet HWaddr 0E:A1:0D:4F:55:F4
Inet addr:192.168.1.123 Bcast:192.168.1.255 Mask:255.255.255.0
Inet6 addr: fe80::ca1:dff:fe4f:55f4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2753 errors:0 dropped:0 overruns:0 frame:0
TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:1000
RX bytes:182584 (178.3 KiB) TX bytes:9164 (8.9 KiB)
To see if the client is connected to the server, use the command # ping NFS server address (according to the setting of the NFS server, you can know that the NFS IP is 192.168.1.103). As shown in the figure:
Root@dianyu:~# ping 192.168.1.103
PING 192.168.1.103 (192.168.1.103): 56 data bytes
64 bytes from 192.168.1.103: seq=0 ttl=64 time=2.662 ms
64 bytes from 192.168.1.103: seq=1 ttl=64 time=1.306 ms
64 bytes from 192.168.1.103: seq=2 ttl=64 time=1.263 ms
64 bytes from 192.168.1.103: seq=3 ttl=64 time=1.292 ms
64 bytes from 192.168.1.103: seq=4 ttl=64 time=1.294 ms
64 bytes from 192.168.1.103: seq=5 ttl=64 time=1.319 ms
64 bytes from 192.168.1.103: seq=6 ttl=64 time=1.261 ms
^ C
-192.168.1.103 ping statistics-
7 packets transmitted, 7 packets received, 0 packet loss
Round-trip min/avg/max = 1.261 msroot@dianyu:~#br/ 2.662 msroot@dianyu:~#br/ > root@dianyu:~#
2)。 After the connection test is successful, you can log in to the NFS server through NFS and transfer files
Lose. Use the mount command in the following format:
# mount-t nfs nfs-server-ip:nfs-share-directory / mountpoint-o nolock
For example
Root@dianyu:~# mount-t nfs 192.168.1.103:/dianyu1 / mnt-o nolockroot@dianyu:~#br/ > root@dianyu:~#
At this point, you can use the command # cd / mnt to view the files under the path of the dianyu1 mounted in / mnt on the other side of the NFS server. As shown in the figure:
Root@dianyu:~# cd / mnt/
Root@dianyu:/mnt# ls
Qt-everywhere-opensource-src-4.8.6 tslib
Qt-everywhere-opensource-src-4.8.6.tar.gz tslib-1.4.tar.gzroot@dianyu:/mnt#br/ > root@dianyu:/mnt#
Now that the NFS is mounted successfully, you can use the command to perform any operation on the file of the NFS server.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.