Install latest Nginx on Ubuntu

Install latest Nginx on Ubuntu

Just a memo.

Install Nginx

1
2
3
4
5
6
ubuntu%$ sudo su
ubuntu%$ curl http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
ubuntu%$ sh -c "echo 'deb http://nginx.org/packages/ubuntu/ trusty nginx' >> /etc/apt/sources.list"
ubuntu%$ sh -c "echo 'deb-src http://nginx.org/packages/ubuntu/ trusty nginx' >> /etc/apt/sources.list"
ubuntu%$ apt-get update
ubuntu%$ apt-get install -y nginx

Install sysv-rc-conf

SysV is a runlevel configuration tool.

1
ubuntu%$ apt-get install -y sysv-rc-conf

Configure runlevel of nginx.

The command chkconfig is no longer available in Ubuntu. The equivalent command to chkconfig is update-rc.d. This command nearly supports all the new versions of ubuntu.

  • chkconfig —> sysv-rc-conf
1
ubuntu%$ sysv-rc-conf nginx on

Show runlevel of nginx

1
2
ubuntu%$ sysv-rc-conf --list nginx
nginx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Author

Kenzo Tanaka

Posted on

2017-07-10

Licensed under

コメント