Nginx is a lightweight web server/reverse proxy server and email (IMAP/POP3) proxy server, developed by Russian programmer Igor Sysoev, which is characterized by less memory occupation and strong concurrency capability. The public version 0.1.0 was released on October 4, 2004, and the latest version is 1.7.8 released on December 2, 2014.
Today, I learned the installation method of Nginx on the ttlsa website, tested it in the virtual machine, and then installed it on the server again. I will summarize the installation process below.
Linux system: Centos 6.5 x64
Nginx version: 1.7.8
1. Install prce ( redirection support ) and openssl ( https support, if you do not need https, you can not install it. )
When I installed CentOS 6.5, I chose "Basic Server". By default, these two packages are not fully installed, so both of them can be installed.
2. Download nginx 1.7.8
3. Unzip, compile and install
Then enter the directory to compile and install
If there is no error message, you can perform the following installation:
4. Start the nginx process
Restart or shut down the process:
5. Turn off the firewall, or add firewall rules to test.
Or edit the configuration file:
Add such a rule to open port 80 and save it:
Just restart the service:
ok, it can be accessed by browser.
Today, I learned the installation method of Nginx on the ttlsa website, tested it in the virtual machine, and then installed it on the server again. I will summarize the installation process below.
Linux system: Centos 6.5 x64
Nginx version: 1.7.8
1. Install prce ( redirection support ) and openssl ( https support, if you do not need https, you can not install it. )
- yum -y install pcre*
- yum -y install openssl*
2. Download nginx 1.7.8
- wget http://nginx.org/download/nginx-1.7.8.tar.gz
- tar -zxvf nginx-1.7.8.tar.gz
- cd nginx-1.7.8
- ./configure --prefix=/usr/local/nginx-1.5.1 \
- --with-http_ssl_module --with-http_spdy_module \
- --with-http_stub_status_module --with-pcre
- make
- make install
- /usr/local/nginx-1.7.8/sbin/nginx
- /usr/local/nginx-1.7.8/sbin/nginx -s reload
- /usr/local/nginx-1.7.8/sbin/nginx -s stop
- service iptables stop
- vi /etc/sysconfig/iptables
- -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
- service iptables restart