Ubuntu14 上安装Nginx1.9.*

1. 在源中添加资源

在/etc/apt/sources.lst中 添加下面两源:

Add the following lines in /etc/apt/sources.lst

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

2.  添加key到文件中

 From your server download the signing key add it to the apt program keyring with the following commands:

cd /etc/apt
wget http://nginx.org/keys/nginx_signing.key
apt-key add nginx_signing.key

3. 安装nginx

Install NginX:

apt-get update
apt-get install nginx

4. 检查安装是否成功

Verify its version:

/usr/sbin/nginx -V

下一篇

使用nginx搭建简单的文件服务器

你可能感兴趣的:(nginx,ubuntu)