Maintaining Ubuntu Droplet

Maintaining Ubuntu Droplet

by John Vincent


Posted on August 9, 2018


This is part of a series of discussions regarding Deploying to a Digital Ocean Droplet. For more details, please see Overview of johnvincent.io website

Maintaining Ubuntu Droplet

Webmaster Tools

Login to Webmaster Tools

and review crawl statistics

Update Ubuntu

sudo apt-get update

did not retrieve any updates, just gets package information.

sudo apt-get dist-upgrade

older dist:
sudo apt-get upgrade
continue?
Y
A new version of /boot/grub/menu.lst is available, but the version installed currently has been locally modified.

Keep the local version currently installed.

Then restart the droplet

Restart the droplet

sudo reboot

Shutdown / Restart Droplet

Login to Digital Ocean

Select droplet

Console:

login as root

shutdown -h now

This will shut down your operating system, flush any pending changes to the disk, and then terminate power to your server.

Visit the control panel and select the option to power on your Droplet.

Verify droplet is not running

  • Dashboard
  • Access
  • Launch Console
  • Verify droplet is not running.

To start the droplet

  • Dashboard
  • Power
  • Power cycle

Verify droplet is running

  • Access
  • Launch Console
  • Login to verify droplet is running.

Renew SSL Certificates

See Update SSL Certificates to Ubuntu at Digital Ocean

Nginx

Restart Nginx
sudo nginx -t
sudo systemctl restart nginx

Stop Nginx
sudo systemctl stop nginx

Troubleshooting
nginx:
ps -ef | grep nginx
sudo nginx -t
sudo systemctl restart nginx

nginx enabled servers:
cd /etc/nginx/sites-enabled
ls -la
verify running valid server blocks.

nginx logs:
cd /var/log/nginx
vi *.log

PM2

pm2 restart all
pm2 list
pm2 monit

swap

sudo swapon --summary
free -h