Debian#
Some notes from my Debian 5.0 (lenny) to 12.0 (bookworm) server experiences.
Releases#
https://www.debian.org/releases/
Number |
Codename |
---|---|
5 |
lenny |
6 |
squeeze |
7 |
wheezy |
8 |
jessie |
9 |
stretch |
10 |
buster |
11 |
bullseye |
12 |
bookworm |
Hostname#
Set hostname for IPv4 and IPv6 on loopback interface:
hostname=foo
domain=felixhummel.de
fqdn=$hostname.$domain
cat <<EOF > /etc/hosts
127.0.0.1 localhost
# fqdn first for "hostname -f"
127.0.1.1 $fqdn $hostname
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
EOF
echo $hostname > /etc/hostname
hostname -F /etc/hostname
exec $SHELL
hostname
hostname -f
python -c 'import socket; print socket.getfqdn()'
python3 -c 'import socket; print(socket.getfqdn())'
saltstack/salt#36619 “grains.fqdn value is difficult to rely on”
postfix and hostnames https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=214741#10
Git 1.9 on Debian Wheezy#
apt-get -t wheezy-backports install git
echo 'deb http://cloudfront.debian.net/debian wheezy-backports main' \
>> /etc/apt/sources.list
Debian Locale#
Error:
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.utf8"
are supported and installed on your system.
Fix (non-interactive):
export DEBIAN_FRONTEND=noninteractive
cp /etc/locale.gen /etc/locale.gen.bak
cat <<'EOF' > /etc/locale.gen
de_DE.UTF-8 UTF-8
en_US.UTF-8 UTF-8
EOF
dpkg-reconfigure locales
Add Another Locale#
E.g. for German UTF-8:
grep de_DE.UTF-8 /usr/share/i18n/SUPPORTED
echo "de_DE.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local
export DEBIAN_FRONTEND=noninteractive
dpkg-reconfigure locales
Python 2.6 On Debian Lenny#
http://www.saltycrane.com/blog/2008/10/installing-python-26-source-ubuntu-hardy/:
sudo apt-get --no-install-recommends install build-essential\
libncursesw5-dev\
libreadline5-dev\
libssl-dev\
libgdbm-dev\
libbz2-dev\
libc6-dev\
libsqlite3-dev\
tk-dev
wget http://www.python.org/ftp/python/2.6/Python-2.6.tgz
tar xzf Python-2.6.tgz
cd Python-2.6
./configure --prefix=/opt/python2.6
make
# ignore bsddb185 sunaudiodev
sudo make install
Exim 4 for outgoing Mail#
Set static FQDN by setting it as the first line in /etc/hosts
, e.g.:
127.0.0.1 mx1.example.org mx1