Install Nginx with source code
In my previous work, I felt very high when I used Apache reverse proxy for a few Tomcat servers.
Today, my colleague said it was outdated.
Fortunately, I am not familiar with Apache. Let's start from scratch.
Source code:
Http://nginx.org/en/download.html
Http://nginx.org/download/nginx-1.6.2.tar.gz
Create an nginx user and decompress the source code
[Root @ slaveOne ~] # Useradd-m nginx
[Root @ slaveOne ~] # Cp nginx-1.6.2.tar.gz/home/nginx/
[Root @ slaveOne ~] # Cd/home/nginx/
[Root @ slaveOne nginx] # tar-zxvf nginx-1.6.2.tar.gz
Nginx-1.6.2/
Nginx-1.6.2/auto/
Nginx-1.6.2/conf/
......
Install dependency packages
Yum-y install gcc automake autoconf libtool make gcc-c ++ pcre * zlib openssl-devel
Rename the source directory (because I want to make the compiled directory A nginx-1.6.2)
[Root @ slaveOne nginx] # ls
Nginx-1.6.2 nginx-1.6.2.tar.gz
[Root @ slaveOne nginx] # Music nginx-1.6.2 nginx
Go to the source code directory
[Root @ slaveOne nginx] # cd nginx
[Root @ slaveOne nginx] # ls
Auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src
Run the following command with the root account:
./Configure \
-- Prefix =/home/nginx/nginx-1.6.2 \
-- Sbin-path =/home/nginx/nginx-1.6.2/nginx \
-- Conf-path =/home/nginx/nginx-1.6.2/nginx. conf \
-- Pid-path =/home/nginx/nginx-1.6.2/nginx. pid \
With-http_ssl_module
Multi-thread compilation and Installation
Make-j 'cat/proc/cpuinfo | grep processor | wc-l' & make install
Installation is complete. view the target file.
Modify the nginx. conf configuration file
User nginx;
View Processes
[Root @ slaveOne nginx-1.6.2] # ps-ef | grep nginx
Root 8792 1 0 :45? 00:00:00 nginx: master process./nginx
Nginx 8793 8792 0? 00:00:00 nginx: worker process
-------------------------------------- Split line --------------------------------------
Deployment of Nginx + MySQL + PHP in CentOS 6.2
Build a WEB server using Nginx
Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5
Performance Tuning for Nginx in CentOS 6.3
Configure Nginx to load the ngx_pagespeed module in CentOS 6.3
Install and configure Nginx + Pcre + php-fpm in CentOS 6.4
Nginx installation and configuration instructions
Nginx log filtering using ngx_log_if does not record specific logs
-------------------------------------- Split line --------------------------------------
Nginx details: click here
Nginx: click here
This article permanently updates the link address: