亚洲视频二区_亚洲欧洲日本天天堂在线观看_日韩一区二区在线观看_中文字幕不卡一区

公告:魔扣目錄網(wǎng)為廣大站長(zhǎng)提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請(qǐng)做好本站友鏈:【 網(wǎng)站目錄:http://www.430618.com 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會(huì)員:747

/usr/include/bits/typesizes.h

/usr/include/linux/posix_types.h

找到#define __FD_SETSIZE 1024

把1024改為65536

并執(zhí)行

ulimit -Hs 65536

ulimit -n 65536

下載Squid

wget http://www.linuxidc.com/system/systemfiles/2010/6/squid-2.6.STABLE13.tar.gz

解壓

tar zxvf squid-2.6.STABLE13.tar.gz

進(jìn)入目錄

cd squid-2.6.STABLE13

在configure之前先設(shè)置cflags

進(jìn)入http://gentoo-wiki.com/Safe_Cflags

查看機(jī)器所用CPU對(duì)應(yīng)的優(yōu)化參數(shù)

用export設(shè)置

export CHOST="i686-pc-linux-gnu"

export CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

export CXXFLAGS="${CFLAGS}"

開始configure

./configure --prefix=/usr/local/squid --enable-follow-x-forwarded-for --enable-storeio=aufs,ufs --with-maxfd=65536 --with-pthreads --enable-dlmalloc --enable-poll --enable-stacktraces --enable-removal-policies=heap,lru --enable-delay-pools

然后Make

出現(xiàn)

make[1]: Nothing to be done for `all-am'.

make[1]: Leaving directory `/root/squid-2.6.STABLE13'

[root@cnc squid-2.6.STABLE13]#

為Make成功

make install安裝

make[2]: Leaving directory `/root/squid-2.6.STABLE13'

make[1]: Leaving directory `/root/squid-2.6.STABLE13'

[root@cnc squid-2.6.STABLE13]#

結(jié)束

如果出現(xiàn)報(bào)錯(cuò)則需要make clean再重新Make

配置Squid.conf

RM掉Squid.conf

vi squid.conf創(chuàng)建新文件

并把以下內(nèi)容粘貼進(jìn)去

http_port 80 vhost vport=80

acl Apache rep_header Server Apache

broken_vary_encoding allow apache

cache_mem 1024 MB

maximum_object_size 4096 KB

minimum_object_size 0 KB

maximum_object_size_in_memory 256 KB

cache_dir ufs /var/spool/squid 20480 16 256

cache_swap_low 80

cache_swap_high 97

strip_query_terms off

request_body_max_size 5 MB

memory_pools on

memory_pools_limit 50 MB

access_log none

cache_log /var/log/squid/cache.log

cache_store_log none

pid_filename /var/run/squid.pid

hosts_file /etc/hosts

refresh_pattern ftp: 1440 20% 10080

refresh_pattern gopher: 1440 0% 1440

refresh_pattern -i yongchuibuxiu.cn 240 100% 1440 ignore-reload

refresh_pattern -i www.yongchuibuxiu.cn 240 100% 1440 ignore-reload

refresh_pattern -i .gif 180 20% 10080 override-expire ignore-reload reload-into-ims

refresh_pattern -i .jpg 180 20% 10080 override-expire ignore-reload reload-into-ims

refresh_pattern . 120 50% 1440

acl all src 0.0.0.0/0.0.0.0

acl p-manager proto cache_object

acl s-localhost src 127.0.0.1/255.255.255.255

acl d-localhost dst 127.0.0.0/8

acl d-domains dstdomain .6688.cc

acl p-ssl port 443 563

acl p-safe port 80 443 563

acl m-conn method CONNECT

acl m-purge method PURGE

acl n-maxconn maxconn 15

http_access allow p-manager s-localhost

http_access allow m-purge

http_access deny !p-safe

http_access deny m-conn !p-ssl

http_access deny n-maxconn

http_access allow p-manager

http_access allow d-domains

http_access deny all

http_reply_access allow all

acl r-url urlpath_regex realtime

cache deny r-url

icp_access allow all

follow_x_forwarded_for allow all

acl_uses_indirect_client offrange_offset_limit -1

DNS_timeout 2 seconds

forward_timeout 10 seconds

connect_timeout 10 seconds

peer_connect_timeout 6 seconds

read_timeout 10 seconds

request_timeout 6 seconds

persistent_request_timeout 16 seconds

cache_mgr [email protected]

cache_effective_user nobody

cache_effective_group nobody

visible_hostname 6688.cc

logfile_rotate 0

always_direct allow all

error_directory /usr/local/squid/share/errors/Simplify_Chinese

coredump_dir /var/spool/squid

保存退出

設(shè)置文件夾權(quán)限

mkdir /var/log/squid

chown nobody:nobody /var/log/squid

chown nobody:nobody /var/spool/squid

在/usr/local/squid/sbin目錄下運(yùn)行

./squid -z

沒有報(bào)錯(cuò)的話說明目錄創(chuàng)建成功

./squid -Nd 10

讓Squid跑起來

curl -I http://www.6688.cc/

看一下有沒有緩存

沒有的話

X-Cache: MISS from 6688.cc

然后再

curl -I http://www.6688.cc/

ulimit -Hs 65536

ulimit -n 65536

./squid

上面的命令可以讓Squid正式跑起來

編輯/etc/rc.local

在文件最后添加

ulimit -Hs 65536

ulimit -n 65536

/usr/local/squid/sbin/squid

讓Squid隨系統(tǒng)啟動(dòng)

分享到:
標(biāo)簽:CentOS
用戶無頭像

網(wǎng)友整理

注冊(cè)時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會(huì)員

趕快注冊(cè)賬號(hào),推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運(yùn)動(dòng)步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動(dòng)步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績(jī)?cè)u(píng)定2018-06-03

通用課目體育訓(xùn)練成績(jī)?cè)u(píng)定