Skip to content

Instantly share code, notes, and snippets.

@shui
Created January 29, 2018 06:17
Show Gist options
  • Save shui/f10e77fb213af212946f276d4af763f8 to your computer and use it in GitHub Desktop.
Save shui/f10e77fb213af212946f276d4af763f8 to your computer and use it in GitHub Desktop.
Debian Jessie安装最新版Nginx

添加nginx的官方安装源:

# vim /etc/apt/sources.list

然后:

deb https://nginx.org/packages/debian/ jessie nginx
deb-src https://nginx.org/packages/debian/ jessie nginx

然后:

apt-get update
apt-get install nginx

如果出现错误:

W: GPG error: http://nginx.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62

执行:

wget https://nginx.org/packages/keys/nginx_signing.key
cat nginx_signing.key | apt-key add - 
apt update
apt install nginx

启动Nginx:

service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment