Notes tagged with "Digitalocean"
Linux Server Maintenance
Updating Ubuntu:
```bash
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove
reboot
```
Listing user groups:
```bash
... getent group | sort
```
Web Application Setup - Build The Server
New Ubuntu VPS Set Up
We’ve assuming we’ve created the initial droplet and that we are able to ssh as root into the box. Next steps are as follows:
Add Admin User Account
-
SSH into the droplet as root:
Run these commands on the server
# create your admin user ... adduser usrnme # set up ssh key # this was the old way: # ... mkdir /home/usrnme/.ssh # ... chmod 700 /home/usrnme/.ssh # ... cp /root/.ssh/authorized_keys /home/usrnme/.ssh # ... chown -R usrnme:usrnme /home/usrnme/.ssh/authorized_keys # ... chmod 600 /home/usrnme/.ssh/authorized_keys # this is shorter and : ... rsync --archive --chown=usrnme:usrnme ~/.ssh /home/usrnme # add user to sudo ... usermod -aG sudo usrnme -
Push any user config files necessary from your local computer to the new server from your development environment:
Web Application Setup - Server Security
Optimizing Ubuntu Server
Services and programs you can likely kill:
This was taken from this site
-
BASICS
Killing these didn’t impact the system at all when I tested:
... sudo apt remove snapd -y --purge ... sudo apt remove lxcfs -y --purge ... sudo apt remove policykit-1 -y --purge ... ... sudo apt remove lvm2 -y --purge ... sudo apt remove at -y --purge ... sudo apt remove mdadm -y --purge ... sudo apt remove open-iscsi -y --purge ... sudo apt remove accountsservice -y --purge -
EXTREME