ubuntu 上安裝Nginx1.9.*

1. 在源中添加資源nginx

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

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

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:spa

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

3. 安裝nginx.net

Install NginX:code

apt-get update
apt-get install nginx

4. 檢查安裝是否成功server

Verify its version:blog

/usr/sbin/nginx -V

下一篇資源

使用nginx搭建簡單的文件服務器

相關文章
相關標籤/搜索