In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to set up tftp and nfs server on Ubuntu system". In daily operation, I believe many people have doubts about how to set up tftp and nfs server on Ubuntu system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the questions of "how to set up tftp and nfs server on Ubuntu system". Next, please follow the editor to study!
Set up a tftp server
In the process of embedded linux development, you need to use tftp to download files from the Linux host to the board, so you need
To install the tftp server on the host linux system.
The method to install tftp server in Ubuntu-9.10 is as follows:
Installation program
Install tftp tftpd through software management, the former is the client and the latter is the service program. The system will be selected according to the dependency.
Openbsd-inetd . Enter the command under the terminal of Ubuntu as follows:
The code is as follows:
Sudo apt-get install tftp tftpd
Create a tftpboot under the root directory / directory and change the attribute to 777
The code is as follows:
Cd /
Sudo mkdir tftpboot
Sudo chmod 777 tftpboot
Modify the storage directory
The code is as follows:
Sudo vi / etc/inetd.conf
Tftp dgram udp wait nobody / usr/sbin/tcpd / usr/sbin/in.tftpd / tftpboot
Restart the service:
The code is as follows:
Sudo / etc/init.d/openbsd-inetd restart
Sudo in.tftpd-l / tftpboot
Test the tftp server
Create a new file under the / tftpboot folder
The code is as follows:
Cd / tftpboot
Touch test
Go to another folder
The code is as follows:
Tftp 127.0.0.1
Tftp > get test
Set up a nfs server
In the development of embedded linux, it is often necessary to use nfs to facilitate program debugging. With nfs, users can
The root file system to be used by the board is placed in the host directory, and the development board is mounted to this directory through Ethernet and this
The files in the directory are used as the contents of the root file system, so that the updated user's program is not as good as the root file system of the rewriting board.
The system can be reused, which can greatly speed up the debugging of the program.
The steps to install the nfs server under Ubuntu are as follows:
Install NFS server side and client side
The code is as follows:
Sudo apt-get install nfs-kernel-server nfs-common portmap
The purpose of installing the client is to test the NFS service locally.
Configure portmap
You can choose either of the two methods:
(1)
The code is as follows:
Sudo emacs / etc/default/portmap
Remove-I 127.0.0.1
(2)
The code is as follows:
Sudo dpkg-reconfigure portmap
Select "No" after running
It is also important to look at the current nfs and portmap using the sysv-rc-conf (not chkconfig) tool
If off, use sudo sysv-rc-conf portmap on or sudo sysv-rc-conf nfs-kernel-server on
open
Configure mount directories and permissions
The code is as follows:
Emacs / etc/exports
My configuration is as follows:
The code is as follows:
# / etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports (5).
#
# Example for NFSv2 and NFSv3:
# / srv/homes hostname1 (rw,sync) hostname2 (ro,sync)
#
# Example for NFSv4:
# / srv/nfs4 gss/krb5i (rw,sync,fsid=0,crossmnt)
# / srv/nfs4/homes gss/krb5i (rw,sync)
#
/ nfsboot * (rw,sync)
Explain:
# the rest is explanation.
/ nfsboot is a shared directory of NFS. * means that any IP can share this directory. You can change it to a restricted IP,rw.
Represents permissions, and sync is the default.
Update exports files
As long as you change / etc/exports, you cannot update this file through sudo exportfs-r
Restart the NFS service
The code is as follows:
Sudo / etc/init.d/portmap start
Sudo / etc/init.d/nfs-kernel-server restart restart nfs service
Conduct a test
Try mounting the local disk (my linux system IP is 202.198.137.18, mount / home/nfsboot to / mnt)
The code is as follows:
$sudo mount 202.198.137.18:/nfsboot / mnt
Run $df to see the result
The code is as follows:
$sudo umount / mnt
At this point, the study on "how to set up tftp and nfs server on Ubuntu system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.