Installing NGINX from the Official Repository

install | source | nginx | advanced | analyze | php | redirect

assuming debian

point to the official repository

apt update && apt install apt-transport-https ca-certificates curl gnupg1 lsb-release
# gnupg2

curl -fsSL https://nginx.org/keys/nginx_signing.key | apt-key add -
apt-key fingerprint ABF5BD827BD9BF62
# 573B FD6B 3D8F BC64 1079  A6AB ABF5 BD82 7BD9 BF62

ls -lF /etc/apt/sources.list.d/nginx.list # no exist
echo "deb http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list

install

apt update && apt install nginx
nginx -v

what user will run the process?

grep ^www-data /etc/passwd # default on debian
grep ^www-data /etc/group

grep ^nginx /etc/passwd # from official repo
grep ^nginx /etc/group

make sure the daemon goes up with dummy config

systemctl restart nginx
systemctl status nginx # already enabled

pgrep -a nginx
netstat -lntup | grep nginx

and proceed with the setup


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2023 Pierre-Philipp Braun