Post-install Linux setup:
- Time NTP Sync
- Sendmail
- Edit /etc/rc.d/init.d/sendmail
Set daemon /usr/sbin/sendmail -bd -q1h to be daemon /usr/sbin/sendmail -q1h (Set sendmail to process queued messages, but not to listen to port 25 SMTP)
- Create a symlink so the sendmail daemon is started automatically
cd /etc/rc.d/rc3.d
ln -s ../init.d/sendmail S80sendmail
Start sendmail: ./S80sendmail start
- or Edit /etc/rc.d/init.d/sendmail
Set DAEMON=no
- shutdown beep
- Make linux beep as its rebooting or shutting down (very usefull when you're running your server without a monitor!) Modify your /etc/rc.d/init.d/halt file:
# Now halt or reboot.
echo -en "\a" > /dev/tty0
sleep 2
echo "$message"
[ -f /fastboot ] && echo "On the next boot fsck will be skipped."
echo -en "\a" > /dev/tty0
eval $command -i -d
- Disable Screen-blanking
- Add the following to your /etc/rc.d/rc.local file:
echo "Disable Screen Blanking"
setterm -blank 0
- LogRotate
- Uncomment #compress in /etc/logrotate.conf
- Add a section to the end of /etc/logrotate.conf for any other logs that should be rotated
/var/log/named {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
- inittab
- Add --noclear to the mingetty line in /etc/inittab
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty --noclear vc/1
- Install CURL
- Download from curl.sourceforge.net
- ./configure && make && make install
- Re-enable Ctl-Alt-Del
- Edit /etc/inittab
- Uncomment the line that starts with
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
- Restart init
kill -HUP 1
- Forward all server (root) mail to your admin account
- echo "sysadmin@MrZesty.net" > /root/.forward
- Install softdog (if not using heartbeat)
- http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/
- Add to /etc/rc.d/rc.local
echo "Starting softdog timer"
/sbin/softdog
- Kernel Panic Reboot
- Inside /etc/rc.d/rc.local
echo "Enabling Kernel Panic reboot"
echo "20" > /proc/sys/kernel/panic
- Update zlib to > 1.1.3 and OpenSSL to > 0.9.6d.
- Reiserfs:
- If you're using reiserfs (and no ext2 partions) you may want to touch /fastboot and remove any references to rm /fastboot from the startup scripts.
- Tripwire:
- Assuming tripwire is installed already as a package
/usr/sbin/twadmin --generate-keys -L /etc/tripwire/$HOSTNAME-local.key
/usr/sbin/twadmin --generate-keys -S /etc/tripwire/site.key
/usr/sbin/twadmin --create-cfgfile -S /etc/tripwire/site.key /etc/tripwire/twcfg.txt
- Create the /etc/tripwire/twpol.txt file [cp /usr/share/doc/packages/tripwire/twpol.txt /etc/tripwire/twpol.txt], then:
/usr/sbin/twadmin --create-polfile -S /etc/tripwire/site.key /etc/tripwire/twpol.txt
/usr/sbin/tripwire --init
- Fix any problems reported, then import your new (revised) policy
/usr/sbin/tripwire -m p -Z low /etc/tripwire/twpol.txt
- Generate a report, then update the database
/usr/sbin/tripwire --check
/usr/sbin/tripwire --update -r /var/lib/tripwire/report/$HOSTNAME-YYYYMMDD-HHMMSS.twr
- Schedule report in cron
1 1 * * 1,3,5 /usr/sbin/tripwire -m c 2>/dev/null | mail -s "`hostname -f`: Tripwire Report" root
- SHMFS
- /etc/fstab
shmfs /dev/shm shm defaults 0 0
Last modified: Wednesday, December 31 1969 @ 19:00 EST
© Ian Samuel, 2010
http://braindump.MrZesty.net
|