Last active
January 1, 2024 08:16
-
-
Save NNdroid/b670227ca212fe2c6674722df83f2719 to your computer and use it in GitHub Desktop.
nginx installer shell script (debian only)
This file contains hidden or 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 | |
apt update | |
apt upgrade -y | |
apt install curl gnupg2 ca-certificates lsb-release dirmngr software-properties-common apt-transport-https -y | |
curl -fSsL https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg > /dev/null | |
gpg --dry-run --quiet --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg | |
echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" | tee /etc/apt/sources.list.d/nginx.list | |
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | tee /etc/apt/preferences.d/99nginx | |
apt update | |
apt install nginx -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment