|
Prerequisites: |
FreeBSD (Base + Autoconf, Automake, Bash and GCC) |
|
Overview: Setting up a tftpd (Trivial File Transfer Protocol Daemon) server on FreeBSD means creating a directory for user files, editing the inetd.conf and starting inetd |
|
tftpd – FreeBSD tftpd server for your network devices
# Download (Notes:
Users behind a Proxy
Server should read this and
users without Internet but have a CDRom read this.)
# Edit inetd.conf
vi /etc/inetd.conf
# Uncomment the tftp line and set or edit
the directory of your choice (-w means writable)
tftp dgram udp wait
root /usr/libexec/tftpd tftpd -l
-w
-s
/opt/tftp
# Create the directory as stated above
mkdir /opt/tftp
# Set the directory permissions
chmod a+r /opt/tftp
chmod a+w /opt/tftp
# Edit rc.conf
vi /etc/rc.conf
# Add a line to rc.conf
inetd_enable="YES"
# Start inetd
/usr/sbin/inetd
# Optional Testing
# Verify that inetd is running:
ps wwaux | grep inetd
# Local test
tftp 127.0.0.1
quit
|
tftpd
patch for FreeBSD 6.2 to fix the "-w" write issue |
|
# Run sysinstall and get the
source code for tftp, type: # Change to the tftp source
directory # Download the patch
file # Convert the patch to UNIX (Remove the DOS ^M
line breaks) # Patch the tftpd.c file using the
tftpdpatch.txt # Build and install the new binary # You may need to restart tftpd (or inetd) to take effect (next reboot will fix this too!) |