squid 编译参数
2009-08-16 11:42
169 查看
下载略
编译安装
# tar -xzf squid-2.6.STABLE13.tar.gz
# cd squid-2.6.STABLE13
# ./configure --with-maxfd=204800 '--enable-async-io' '--with-pthreads' /
'--enable-storeio=ufs,aufs,diskd,null' '--enable-linux-netfilter' '--enable-linux-proxy' '--enable-arp-acl' /
'--enable-epoll' '--enable-removal-policies=lru,heap' '--enable-snmp' '--enable-delay-pools' /
'--enable-htcp' '--enable-cache-digests' '--enable-underscores' '--enable-referer-log' /
'--enable-useragent-log' '--enable-auth=basic,digest,ntlm' '--enable-carp' '--with-large-files' /
'--with-aufs-threads=192'
# make
# make install-strip
redhat 启动脚本 /etc/init.d/squid
修改配置文件 /usr/local/squid/etc/squid.conf
cache_dir /opt/cache/chace1 40000 32 256
建立cache_dir
mkdir /opt/cache/chace1
初始化cache_dir
/usr/local/squid/sbin/squid -z
启动squid
/etc/init.d/squid start
编译安装
# tar -xzf squid-2.6.STABLE13.tar.gz
# cd squid-2.6.STABLE13
# ./configure --with-maxfd=204800 '--enable-async-io' '--with-pthreads' /
'--enable-storeio=ufs,aufs,diskd,null' '--enable-linux-netfilter' '--enable-linux-proxy' '--enable-arp-acl' /
'--enable-epoll' '--enable-removal-policies=lru,heap' '--enable-snmp' '--enable-delay-pools' /
'--enable-htcp' '--enable-cache-digests' '--enable-underscores' '--enable-referer-log' /
'--enable-useragent-log' '--enable-auth=basic,digest,ntlm' '--enable-carp' '--with-large-files' /
'--with-aufs-threads=192'
# make
# make install-strip
redhat 启动脚本 /etc/init.d/squid
#! /bin/bash # # squid Start/Stop the squid caching proxy. # # chkconfig: - 95 05 # description: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. / # It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. / # Squid has extensive access controls and makes a great server accelerator. It runs on Unix and Windows and / # is licensed under the GNU GPL. # processname: squid # Source function library. . /etc/init.d/functions # Source our configuration file for these variables. RETVAL=0 # Set up some common variables before we launch into what might be # considered boilerplate by now. prog=squid path=/usr/local/squid/sbin/squid ulimit -u unlimited ulimit -n 204800 start() { echo -n $"Starting $prog: " pid=`pidofproc $path` if checkpid $pid 2>&1; then failure $"prog startup" echo echo squid is aready running return 1 fi daemon $path RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog return $RETVAL } stop() { maxwait=30 echo -n $"Stopping $prog: " pid=`pidofproc $path` if ! checkpid $pid 2>&1; then failure $"prog startup" echo echo squid is not running return 1 fi for ((i=0;;i++)); do if [ $i -eq "0" ] && checkpid $pid 2>&1; then # "shutdown" is very slowly, so we use "interrup" #$path -k shutdown $path -k interrupt usleep 100000 fi if checkpid $pid 2>&1; then echo -n . else break fi if [ $i -ge "$maxwait" ] && checkpid $pid 2>&1; then $path -k kill usleep 100000 break fi sleep 1 done checkpid $pid RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog [ $RETVAL -eq 0 ] && failure $"prog shutdown" || success $"prog shutdown" echo return $RETVAL } restart() { stop start } reload() { echo -n $"Reloading $prog: " $path -k reconfigure RETVAL=$? if [ $RETVAL -eq 0 ]; then success else failure fi echo return $RETVAL } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; status) status $path ;; condrestart) [ -f /var/lock/subsys/$prog ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" exit 1 esac exit $?
修改配置文件 /usr/local/squid/etc/squid.conf
cache_dir /opt/cache/chace1 40000 32 256
建立cache_dir
mkdir /opt/cache/chace1
初始化cache_dir
/usr/local/squid/sbin/squid -z
启动squid
/etc/init.d/squid start
相关文章推荐
- squid编译参数说明
- squid编译参数说明
- squid编译参数之见
- squid 编译参数说明
- 查看nginx.apache.mysql.php squid 编译参数
- squid编译安装参数说明
- squid3.1.20编译参数
- gtest 1.7编译错误:std:tr1:tuple模板参数过多的解决方案
- PyInstaller编译python3时使用的详细参数介绍
- 轻松获取LAMP,LNMP环境编译参数配置[转载]
- GCC编译中的可选参数
- Flash命令行编译mxmlc参数说明
- 临时变量作为非const的引用进行参数传递引发的编译错误
- PHP编译参数中文版
- 编译安装squid3.1--亲测
- squid 编译安装
- Code::Blocks 编译参数的相关设置
- nginx编译参数输出问题
- 《IOS_作业C语言》高级指针(结构体指针、结构体数组指针、结构体数组指针,作为函数的参数使用、预编译指令)
- [转]Code::Blocks 编译参数的相关设置