Skip to content

Instantly share code, notes, and snippets.

@OnCloud125252
Last active October 12, 2024 20:17
Show Gist options
  • Save OnCloud125252/0cb8c41096513f1908088086159f5dcb to your computer and use it in GitHub Desktop.
Save OnCloud125252/0cb8c41096513f1908088086159f5dcb to your computer and use it in GitHub Desktop.

Install dependencies

sudo apt update && sudo apt install curl gpg

Add gpg key

curl https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/nginx_signing.gpg

Create Ninx source list

printf "deb [signed-by=/etc/apt/trusted.gpg.d/nginx_signing.gpg] https://nginx.org/packages/ubuntu jammy nginx\ndeb-src [signed-by=/etc/apt/trusted.gpg.d/nginx_signing.gpg] https://nginx.org/packages/ubuntu jammy nginx\n" | sudo tee /etc/apt/sources.list.d/nginx.list

Install Nginx

sudo apt update
sudo apt install nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment