This article mainly introduces Nginx installation process, does not include configuration.
1. Configuring the installation Environment
Yum Groupinstall "Development Tools" "Server Platform" Yum install Pcre-devel Openssl-devel
2. Create a new running account:
Groupadd-r Nginxuseradd-r-G nginx
3. View the Help file:
./configure--help | less
4. Compile and install:
#./configure--prefix=/usr/local/nginx--conf-path=/etc/nginx/nginx.conf--user=nginx--group=nginx-- Error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx/ Nginx.pid--lock-path=/var/lock/nginx.lock--with-http_ssl_module--with-http_stub_status_module--with-http_gzip_ Static_module--with-http_flv_module--with-http_mp4_module--http-client-body-temp-path=/var/tmp/nginx/client-- Http-proxy-temp-path=/var/tmp/nginx/proxy--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi# make && make Install
5. Check the installation status:
/usr/local/nginx/sbin/nginx-t
6. Start Nginx (before service script is configured):
/usr/local/nginx/sbin/nginx
7. Close Nginx:
killall nginx
8. Service Script settings:
Vim/etc/rc.d/init.d/nginx service script, available according to document settings chmod +x/etc/rc.d/init.d/nginxchkconfig--add nginxchkconfig--list Nginxservice Nginx Start
9. Start the service, the normal running page is displayed as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/57/wKioL1X6u3Th4rx8AAETZu8q8nY593.jpg "title=" 1.png " alt= "Wkiol1x6u3th4rx8aaetzu8q8ny593.jpg"/>
This article is from the "Lifelong Learning" blog, please be sure to keep this source http://chickengg.blog.51cto.com/10402610/1695828
Installation of Nginx