Added some more stuff
parent
b6f7296522
commit
d32923f6a3
@ -0,0 +1,15 @@
|
|||||||
|
# Swappiness
|
||||||
|
|
||||||
|
# Clear Swap
|
||||||
|
|
||||||
|
sudo swapoff -a; sudo swapon -a
|
||||||
|
|
||||||
|
# Check swapiness
|
||||||
|
|
||||||
|
cat /proc/sys/vm/swappiness
|
||||||
|
|
||||||
|
This is recommended to be ~10, but many times it's set to 60
|
||||||
|
|
||||||
|
# Change swapiness
|
||||||
|
|
||||||
|
sudo sysctl vm.swappiness=10
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
# Server Essentials
|
||||||
|
|
||||||
|
## Enable SSH
|
||||||
|
|
||||||
|
To connect to your server non-physically set up SSH.
|
||||||
|
|
||||||
|
## Set up a new user
|
||||||
|
|
||||||
|
Don't use the admin user. If your server has a default user (e.g RPI)
|
||||||
|
it's recommended to remove that user.
|
||||||
|
|
||||||
|
`useradd <user> -s /bin/bash/ -m -G adm, sudo`
|
||||||
|
`passwd <user>`
|
||||||
|
|
||||||
|
`userdel pi`
|
||||||
|
`rm -rf /home/pi`
|
||||||
|
|
||||||
|
## Change hostname
|
||||||
|
|
||||||
|
Edit `/etc/hosts` and `/etc/hostname` then reboot
|
||||||
|
Use SSH-keys to login
|
||||||
|
|
||||||
|
### Allow server to be found by hostname
|
||||||
|
|
||||||
|
`sudo systemctl status avahi-daemon` Check this is running
|
||||||
|
If it is, great. The server should connect via `user@host` or `user@host.local`
|
||||||
|
|
||||||
|
## Set a static IP
|
||||||
|
|
||||||
|
## Enable SSH keys
|
||||||
|
|
||||||
|
### Disable password logins
|
||||||
Loading…
Reference in New Issue