apache traffic server 缓存服务器快速部署

一、update
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum -y install expat expat-devel glibc-devel glibc tcl tcl-devel patch make gcc gcc-c++ libtool libtool-libs autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
wget http://autosetup1.googlecode.com/files/pcre-8.01.tar.gz
tar -zxvf pcre-8.01.tar.gz
cd pcre-8.01
./configure
make && make install
cd ..
wget http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz
tar zxvf libiconv-1.13.tar.gz
cd libiconv-1.13/
./configure --prefix=/usr/local
make
make install
cd ..
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

二、traffic server
1、install
groupadd trafficserver
useradd -g trafficserver trafficserver
wget http://apache.freelamp.com//trafficserver/trafficserver-2.1.3-unstable.tar.bz2
tar -jxvf trafficserver-2.1.3-unstable.tar.bz2
cd trafficserver-2.1.3-unstable
autoreconf -i
./configure --prefix=/usr/local/trafficserver --enable-webui --with-user=trafficserver --with-group=trafficserver
make
make install

2、config
vi /usr/local/trafficserver/etc/trafficserver/records.config
CONFIG proxy.config.proxy_name STRING linuxtone.org // proxy_name
CONFIG proxy.config.admin.web_interface_port INT 8081 //web_prot
CONFIG proxy.config.admin.admin_user STRING admin  //web user
CONFIG proxy.config.admin.admin_password STRING 21232F297A57A5A743894A0 // admin@passwd
CONFIG proxy.config.http.server_port INT 80 //  8080>>80

vim /usr/local/trafficserver/etc/trafficserver/remap.config
map          http://192.168.1.253      http://bbs.linuxtone.org
                ip                           web

vim /usr/local/trafficserver/etc/trafficserver/storage.config


3、start
/usr/local/trafficserver/bin/trafficserver start  //start
/usr/local/trafficserver/bin/trafficserver stop   //stop

4、test
C:\Users\Administrator>curl -I http://192.168.1.253
HTTP/1.1 200 OK
Server: ATS/2.1.3-unstable
Date: Mon, 08 Nov 2010 06:11:27 GMT
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Set-Cookie: ppRN_2132_lastvisit=1289193087; expires=Wed, 08-Dec-2010 06:11:27 GM
T; path=/
Set-Cookie: ppRN_2132_sid=5Oat3O; expires=Tue, 09-Nov-2010 06:11:27 GMT; path=/
Set-Cookie: ppRN_2132_lastact=1289196687%09index.php%09; expires=Tue, 09-Nov-201
0 06:11:27 GMT; path=/
Set-Cookie: ppRN_2132_onlineusernum=2672; expires=Mon, 08-Nov-2010 06:16:27 GMT;
path=/
Set-Cookie: ppRN_2132_sid=5Oat3O; expires=Tue, 09-Nov-2010 06:11:27 GMT; path=/
Age: 0
Connection: keep-alive
Via: HTTP/1.1 linuxtone.org (ApacheTrafficServer/2.1.3-unstable [cMsSf ])

本文出自 “Sempter.service” 博客,谢绝转载!

你可能感兴趣的:(apache,server,快速部署,traffic)