: This article describes how to install nginx in linux. if you are interested in the PHP Tutorial, refer to it. For your own use, do not spray. The installation is successful. The content is excerpted from the network.
1. install necessary tools:
$ Yum-y install gcc-c ++ autoconf automake
$ Yum-y install zlib-devel openssl-devel pcre-devel
Note:
Pcre: used for address rewriting.
Zlib: gzip module of nginx, which package transmission data and saves traffic (but consumes resources ).
Openssl: provides ssl encryption protocol.
II. Nginx compilation and installation:
1 download Nginx: http://nginx.org/en/download.html
The installation directories are generally stored in:/usr/local/nginx.
2. decompress and compile:
$ Tar-zxvf nginx-1.9.2.tar.gz/
$ Mv nginx-1.9.2 nginx
$ Cd/usr/local/nginx
$./Configure-prefix =/usr/local/nginx // pre-compile
3. installation:
$ Make & make install
Problems occurred during the first installation:
conf/koi-win' and/Usr/local/nginx/conf/koi-win 'are the same file
Then re-install it and run the command during pre-compilation.
./Configure-prefix =/usr/local/nginx
Change
./Configure-prefix =/usr/local/nginx-conf-path =/usr/local/nginx. conf
The installation is successful.
4. start:
Make sure that Port 80 of the system is not occupied by other programs,
$ Nginx-c/etc/nginx. conf
Check whether startup is successful:
Netstat-ano | grep 80 indicates that the startup is successful.
Open the browser to access the IP address of this machine. if the browser displays Welcome to nginx! Nginx has been installed and runs successfully.
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above describes how to install nginx in linux, including some content, and hope to help those who are interested in the PHP Tutorial.