In recent fiddle Offline Nginx, had intended to make rpm package, but technology is not in place, only to change the thinking, the Nginx compiled into binary packages of free installation, like Tomcat, go directly to the start will be able to use, so finding a nginx- portable, fast compiler tool for the Nginx binary packages.

installation:

Ubuntu&Debian:

sudo apt-get install perl git curl unzip build-essential libpcre3-dev libssl-dev -y

CentOS:

yum install gcc-c++ pcre perl git unzip  pcre-devel zlib zlib-devel openssl openssl-devel -y

Bahrain dependence, we install nginx-portable main program:

wget https://github.com/nuccch/nginx-portable/archive/master.zip;unzip master.zip
cd nginx-portable-master/

This, the program installation is complete, we began to compile, we first need to determine Nginx version, look here:

https://nginx.org/download/

Then execute:

bash compile <nginx-version>

For example, we want to compile the 1.16.1 version:

bash compile 1.16.1

Other versions and so on, after the compilation is complete, it will generate a file nginx has been compiled in the build directory of the current directory:

nginx-<version>.tar.gz

This copies the file directly to the target host extract can be used.

How to manage Nginx?

启动:cd /nginx/sbin && ./nginx
Stop: ./ nginx -s stop
Restart: ./ nginx -s reload
Check the configuration correctness: ./ nginx -t
View Nginx version information: ./ nginx -v

Github project Address: https://github.com/nuccch/nginx-portable

Blog made a free installation package 1.16.1, there is need to download:

https://cikeblog.com/s/nginx-1.16.1.tar.gz

>>  This link: Nginx free installation package creation tools: Nginx-Portable
>>  reprint please indicate the source: Assassin's blog
>>  VPS Recommended: Hostdare pay $ 16 in Los Angeles GIA Crea room
>>  If the article fails or installation fails, please leave a message for feedback