LoginSignup
8
7

More than 5 years have passed since last update.

nginx 1.6/1.7 のインストール

Posted at

Ubuntuにnginx 1.6/1.7をインストールする方法。
2014/05/01現在、Ubuntu標準?だと1.4.6のインストールになるので公式レポジトリを追加する。

公式レポジトリ

下記をsources.listに追記すればいい。

/etc/apt/sources.list
# nginx 1.6
deb http://nginx.org/packages/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/ubuntu/ trusty nginx

# または

# nginx 1.7
deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx

trustysaucyにすれば、Ubuntu 13.10用。

インストール

# sources.listに追記
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sh -c 'echo "# nginx" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb http://nginx.org/packages/ubuntu/ trusty nginx" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb-src http://nginx.org/packages/ubuntu/ trusty nginx" >> /etc/apt/sources.list'

# レポジトリ署名を追加
cd /tmp
wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key

# インストール
sudo apt-get update
sudo apt-get install nginx

参考

8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7