http://mirrors.cqu.edu.cn/CentOS/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso
yum install pcre pcre-devel openssl openssl-devel zlib zlib-devel gcc gcc-c++ -y
wget http://nginx.org/download/nginx-1.15.12.tar.gz
tar -zxvf nginx-1.15.12.tar.gz
useradd -s /sbin/nologin -M www
cd nginx-1.15.12
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_realip_module --with-stream --with-stream_ssl_module --with-http_flv_module --with-http_mp4_module --with-http_dav_module --with-http_sub_module --with-http_gunzip_module --with-pcre --with-debug
make && make install
/usr/local/nginx/sbin/nginx -t
vi /lib/systemd/system/nginx.service
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
systemctl start nginx.service
systemctl enable nginx.service
ln -s /usr/local/nginx/sbin/* /usr/local/sbin/
nginx -v
netstat -ntlp | grep nginx
http://www.vim.org/scripts/script.php?script_id=1886
mkdir -pv ~/.vim/syntax
cd ~/.vim/syntax
wget -O nginx.vim http://www.vim.org/scripts/download_script.php?src_id=19394
echo "au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif " >> ~/.vim/filetype.vim
https://blog.csdn.net/hanzheng260561728/article/details/80583051