I need to know how to update LEMP on Ubuntu 18.04 to the latest. I have created a droplet with LEMP and nginx/1.14.0. Because this is the version that was available in Digitalocean.
I have hosted several websites on this single droplet.

Can someone give me step by step procedure on how to update this droplet? I need to update NGINX, PHP, MYSQL, and ubuntu to the latest versions. I believe this will be helpful to many users here. Thank you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Pre-Built Packages for Mainline version on nginx.org:

Warning: The nginx.org repository does not currently support Ubuntu 18.04. Support for Bionic should be available soon.

This will get you the latest version of Nginx. Use this version if you are a pro and if you really need the most actual Nginx build, as it may lack some Ubuntu specific integration and tweaks.

Download and add the PGP key to authenticate the Nginx repository signature:
wget -qO - https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

Append the repositories to the end of the /etc/apt/sources.list file:

echo “deb http://nginx.org/packages/mainline/ubuntu/ bionic nginx” | sudo tee -a /etc/apt/sources.list

echo “deb-src http://nginx.org/packages/mainline/ubuntu/ bionic nginx” | sudo tee -a /etc/apt/sources.list

Update and install:
sudo apt update && sudo apt install nginx

  • Basically I need to update ubuntu 18.04 into version 20s and respectively rest of the software including nginx, php, mysql to the latest. Please give me step by step instructions. Thank you

Submit an Answer