wget http://nginx.org/download/nginx-1.18.0.tar.gz
xxxxxxxxxx
tar -zxvf nginx-1.18.0.tar.gz
xcd nginx-1.18.0/
./configure --prefix=/usr/local/nginx --with-pcre --with-threads --with-file-aio --with-http_ssl_module --with-http_stub_status_module --with-pcre --with-http_gzip_static_module --add-module=/home/axieyun_aly_kkb/ngx_brotli --with-http_v2_module
make
make install
xxxxxxxxxx
/usr/local/nginx/sbin/nginx -V
xxxxxxxxxx
/usr/local/nginx/sbin/nginx -s stop
xxxxxxxxxx
find / -name nginx
xxxxxxxxxx
chkconfig nginx off
rm -rf /etc/init.d/nginx
修改为Axieyun
xxxxxxxxxx
#执行更名操作
sed -i "s#\"NGINX\"#\"Axieyun\"#" src/core/nginx.h
sed -i "s#\"nginx/\"#\"Axieyun/\"#" src/core/nginx.h
sed -i "s#Server: nginx#Server: Axieyun#" src/http/ngx_http_header_filter_module.c
sed -i "s#\"<hr><center>nginx<\/center>\"#\"<hr><center>Axieyun<\/center>\"#"src/http/ngx_http_special_response.c
xxxxxxxxxx
server_token off;
xxxxxxxxxx
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
xxxxxxxxxx
./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre
xxxxxxxxxx
./configure: error: the HTTP XSLT module requires the libxml2/libxslt
libraries. You can either do not enable the module or install the libraries.
xxxxxxxxxx
apt-get install libxml2 libxml2-dev libxslt-dev
xxxxxxxxxx
./configure: error: the HTTP image filter module requires the GD library.
You can either do not enable the module or install the libraries.
xxxxxxxxxx
sudo apt update
sudo apt upgrade
sudo apt full-upgrade -y libgd-dev
xxxxxxxxxx
netstat -ntlp|grep 80