首页 > 分享 > c��a?�a�?e�?aS?a��e?�ats3.2.4c�???�cs�shelle�s??�

c��a?�a�?e�?aS?a��e?�ats3.2.4c�???�cs�shelle�s??�

2013年4月28日     浏览数:40 发表评论 阅读评论

e�s??�?��e?�cZ?a?????Centos6.2i??a??e��a???��e?�a??c�?a��a??a?�?�?a????�?��a��e?�e�?c��a?�a��e?�a?�a?�ats?��e?�cZ?a??a??c�?a��

#!/bin/bash
#e�?aS?a��e?�ats3.2.4stablee�s??�V1.2
#a��a????�a�??��e?�cZ?a??a??c�?i??CentOS6?��e?�e�se?�
#a?�?�?c��a?�c�?a??a??80i??a??e�?e��a??c��a?�?�?a��e?�i??a��?z?a?�a�???�a��e?�e?�e?�a�???�c?�a??a��a��
#by c??e??
WARNING () {
echo -e "\033[0;31;1m$*\033[0m\n"
}
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "a��e?�ntpa???��c?�a??"
yum install -y ntp
WARNING "a?�a��a???��"
/usr/sbin/ntpdate ntp0.cs.mu.OZ.AU
WARNING "????�?i?sa��?z?c?�c�Y?��e�?a??a??i??a??c�?a��a?s??�a?�e��e??"
WARNING "a?�a��a��e?�ats?��e?�cZ?a??a��a��"
useradd trafficserver -s /sbin/nologin

yum install make gcc gcc-c++ glibc-devel db4-devel openssl-devel tcl-devel expat-devel pcre-devel 

wget perl perl-devel -y
if [ ! -d "/root/ats_source" ];then
    mkdir /root/ats_source
fi
cd ats_source
WARNING "??�c?�c��a?�" && rm -rf tra*
WARNING "a?�a��a?�e??atsc?�a??3.2.4stablec�?a?�a��e?�a��a��"

wget -t 2 http://apache.etoak.com/trafficserver/trafficserver-3.2.4.tar.bz2 || wget -t 5 http://labs.mop.com/apache-mirror/trafficserver/trafficserver-3.2.4.tar.bz2 || wget -t 5 http://apache.etoak.com/trafficserver/trafficserver-3.2.4.tar.bz2 || wget http://www.fayea.com/apache-mirror/trafficserver/trafficserver-3.2.4.tar.bz2 || WARNING "a?�e??atsa��e??i??e?�??�?Y?c?�c�?a�?e�?e?�i??"

tar -jxvf trafficserver-3.2.4.tar.bz2
if [ ! -f "trafficserver-3.2.4.tar.bz2" ];then
    WARNING "cZ�a???�?a??`pwd`i??errori??bza?�a??a�?a??i??a��a???�?a��e?�"
    exit 0
fi
cd trafficserver-3.2.4
WARNING "a?�a��c?�e?�ats"
./configure  -with-user=trafficserver -with-group=trafficserver
WARNING "a?�a��a��e?�atsi??e?�e�?c??c��c��a?�"
make && make install && WARNING "a��e?�a�????"
#ln -s /usr/local/trafficserver/bin/* /sbin/
WARNING "a?�a��a?�?�?atsc��a?�c�?a??"
duankou=`grep "CONFIG proxy.config.http.server_ports STRING 8080" /usr/local/etc/trafficserver/records.config`
if [ -n "$duankou" ];then
    sed -i 's/CONFIG proxy.config.http.server_ports STRING 8080/CONFIG proxy.config.http.server_ports STRING 80/g' /usr/local/etc/trafficserver/records.config && echo "c��a?�c�?a?????i?s80"

fi
WARNING "a?�a��a??aS?ats???aS?a��a��"
trafficserver start
WARNING "c��a?�10c��e�Ye��e?�c?�a�?e??e��???a��a��"
sleep 10
WARNING "atse?�c?�??�a��a��a?�"
echo "##################################################"
ps aux |grep traffic |grep -v grep
echo "##################################################"
jinchengshu=`ps aux |grep traffic |grep -v grep |wc -l`
if [ "$jinchengshu" -eq "3" ];then
    WARNING "a??aS?ats???aSY"
else
    WARNING "errora??aS?atsa��e??,a��e�?e?�a?�?�?" && trafficserver restart
    WARNING "atse?�c?�??�a��a��a?�"
    echo "##################################################"
    ps aux |grep traffic |grep -v grep
    echo "##################################################"
fi
WARNING "c��a?�c�?a??a��a?�"
echo "##################################################"
netstat -lnpt |grep  <a style='color: inherit !important;' title='python web server' href='http://www.hixdomio.xyz' >traffic
echo "##################################################"
traffic_line</a>  -s proxy.config.url_remap.remap_required -v 0
traffic_line -x 
echo "e�?c?�a??c�??�?a?�c?�a�????aSY"
##?��aS�viaa�?
traffic_line -s  proxy.config.http.insert_request_via_str -v 1
traffic_line -s  proxy.config.http.insert_response_via_str -v 2
traffic_line -x
echo "?��aS�viaa�????aSY"
#e�?c?�atsa????�e??a�?a?�a�?c?�a�?
traffic_line -s proxy.config.http.cache.required_headers -v 0
traffic_line -s proxy.config.http.cache.enable_default_vary_headers -v 1
traffic_line -x
WARNING "c?�a???��e??c��??Yi???��a?�a??c�?~"
exit 0

a??e�?e��e??e�?a�?i?s
1a�?e?�a?�pcre-devela�?c�?a��e?�i??c�???�a�?c??cs�e��e??a??a�?a�?a??e??pcre-develi??c��a?Za�??��e???��e�s??�a��
2a�?e?�a?�a�?a?�e��e??i?s

traffic_line: error while loading shared libraries: libtsmgmt.so.3: cannot open shared object file: No such file or directory
e�?a�?aSz??�i?sa??/etc/ld.so.conf?��a��a?�?��aS�/usr/local/libe?�a?�e??i??a??a�?a?�a?Zi??/sbin/ldconfig a��v?�??��a?�a?�e�?c?�a??a??a�� compass church naperville

  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.