Wednesday, May 10, 2006

configuring debian

My check list when installing/configuring a new Debian system:

First a file manager:

apt-get install mc

Disable unneeded modules:

(For 2.6 kernels)

for m in eth1394 ax25 ipx appletalk netrom x25 rose decnet ; do echo "blacklist $m" >>/etc/modprobe.d/00-local ; done

To disable IPv6 which is mainly useless for now, and slows the system down in some cases, add "ipv6" to that list or

echo -e "blacklist ipv6" >>/etc/modprobe.d/00-local

(see http://www.debian-administration.org/articles/409 , http://beranger.org/index.php?article=1127 , http://beranger.org/index.php?article=2256)

You need to reboot for IPv6 to be disabled


PuTTY occasionally cannot logout
. This seems to fix it:
echo "shopt -s huponexit" >> /etc/bash.bashrc
(it's in the OpenSSH FAQ)
You may also need to add it to your existing configuration:
echo "shopt -s huponexit" >> ~/.bash_profile

The default bash history length is 500. I prefer more:
echo export HISTSIZE=2000 >> /etc/bash.bashrc

If hwclock -r gives you select() to /dev/rtc to wait for clock tick timed out
you need the --directisa parameter.
And you also want it used in the init scripts which call hwclock.
In Debian 4 (Etch):
# echo 'HWCLOCKPARS="--directisa"' >> /etc/default/rcS
In Debian 3 (Sarge) you need to edit /etc/init.d/hwclock.sh to add the parameter.

Small Intranet servers spend most of their time doing nothing. And I suppose that at 3+ GHz., they use lot of power for that. Maybe they would use less power when slowed down to a more reasonable speed. I took the following from the excellent Debian HOW-TO : CPU power management page:
#aptitude install cpufrequtils sysfsutils
#cat /proc/cpuinfo | grep "model name"
##adapt to your cpu:#modprobe p4_clockmod
#modprobe cpufreq_ondemand
#echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
##adapt to your cpu:#echo p4_clockmod >>/etc/modules
#echo cpufreq_ondemand >>/etc/modules
#echo devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand >>/etc/sysctl.conf

Postfix and SASL can be tricky to set up, but
Jimmy's weblog : Postfix and SASL (Debian) makes it a snap.

Labels: , , , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home