Debian
Keyboard layout configuration
Sample /etc/default/keyboard config:
XKBMODEL="pc104"
XKBLAYOUT="us,ru,fr"
XKBVARIANT=",phonetic,"
XKBOPTIONS="grp:lwin_toggle,grp:rwin_switch,grp_led:caps"
This config applies to both, console and X.
Building packages
Build custom kernel image
fakeroot make -j5 EXTRAVERSION=-salut KDEB_PKGVERSION=1 deb-pkg
Utilize X cores when building a package
export DEB_BUILD_OPTIONS="parallel=5"
systemd
Mount tmp on tmpfs
cp /usr/share/systemd/tmp.mount /etc/systemd/system/
systemctl enable tmp.mount
iptables
Allow connections from select ip address
# cat /etc/iptables/rules.v4
*filter
:INPUT DROP [942325:57526190]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [1363930378:213873202063]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -m comment --comment "Allow loopback connections" -j ACCEPT
-A INPUT -p icmp -m comment --comment "Allow Ping to work as expected" -j ACCEPT
-A INPUT -s xxx.xxx.xxx.xxx/32 -j ACCEPT
COMMIT
Don't forget to install iptables-persistent. Then
service netfilter-persistent save
can be used to save the rules.
swap
Adding swap file
Create the swapfile:
dd if=/dev/zero of=/var/swap bs=1024 count=524288
or
fallocate -l 1G /var/swap
and then
chown root:root /var/swap
chmod 0600 /var/swap
mkswap /var/swap
swapon /var/swap
echo "/var/swap none swap sw 0 0" >> /etc/fstab
swapon
Verify & fine-tune:
cat /proc/swaps
cat /proc/sys/vm/vfs_cache_pressure
sysctl -w vm.vfs_cache_pressure=50
echo "vm.vfs_cache_pressure = 50" >> /etc/sysctl.conf
cat /proc/sys/vm/swappiness
sysctl -w sysctl -w vm.vfs_cache_pressure=1
echo "vm.swappiness = 1" >> /etc/sysctl.conf
Repositories
Jessie backports archive
deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
Release specific notes
See also
Package management (APT)
Packaging python libraries
Custom packages