#!/bin/bash # auther : zhoubin /bin/cp -r ./openresty /usr/local/openresty /bin/cp ./dpath /usr/local/openresty/nginx/conf/dpath /bin/cp ./nginx /etc/init.d/nginx chmod +x /etc/init.d/nginx chkconfig nginx on /bin/cp ./openresty.conf /etc/ld.so.conf.d/openresty.conf /sbin/ldconfig mkdir -p /data/scripts/ /bin/cp -r ./tornado /data/ /bin/cp ./cutlog.sh /data/scripts/cutlog.sh /bin/cp ./hashdown-v1.01.py /data/scripts/hashdown-v1.01.py killall python killall python mkdir -p /data/logs cp ./rmhashdown.log.sh /data/scripts/rmhashdown.log.sh cat ./rmhashdown.log.cron >> /var/spool/cron/root /etc/init.d/crond restart chkconfig crond on echo 'python /data/scripts/hashdown-v1.01.py -c /usr/local/openresty/nginx/conf/dpath -r /export' >> /etc/rc.local cat ./openresty.crond >> /etc/cron.d/openresty mkdir -p /data/logs/nginx ln -s /data/logs/nginx /usr/local/openresty/nginx/logs cd /data/tornado/tornado-3.1.1 python setup.py install python /data/scripts/hashdown-v1.01.py -c /usr/local/openresty/nginx/conf/dpath -r /export /etc/init.d/nginx restart /etc/init.d/crond restart