Difference between revisions of "Squid 2.7 Compile Debian Lenny"
From MS Computech
Line 84: | Line 84: | ||
ตรวจสอบโดยใช้คำสั่ง ps ax | grep squid | ตรวจสอบโดยใช้คำสั่ง ps ax | grep squid | ||
<pre> | <pre> | ||
− | + | [root@system squid]# ps ax | grep squid | |
− | + | 29451 ? Ss 0:00 squid -D | |
− | + | 29453 ? Sl 0:00 (squid) -D | |
− | + | 29455 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | |
− | + | 29456 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | |
− | + | 29457 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | |
− | + | 29458 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | |
− | + | 29459 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | |
− | + | 29460 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | |
+ | 29461 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29462 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29463 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29464 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29465 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29466 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29467 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29468 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29469 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl | ||
+ | 29500 pts/1 S+ 0:00 grep squid | ||
+ | |||
</pre> | </pre> |
Revision as of 19:34, 22 September 2009
Squid 2.7STABLE7 Compile on ClarkConnect 4.3,5.0 & Debian Lenny
ดาวโหลด Package ที่จำเป็น Debian
apt-get install build-essential libkrb5-dev wget -c http://www.squid-cache.org/Versions/v2/2.7/squid-2.7.STABLE7.tar.gz
Clarkconnect 5
yum -y install gcc-c++ krb5-devel
แตกไฟล์ออกมาซะ
tar jxvf squid-2.7.STABLE7.tar.bz2 cd squid-2.7.STABLE7
คอมไพล์ด้วยคำสั่ง
./configure '--build=phat-mscompute' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/sbin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib/squid' '--sysconfdir=/etc/squid' '--localstatedir=/var/spool/squid' '--datadir=/usr/share/squid' '--enable-async-io' '--with-pthreads' '--enable-storeio=ufs,aufs,coss,diskd,null' '--enable-linux-netfilter' '--enable-arp-acl' '--enable-epoll' '--enable-removal-policies=lru,heap' '--enable-snmp' '--enable-delay-pools' '--enable-htcp' '--enable-cache-digests' '--enable-referer-log' '--enable-useragent-log' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-carp' '--enable-follow-x-forwarded-for' '--with-large-files' '--with-maxfd=65536' 'i386-debian-linux' 'build_alias=i386-debian-linux' 'host_alias=i386-debian-linux' 'target_alias=i386-debian-linux' make && make install
สร้าง User Squid
useradd squid
สร้าง Cache Dir
chown -R squid:squid /var/spool/squid/ mkdir /var/log/squid chown -R squid:squid /var/log/squid/
ดาวโหลด Squid Config
http://rapidshare.com/files/281859866/squid-config_mscompute-2009-09-19.tar.bz2
แตกและนำไปไว้ที่ /etc/squid/
tar jxvf squid-2.7.config.tar.bz2 cd squid* cp * /etc/squid/ chmod 755 /etc/squid/store_url_rewrite
Copy Startup script ไปที่ /etc/init.d/
cp /etc/squid/squid-init.d /etc/init.d/squid update-rc.d squid defaults chmod 755 /etc/init.d/squid cd /etc/squid ln -s /usr/share/system/modules/squid/redirect errors ln -s /usr/share/squid/icons icons nano /usr/sbin/clearcachesquid
echo " ##################################### " echo " ######## Stop Squid Service ######### " echo " ##################################### " /etc/init.d/squid stop echo " ##################################### " echo " ###### Delete spool directory ####### " echo " ##################################### " rm -rfv /var/spool/squid/ echo " ##################################### " echo " ########## Finish ########## " echo " ###### Create cache directory ####### " echo " ##################################### " mkdir -p /var/spool/squid chown squid:squid /var/spool/squid/ chmod 777 /var/spool/squid/ squid -z echo " ##################################### " echo " ########## Startting squid ########## " echo " ##################################### " /etc/init.d/squid start
chmod 755 /usr/sbin/clearcachesquid clearcachesquid
ตรวจสอบโดยใช้คำสั่ง ps ax | grep squid
[root@system squid]# ps ax | grep squid 29451 ? Ss 0:00 squid -D 29453 ? Sl 0:00 (squid) -D 29455 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29456 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29457 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29458 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29459 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29460 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29461 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29462 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29463 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29464 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29465 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29466 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29467 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29468 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29469 ? S 0:00 /usr/bin/perl /etc/squid/store_url_rewrite.pl 29500 pts/1 S+ 0:00 grep squid