Create user and set password
useradd -d /export/home/phil phil
passwd phil
chown home directory to user
Change user shell
usermod -s /usr/bin/bash phil
Grant sudo privilege
usermod -g sudo phil
Add paths to .profile
export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/sfw/lib
export LD_LIBRARY_PATH
CFLAGS="-I/usr/sfw/include -L/usr/sfw/lib"
export CFLAGS
Links to GNU software
ln -s /usr/sfw/bin/gtar tar
ln -s /usr/sfw/bin/gcc cc
ln -s /usr/sfw/bin/gmake make
Setup ssh
- Generate key pair using ssh-keygen
- Drop keys in ~/.ssh
- Copy keys to client computer's ~/.ssh
- For client to access server, drop client's public key to server's ~/.ssh/authorized_keys file
Create swap file (sudo all commands)
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon --show
vi /etc/fstab
add line /swapfile swap swap defaults 0 0