2021-05-12 14:32:11
Ubuntu 16.04.1 LTS上安裝ATS 5.3.2
Ubuntu 16.04.1 LTS上安裝ATS 5.3.2過程詳述。
1.安裝依賴包
sudo apt-get install g++ make pkg-config libssl-dev tcl-dev libexpat1-dev libpcre3-dev libmodule-install-perl
sudo apt-get install bison flex
sudo apt-get install bison flex
2.設定編譯和安裝
./configure --prefix=/opt/ats --with-group=nogroup --enable-reclaimable-freelist --enable-debug --enable-experimental-plugins
make -j 4
sudo make install -j 4
3.修改組態檔
records.config檔案
CONFIG proxy.config.http.server_ports STRING 8081
CONFIG proxy.config.http.insert_request_via_str INT 1
CONFIG proxy.config.http.insert_response_via_str INT 2
CONFIG proxy.config.log.squid_log_enabled INT 0
CONFIG proxy.config.log.custom_logs_enabled INT 1
CONFIG proxy.config.log.xml_config_file STRING logs_xml.config
CONFIG proxy.config.diags.show_location INT 1
CONFIG proxy.config.log.max_line_size INT 35000
CONFIG proxy.config.log.log_buffer_size INT 262144
CONFIG proxy.config.core_limit INT -1
remap.config檔案
regex_map http://(.*) http://$1
storage.config檔案
var/trafficserver 100G
cache.config檔案
dest_domain=. suffix=mp4 ttl-in-cache=10d
dest_domain=. suffix=flv4 ttl-in-cache=10d
logs_xml.config檔案
<LogFormat>
<Name = "access"/>
<Format = "%<cqtq> %<ttms> %<pssc> %<sssc> [%<cqtt>] %<{X-Forwarded-For}cqh> "%<cqtx>" %<psql> "%<pqsi>" %<crc>:%<phr> %<{Referer}cqh> "%<{User-Agent}cqh>" %<psct>"/>
</LogFormat>
<LogObject>
<Format = "access"/>
<Filename = "access"/>
</LogObject>
4.更新動態庫
sudo vim /etc/ld.so.conf
在末尾新增上
/opt/ats/libexec/trafficserver
儲存退出後,執行
sudo ldconfig
設定環境變數
使用root身份
su
vim /etc/profile
在末尾新增
export PATH=/opt/ats/bin:$PATH
更新設定
source /etc/profile
使用當前使用者身份
vim ~/.bashrc
在末尾新增C和C++標頭檔案的包含路徑
export C_INCLUDE_PATH=/opt/ats/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/opt/ats/include:$CPLUS_INCLUDE_PATH
更新設定
source ~/.bashrc
5.啟動ats
sudo /opt/ats/bin/trafficserver status
sudo /opt/ats/bin/trafficserver start
ps auxf | grep traffic | grep -v grep
6.測試
curl -vo /dev/null -x 127.0.0.1:18980 'http://news.sohu.com/'
CentOS 6.8 x86_64上安裝ATS 6.2.1過程詳解 http://www.linuxidc.com/Linux/2017-02/141139.htm
本文永久更新連結地址:http://www.linuxidc.com/Linux/2017-02/141142.htm
相關文章