saltstack部署nginx进阶
# ll /usr/local/pcre/total 16
drwxr-xr-x 2 root root 4096 Jun8 10:29 bin
drwxr-xr-x 2 root root 4096 Jun8 10:29 include
drwxr-xr-x 3 root root 4096 Jun8 10:29 lib
drwxr-xr-x 4 root root 4096 Jun8 10:29 share
# id nginx
uid=601(nginx) gid=601(nginx) groups=601(nginx)
# ll /usr/local/nginx/
total 32
drwxr-xr-x 2 nginx nginx 4096 Jun8 10:30 conf
drwxr-xr-x 2 rootroot4096 Jun8 10:30 conf.d
drwxr-xr-x 2 nginx nginx 4096 Jun8 10:30 html
drwxr-xr-x 2 nginx nginx 4096 Jun8 10:30 logs
drwxr-xr-x 2 nginx nginx 4096 Jun8 10:30 sbin
drwx------ 2 nginx root4096 Jun8 10:30 scgi_temp
drwxr-xr-x 5 nginx nginx 4096 Jun8 10:29 tmp
drwx------ 2 nginx root4096 Jun8 10:30 uwsgi_temp
# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.6.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_gzip_static_module --http-client-body-temp-path=/usr/local/nginx/tmp/client/ --http-proxy-temp-path=/usr/local/nginx/tmp/proxy/ --http-fastcgi-temp-path=/usr/local/nginx/tmp/fcgi/ --with-poll_module --with-file-aio --with-http_realip_module --with-http_addition_module --with-http_addition_module --with-http_random_index_module --with-http_stub_status_module --http-uwsgi-temp-path=/usr/local/nginx/uwsgi_temp --http-scgi-temp-path=/usr/local/nginx/scgi_temp --with-pcre=/opt/tools/pcre-8.37
# /etc/init.d/nginx status
nginx (pid 11422 11421 11420 11419 11416) is running...
# chkconfig --list|grep nginx
nginx 0:off1:off2:on3:on4:on5:on6:off
# crontab -l
0 * * * * /usr/sbin/ntpdate 210.72.145.44 64.147.116.229 time.nist.gov >/dev/null 2>&1
# Lines below here are managed by Salt, do not edit
# SALT_CRON_IDENTIFIER:SUPERCRON
0 0 * * * /bin/bash /opt/tools/scripts/nginx_cut_log.sh >/dev/null 2>&1
# ll /opt/tools/scripts/nginx_cut_log.sh
-rwxr-xr-x 1 root root 1100 Jun8 10:30 /opt/tools/scripts/nginx_cut_log.sh
页:
[1]