Setting up Slackware Linux

do not forget the Y set

Warning

The required steps to proceed with change slightly depending on your scenario:

In the first case, eventually enable ssh root password auth temporarily just to push operator’s public keys there.

Installation (physical host)

Network Setup

check the hostname,

hostname

#handled by rc.M
cat /etc/HOSTNAME

static name resolution,

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

127.0.0.1       localhost
x.x.x.x slack.example.local slack
x.x.x.x gw.example.local    gw
#PUBLICIP   slack.example.com   slack

DNS,

cat /etc/resolv.conf
cat > /etc/resolv.conf <<-EOF
search example.local
nameserver 208.67.222.222
nameserver 208.67.220.220
EOF

ping -W1 -c1 opendns.com

identify your network interfaces as usual with either mii-tool or ethtool, and setup the network,

mv -i /etc/rc.d/rc.inet1 /etc/rc.d/rc.inet1.dist
chmod -x /etc/rc.d/rc.inet1.dist
vi /etc/rc.d/rc.inet1

#!/bin/bash

echo rc.inet1 PATH is $PATH

echo -n lo...
ifconfig lo up && echo done

echo -n eth0...
ifconfig eth0 x.x.x.x/xx up && echo done

echo -n default route...
route add default gw x.x.x.x && echo done

chmod +x /etc/rc.d/rc.inet1

apply and check,

/etc/rc.d/rc.inet1
ping -W1 -c1 208.67.222.222

Remote Shell

Upload your SSH keys somehow,

export TERM=xterm
cd ~/
mkdir .ssh/
chmod 700 .ssh/
vi .ssh/authorized_keys
chmod 600 .ssh/authorized_keys

Push your public KEY there and switch back to without-password.

export TERM=xterm
cp -pi /etc/ssh/sshd_config /etc/ssh/sshd_config.dist
vi /etc/ssh/sshd_config

AllowGroups wheel
PermitRootLogin without-password
StrictModes yes
PasswordAuthentication no
X11Forwarding no

diff -u /etc/ssh/sshd_config.dist /etc/ssh/sshd_config
/etc/rc.d/rc.sshd restart

System Tuning

Proceed with some further tweaking,

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

ln -s rc.d/rc.local /etc/rc.local #already executable
ln -s rc.d/rc.local_shutdown /etc/rc.local_shutdown

cd /etc/rc.d/
ls -alkF
chmod -x 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

LILO (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 = 100

lilo

Environment

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

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

SYSTEM-WIDE PATH,

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

and remove the user-specific part.

At the end of /etc/profile, choose either BASH,

source /etc/shrc

or PDKSH.

Miscellaneous

indexing,

updatedb

fixing defaults for git,

git config --global core.pager "less -r"
#git config --global --replace-all core.pager more

doing some hardware checking,

grep '^model name' /proc/cpuinfo | uniq
grep ^proc /proc/cpuinfo
free -m
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

Virtual Terminals (physical host)

this was already done for the slackware/xen guest setup.

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

Packages

setting up Slackpkg,

cp -pi /etc/slackpkg/mirrors /etc/slackpkg/mirrors.dist
vi /etc/slackpkg/mirrors

(uncomment your favorite mirrors // do not use your own mirror unless daily syncing)

eventually disable dialog,

#cp -pi /etc/slackpkg/slackpkg.conf /etc/slackpkg/slackpkg.conf.dist
#vi /etc/slackpkg/slackpkg.conf

#DIALOG=off

install some packages,

slackpkg install htop #slackware64

System Update

applying latest patches,

slackpkg update
slackpkg upgrade-all
==> (K)eep

updatedb
locate \.new | grep new$
for f in `locate \.new | grep new$`; do
    diff -bu ${f%\.new} $f
done; unset f

#slackpkg install-new
#slackpkg clean-system

sbopkg

assuming the D set has been installed (and not just the ADD tag)

setting up SlackBuilds e.g. building and installing bonnie++, fetch and install the latest sbopkg package e.g.,

cd /var/tmp/
#git clone https://github.com/sbopkg/sbopkg.git
wget https://github.com/sbopkg/sbopkg/releases/download/0.38.1/sbopkg-0.38.1-noarch-1_wsr.tgz
installpkg sbopkg-0.38.1-noarch-1_wsr.tgz 
slackpkg install rsync cyrus-sasl #gpgkeys_curl
sbopkg -r

#ADD
#slackpkg install patch gcc-g++
#REC
slackpkg install guile
sbopkg -i bonnie++

alternative with slackpkg+

fetch the latest slackpkg+ and install it,

#https://github.com/zuno/slackpkgplus
wget http://slakfinder.org/slackpkg+/pkg/slackpkg+-1.7.0-noarch-9mt.txz
installpkg slackpkg+-1.7.0-noarch-9mt.txz

enabling other repositories,

cd /etc/slackpkg
cp -pi slackpkgplus.conf slackpkgplus.conf.dist
vi slackpkgplus.conf

REPOPLUS=( slackpkgplus slackonly )
#REPOPLUS=( slackpkgplus restricted alienbob slacky )
#REPOPLUS=( slackpkgplus restricted alienbob slacky multilib )

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

slackpkg update gpg
update-ca-certificates 
slackpkg update
slackpkg install bonnie++