Slackware Linux Post-installation

assuming network configuration is already done. secure SSHD for group wheel and reload

/etc/rc.d/rc.sshd restart

are you clean?

netstat -lntup

Essential Tasks

cp -pi /etc/profile /etc/profile.dist
vi /etc/profile

SYSTEM-WIDE PATH

PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/etc/rc.d:$HOME/bin:/usr/lib64/bcc:/usr/games"

and remove the user-specific part. then at the bottom

alias ll='ls -alhF'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias neta='netstat -antup'
alias netl='netstat -lntup'
alias clean="egrep -v '^[[:space:]]*(#|$)'"
j=$((`grep ^processor /proc/cpuinfo | tail -1 | awk '{print $3}'` + 1))

source /etc/profile

loose the too-many shell features

#mkdir ~/.trash/
#mv /etc/profile.d/modules.* ~/.trash/

LILO speedup (physical host)

cd /etc/
mv -i lilo.conf lilo.conf.dist
sed -r '/^[[:space:]]*(#|$)/d' lilo.conf.dist > lilo.conf
vi lilo.conf

lba32
...
#timeout = 1200
timeout = 50

lilo

can’t ask for /var/log/*/* because it would open too many files (/var/log/packages/*)

cd ~/
echo 'tail -n0 -F /var/log/*' > log
chmod +x log
./log

Miscellaneous

indexing,

updatedb

fixing defaults for git ($HOST short hostname is evaluated only if you have an FQDN, while $HOSTNAME always works)

#git config --global --replace-all core.pager more
git config --global core.pager "less -r"
echo $USER@$HOSTNAME
git config user.name "$USER"
git config user.email "$HOSTNAME"

doing some hardware checking,

grep '^model name' /proc/cpuinfo | uniq
grep ^proc /proc/cpuinfo
free -m
hdparm -I /dev/sda | grep 'Sector size'
hdparm -Tt /dev/sda | tee -a /var/tmp/hdparm.sda
#hdparm -Tt /dev/xvda | tee -a /var/tmp/hdparm.xvda
#hdparm -Tt /dev/xvda1 | tee -a /var/tmp/hdparm.xvda1

sync the hardware clock once

#ntpdate -u ntp.obspm.fr
ntpdate -u ru.pool.ntp.org

hwclock --utc --systohc

or eventually keep being in sync

Packages & System Upgrade

see packages

Third-parity Packages

grab & install the latest slackpkg+ release

cd ~/
wget http://slakfinder.org/slackpkg+/pkg/slackpkg+-1.7.0-noarch-10mt.txz
installpkg --terse slackpkg+-1.7.0-noarch-10mt.txz
cd /etc/slackpkg/
cp -pi slackpkgplus.conf slackpkgplus.conf.dist
vi slackpkgplus.conf

REPOPLUS=( slackpkgplus slackonly )

MIRRORPLUS['slackonly']=http://packages.slackonly.com/pub/packages/14.2-x86_64/

slackpkg update gpg
slackpkg update

System Tuning

Get rid of unnecessary log MARKs

cp -pi /etc/rc.d/rc.syslog /etc/rc.d/rc.syslog.dist
chmod -x /etc/rc.d/rc.syslog.dist
vi /etc/rc.d/rc.syslog

SYSLOGD_OPTIONS="-m0 "

/etc/rc.d/rc.syslog restart

Clean local daemons' shutdown

cat /etc/rc.d/rc.local_shutdown
cat > /etc/rc.d/rc.local_shutdown <<-EOF
#!/bin/bash
#nothing here yet
EOF
chmod +x /etc/rc.d/rc.local_shutdown

The two rc.local scripts are executable by default

ll /etc/rc.d/rc.local /etc/rc.local
ll /etc/rc.d/rc.local_shutdown /etc/rc.local_shutdown

ln -s rc.d/rc.local /etc/rc.local
ln -s rc.d/rc.local_shutdown /etc/rc.local_shutdown

cd /etc/rc.d/
find . -executable -type f | less
chmod -x rc.wireless rc.bluetooth rc.fuse rc.inetd

Note. keeping rc.udev because without it, I get this error when trying to SSH,

PTY allocation request failed on channel 0

Eventually deploy your latest built kernel and update LILO

assuming some NFS mount point

cp -f /data/kernels/vmlinuz /
cp -f /data/kernels/config /
cp -f /data/kernels/System.map /
tar xzf /data/kernels/lib.modules.5.2.14.slackxenreiser4.tar.gz -C /lib/modules/
grep depmod /etc/rc.d/rc.modules
ll -lF /etc/rc.d/rc.modules

ll /etc/lilo.conf_example
mv -i /etc/lilo.conf /etc/lilo.conf.dist
sed -r '/^[[:space:]]*(#|$)/d' /etc/lilo.conf.dist > /etc/lilo.conf
vi /etc/lilo.conf

lba32

timeout = 30

image = /vmlinuz
  root = /dev/sda1
  label = Linux
  read-only

Eventually make linux fast again, whatever boot-loader you are using, and disable IPv6 at once

  append = "noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off ipv6.disable=1"

lilo
shutdown -r now

and check after reboot

uname -r
cat /proc/cmdline

Virtual Terminals (for physical host, as those do not exist in a slackware guest. I find it convenient to see what happened lately on the console, and if you really want to hide it, just ^L before you ^D.

cd /etc
mv -i inittab inittab.dist
sed 's/agetty 38/agetty --noclear 38/' inittab.dist > inittab
diff -bu inittab.dist inittab

BSD Wannabe

KSH

vi /etc/profile

export ENV=/etc/shrc

further tune KSH and make it the default shell

chsh -s /bin/ksh root
useradd -D -s /bin/ksh

NVI

#/usr/sbin/slackpkg install db48 nvi
#ln -sf nvi /usr/bin/vi

Resources

slackware ยป beginners_guide https://docs.slackware.com/slackware:beginners_guide


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml