文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>apache traffic server安装小试

apache traffic server安装小试

时间:2010-11-08  来源:badb0y

一、升级库
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、安装
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、配置
配置比较简单,只要修改三个文件就OK!
vi /usr/local/trafficserver/etc/trafficserver/records.config
CONFIG proxy.config.proxy_name STRING linuxtone.org //将机器名改成你想要的名字就OK
CONFIG proxy.config.admin.web_interface_port INT 8081 //web端口
CONFIG proxy.config.admin.admin_user STRING admin  //web用户
CONFIG proxy.config.admin.admin_password STRING 21232F297A57A5A743894A0 //密码!默认为admin
CONFIG proxy.config.http.server_port INT 80 //默认为8080,,我们改成80

vi /usr/local/trafficserver/etc/trafficserver/remap.config
map          http://192.168.1.253      http://bbs.linuxtone.org
                 用户地址                         源地址

vi /usr/local/trafficserver/etc/trafficserver/storage.config
主要修改存储位置及大小!只是简单测试,没有修改

3、启动服务
/usr/local/trafficserver/bin/trafficserver start  //开启
/usr/local/trafficserver/bin/trafficserver stop   //停止

4、测试
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 ])

只是做了一个简单的反向代理,,TS的功能MS很强大,继续研究中.....
http://trafficserver.apache.org/docs/v2/admin/files.htm
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载