- Install tftpd and xinetd packages
- Create /etc/xinetd.d/tftp
- Create a tftp folder
- Restart the xinetd service
- Testing tftp server on Client site
Install tftpd and xinetd packages
At a terminal prompt, enter the following command to install dhcpd:
Create /etc/xinetd.d/tftp
Create /etc/xinetd.d/tftp and put this entry in it.
service tftp
{
protocol= udp
port= 69
socket_type = dgram
wait= yes
user= nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
Create a tftp folder
Create a folder /tftpboot and this folder should match whatever you gave in server_args above. mostly it will be tftpboot. And modify the authority of /tftpboot.
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot
Restart the xinetd service
or
sudo /etc/init.d/xinetd restart #for old systems
Testing tftp server on Client site
- Install tftp on client site
sudo apt-get install tftp
- Create a file named file.1 in /tftpboot path of the tftp server
cd /tftpboot
sudo dd if=/dev/sda2 of=file.1 bs=1 count=65280
- Obtain the ip address of the tftp server by ifconfig command. Example 192.168.1.1
- Link to tftp server and get file from tftp server.
tftp 192.168.1.2
tftp> get file.1
Received 1024 bytes in 0.0 seconds
tftp> quit
Jose’s Google+ profile
沒有留言:
張貼留言