Skip to content

Instantly share code, notes, and snippets.

@shuhankuang
Created March 24, 2014 06:43
Show Gist options
  • Save shuhankuang/9735279 to your computer and use it in GitHub Desktop.
Save shuhankuang/9735279 to your computer and use it in GitHub Desktop.
ubuntu 安装 nginx
Nginx is included in the Ubuntu software repositories. While using this method will leave you with a working web server it is not the preferred method for installing nginx. Nevertheless, if you want to install in this manner, the following sequence of commands ensure that your system's package databases and installed programs are up to date:
add-apt-repository ppa:nginx/stable
apt-get update
apt-get upgrade --show-upgraded
Install the nginx web server by issuing the following command:
apt-get install nginx
To start the server for the first time use the following command:
/etc/init.d/nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment