Guide |
Nginx is an open source high-performance HTTP server and reverse proxy server, while supporting the IMAP/POP3 Proxy service, is a free software, but also the operation and maintenance engineers will be a kind of server, the following I would simply say the installation of Nginx server and file resolution. |
Simple installation
This tutorial is a CentOS 6.3 example, the package can be downloaded on the official website, before compiling the installation, we need to use Yum in advance to the required software dependency package installation completed.
The installation commands are as follows:
[Root@centos6 ~]# wget http://nginx.org/download/nginx-1.4.0.tar.gz[root@centos6 ~]# tar-xzf nginx-1.4.0.tar.gz-c/ USR/SRC[ROOT@CENTOS6 ~]# yum-y Install gcc pcre pcre-devel OpenSSL \>openssl-devel gd gd-devel Perl Perl-extutils-embe D[ROOT@CENTOS6 ~]# cd/usr/src/nginx-1.4.0/[root@centos6 nginx-1.4.0]#./configure--prefix=/usr/local/nginx \>-- With-ipv6 \>--with-http_ssl_module \>--with-http_realip_module \>--with-http_addition_module \>-- With-http_dav_module \>--with-http_flv_module \>--with-http_mp4_module \>--with-http_gzip_static_module \ >--with-http_perl_module \>--with-mail \>--with_main_ssl_module[root@centos6 nginx-1.4.0]# make && Make install
After installation of the Nginx Web server software, the program home directory is located in/usr/local/nginx/, the contents of which are Cong, HTML, logs, Sbin, respectively. The following are the common process management directives of Nginx:
[Root@centos6 ~]#/usr/local/nginx/sbin/nginx #启动主程序 [root@centos6 ~]#/usr/local/nginx/sbin/nginx-c \ #指定配置文件启动主程序 [root@centos6 ~]#/usr/local/nginx/sbin/nginx-s stop #关闭主程序 [root@centos6 ~]#/usr/local/nginx/sbin/ Nginx-s Reload #重新加载设置
Configuration file Resolution
Nginx default configuration file is/usr/local/nginx/conf/nginx.conf, the configuration file includes Global, event, HTTP, server settings, event is mainly used to define Nginx working mode, HTTP provides Web functionality, Server is used to set up a virtual host, the server must be inside HTTP, and there can be more than one server in a configuration file.
Original address of this article: http://www.linuxprobe.com/nginx-installation-parsing
free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better:http://www.linuxprobe.com/
The above describes the Nginx installation and configuration file parsing, including Nginx, configuration file aspects of the content, I hope that the PHP tutorial interested in a friend helpful.