CentOS 6 squid 3.x

CentOS 6 編譯squid 3.x

 

  1. yum -y install gcc make patch gcc-c++ gcc-g77 flex bison autoconf automake 
  2. gpg --keyserver subkeys.pgp.net --recv-key FF5CF463 
  3. wget http://www.squid-cache.org/Versions/v3/3.1/squid-3.1.14.tar.gz 
  4. wget http://www.squid-cache.org/Versions/v3/3.1/squid-3.1.14.tar.gz.asc 
  5. tar xvf squid-3.1.14.tar.gz && cd squid-3.1.14 
  6. gpg --verify squid-3.1.14.tar.gz.asc 
  7. ./configure -prefix=/usr/local/squid -enable-dlmalloc -enable-debug-cbdata -enable-async-io=100
  8.  -with-pthreads-enable-storeio="aufs,coss,diskd,ufs" -enable-removal-policies="heap,lru"
  9.  -enable-icmp -enable-delay-pools -enable-useragent-log -enable-referer-log -disable-wccp\ 
  10.  -disable-wccpv2 -enable-kill-parent-hack -enable-arp-acl -enable-snmp\ 
  11.  -enable-default-err-language=Simplify_Chinese -enable-err-languages="Simplify_Chinese English"
  12.  -disable-poll -enable-epoll -disable-ident-lookups \ 
  13.  -enable-truncate -enable-underscores -enable-basic-auth-helpers="NCSA" -enable-stacktrace\ 
  14.  -with-winbind-auth-challenge -enable-large-cache-files -with-large-files -enable-x-accelerator-var 

 注意:如出現

  1. ip/.libs/libip.a(tools.o): In function `Ip::ProbeTransport()': 
  2. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:69: undefined reference to `Debug::Levels' 
  3. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:69: undefined reference to `Debug::level' 
  4. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:83: undefined reference to `Debug::getDebugOut()' 
  5. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:83: undefined reference to `Debug::finishDebug()' 
  6. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:72: undefined reference to `Debug::Levels' 
  7. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:72: undefined reference to `Debug::level' 
  8. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:59: undefined reference to `Debug::level' 
  9. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:59: undefined reference to `Debug::Levels' 
  10. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:59: undefined reference to `Debug::getDebugOut()' 
  11. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:59: undefined reference to `Debug::finishDebug()' 
  12. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:69: undefined reference to `Debug::getDebugOut()' 
  13. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:69: undefined reference to `Debug::finishDebug()' 
  14. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:72: undefined reference to `Debug::getDebugOut()' 
  15. /usr/src/soft/squid-3.1.14/src/ip/tools.cc:72: undefined reference to `Debug::finishDebug()' 
  16. collect2: ld returned 1 exit status 
  17. make[3]: *** [dnsserver] Error 1 
  18. make[3]: Leaving directory `/usr/src/soft/squid-3.1.14/src' 
  19. make[2]: *** [all-recursive] Error 1 
  20. make[2]: Leaving directory `/usr/src/soft/squid-3.1.14/src' 
  21. make[1]: *** [all] Error 2 
  22. make[1]: Leaving directory `/usr/src/soft/squid-3.1.14/src' 
  23. make: *** [all-recursive] Error 1 
  24. 這樣的錯誤 

 請去掉./configure中的-disable-internal-dns

參考資料:

http://hi.baidu.com/billdkj/blog/item/05da07f49af379d1f2d38599.html

http://blog.csdn.net/chcn00/article/details/5694195

http://bbs.chinaunix.net/thread-3571378-1-1.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章