Includes
- automatic updates
- firewall (ufw)
- security measures
- package updates
- fail2ban
- docker
- docker-compose
- docker cleanup
- utilities (landscape-common git htop zip tree)
git clone https://github.com/lukeaus/ubuntu-14.04-server-setup.git
Make sure you have added your public key to the server.
If your public key is not already on the server:
$ cat ~/.ssh/id_rsa.pub | ssh username@remote_host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
$ sudo service ssh restart
If your public key is not already on the server when you logged in then logout and log back in again now (otherwise you will get turfed off the system when ssh restarts).
Login to your new server:
ssh root@<SERVER-IP-ADDRESS>
Ensure you have added your local dev machine ssh key to the server first (usually you do this when creating the server).
Copy this script. Open a new shell window and run:
scp /path/to/this/script/setup.sh root@<SERVER-IP-ADDRESS>:/root
Make this script executable Switch back to new server shell and run:
chmod +x setup.sh
Run this script with root privileges:
sudo ./setup.sh