Nginx-vim语法目录:
/nginx-1.16.1/contrib/vim/*
两种方式,看vim路径决定
[root@wujiabo vim74]# pwd /usr/share/vim/vim74 [root@wujiabo vim74]# cp -r ~/nginx-1.16.1/contrib/vim/* .
cp -r ~/nginx-1.16.1/contrib/vim/* ~/.vim/
编译安装nginx: yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers pcre-devel zlib-devel openssl-devel wget gcc tree vim gcc gcc-c++ make ncurses-devel bison openssl-devel zlib-devel cmake pcre pcre-devel openssl openssl-devel lrzsz 一些常用的编译模块 ./configure --with-http_auth_request_module --with-http_realip_module --with-http_v2_module --with-debug --add-module=/home/web/nginx-http-concat/ --with-http_random_index_module --with-http_sub_module --with-http_addition_module --with-http_secure_link_module --with-http_geoip_module --with-http_ssl_module --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module --with-stream --add-module=/home/web/ngx_cache_purge/ --with-http_slice_module --with-google_perftools_module --with-threads --with-ld-opt=-ltcmalloc --with-http_gzip_static_module --with-http_gunzip_module --with-http_stub_status_module
#指定默认安装路径 --prefix=PATH --with 指定安装模块 --without 指定移除模块 --with-debug 打印debug信息
nginx配置文件重载: kill -USR2 PID #添加一个nginx配置文件运行(新的work),且不停止老的nginx配置文件(不提供80端口) kill -WINCH PID #优雅的关闭老的work,请求全部切换到新的上面了
日志切割:将老的日志文件进行重命名,然后执行nginx -s reopen nginx -s reopen #将日志重新生成。 一般每天生成一个日志文件。
#日志实时展示分析 GOaccess 软件