1. Download nginx
curl -O http://nginx.org/download/nginx-1.7.3.tar.gz -o /home/tango
2. Install nginx
Extract
tar -zxvf /home/tango/nginx-1.7.3.tar.gz /home/tango/nginx-1.7.3-setup
Prepare Dependencies
yum install pcre-develyum install openssl-devel
Compile, go to the/home/Tango/nginx-1.7.3-setup directory
./configure --prefix=/usr/local/server/nginx-1.7.3 --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx/nginx.pid --error-log-path=/var/log/nginx/error.log
Wait until compilation is completed... after installation
make && make install
3. Start nginx
/usr/local/server/nginx-1.7.3/sbin/nginx
Access nginx (port 80 by default. If necessary, modify it in the/etc/nginx. conf file)
server { listen 8080; server_name localhost;
Official nginx documentation
End of this Article
This article from the "Copper Mirror" blog, please be sure to keep this source http://tangoo.blog.51cto.com/9130178/1533004