Created
March 5, 2024 23:54
-
-
Save higebu/1165bd9b321a802b8339ade2bb4d58e6 to your computer and use it in GitHub Desktop.
Install Nginx on Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
codename=$(lsb_release -c -s) | |
sudo wget https://nginx.org/keys/nginx_signing.key -O /etc/apt/keyrings/nginx_signing.key | |
cat <<EOF | sudo tee /etc/apt/sources.list.d/nginx.list | |
deb [signed-by=/etc/apt/keyrings/nginx_signing.key] https://nginx.org/packages/debian/ $codename nginx | |
deb-src [signed-by=/etc/apt/keyrings/nginx_signing.key] https://nginx.org/packages/debian/ $codename nginx | |
EOF | |
sudo apt-get update | |
sudo apt-get install -y nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment