7 setting-up tftp server, 8 setting-up logrotate, Setting-up tftp server – Kontron AM4530 User Manual
Page 36: Setting-up logrotate

23
www.kontron.com
4.4.7
Setting-up TFTP Server
To setup a TFTP server, mount a hard disk folder to /tftpboot. Below is an example :
# mkdir /mnt/disk/
# mount /dev/sda1 /mnt/disk
# mount --bind /mnt/disk /tftpboot
Then start the inet daemon.
# /etc/init.d/inet-daemon start
Or use the following commands to make sure this is done automatically during boot.
# mkdir /mnt/disk/
# echo "/dev/sda1 /mnt/disk ext3 defaults 0 0" >> /etc/fstab
# echo "/mnt/disk /tftpboot none bind 0 0" >> /etc/fstab
To make a file available for downloading by a client, copy the file to the /tftpboot folder. To allow a client to
upload a file to the /tftpboot folder, create a file with the same name and with full write access in the /
tftpboot folder. Example (uploading 'test.txt' file):
# echo -n "" > /tftpboot/test.txt
# chmod w+a /tftpboot/test.txt
4.4.8
Setting-up Logrotate
If necessary, add a new log file and its logrotate parameters to the configuration file ('/etc/logrotate.conf').
Example :
/var/log/kern.log {
daily
create 0664 root root
size 50k
rotate 2
}
To modify the time period of executing 'logrotate', modify the cron configuration file ('/var/spool/cron/
crontabs/root'). The default period is 10 minutes :
*/10 * * * * logrotate /etc/logrotate.conf
To start the cron daemon, use the following command :
# /etc/init.d/cron-daemon start
Note:
The onboard Hard Disk must be used for file storage.