First, prepare the environment
1, install centos, buy a general Ali cloud test
2, download nginx, link http://nginx.org/download/nginx-1.10.2.tar.gz
Second, start the installation
1, centos download the new environment you want to install depend
// a key mounted thereon four dependent yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
2. Create a directory nginx, and downloading codecs
// Create a folder cd / usr / local mkdir nginx cd nginx
// remote download the tar package wget HTTP: // nginx.org/download/nginx-1.10.2.tar.gz
// remote download package tar tar -xvf nginx-1.10.2.tar.gz
3, start the installation
// enter nginx directory cd / usr / local / nginx // execute command ./ the configure // make command make // execute the command make install make install
4, start, stop, restart commands
// start cd / usr / local / nginx / sbin / nginx . / Nginx // stop cd / usr / local / nginx / sbin / nginx . / Nginx - S STOP // restart, this command is already started under the premise nginx when it does, the general change the configuration file to restart the cd / usr / local / nginx / sbin / nginx . / nginx -s reload
5, view the process, kill the process
6, the installation is successful
Note that, if unsuccessful, please open port 80, or to check whether the firewall