Install Nginx on Linux

For Debian/Ubuntu, in order to authenticate the nginx repository signature and to eliminate warnings about missing PGP key during installation of the nginx package, it is necessary to add the key used to sign the nginx packages and repository to the apt program keyring. Please download this key from our web site, and add it to the apt program keyring with the following command:
sudo apt-key add nginx_signing.key
For Ubuntu replace codename with Ubuntu distribution codename, and append the following to the end of the /etc/apt/sources.list file:

VersionCodenameSupported Platforms
14.04trustyx86_64, i386, aarch64/arm64
16.04xenialx86_64, i386, ppc64el, aarch64/arm64
17.10artfulx86_64, i386
deb codename nginx
deb-src codename nginx
For Debian/Ubuntu then run the following commands:
apt-get update
apt-get install nginx

Start nginx
 $ sudo systemctl start nginxapt-get install nginx
 $ sudo service nginx start

Restart nginx
 $ sudo systemctl restart nginxapt-get install nginx
 $ sudo service nginx restart


이 블로그의 인기 게시물

mongoDB admin 권한 설정방법 How to enable access control for mongo DB

Install node and yarn on Linux

Install pm2 via yarn globally