Inidian

Ubuntu Lusca Setup

Dec 30th, 2012
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. sudo apt-get install gcc build-essential sharutils ccze libzip-dev automake1.9 discus htop perl iftop libgd-gd2-perl squid-cgi
  2.  
  3. wget https://lusca-cache.googlecode.com/files/LUSCA_HEAD-r14809.tar.gz
  4.  
  5. tar zxvf LUSCA_HEAD-r14809.tar.gz
  6.  
  7. cd LUSCA_HEAD-r14809
  8.  
  9. wget https://dl.dropboxusercontent.com/u/52635849/Squid%20Stuff/LuscaPatch.tar.gz
  10. wget https://db.tt/1ry9H91P
  11.  
  12. patch -p0 < 3xx\ loop.diff
  13. patch -p0 < ignore-must-revalidate.diff
  14. patch -p2 < keblux-lusca-gzip.patch
  15. patch -p2 < lusca-headers-normalization.patch
  16.  
  17. patch -p0 < 3xx-loop.diff
  18. patch -p0 < async-issue.diff
  19. patch -p0 < http-gzip.diff
  20. patch -p0 < ignore-must-revalidate.diff
  21. patch -p0 < improve-nn-parser.diff
  22. patch -p0 < lusca-vary.diff
  23. patch -p0 < segmentation-fault.diff
  24. patch -p2 < lusca-headers-normalization.patch
  25.  
  26.  
  27. su
  28.  
  29. ./bootstrap.sh
  30.  
  31. ./configure \
  32. --prefix=/usr \
  33. --exec_prefix=/usr \
  34. --bindir=/usr/bin \
  35. --sbindir=/usr/sbin \
  36. --libexecdir=/usr/lib/squid \
  37. --sysconfdir=/etc/squid \
  38. --localstatedir=/var/spool/squid \
  39. --datadir=/usr/share/squid \
  40. --enable-http-gzip \
  41. --enable-async-io=24 \
  42. --with-aufs-threads=24 \
  43. --with-pthreads \
  44. --enable-storeio=aufs \
  45. --enable-linux-netfilter \
  46. --enable-arp-acl \
  47. --enable-epoll \
  48. --enable-removal-policies=heap,lru \
  49. --with-aio \
  50. --with-dl \
  51. --enable-http-violations \
  52. --enable-snmp \
  53. --enable-delay-pools \
  54. --enable-htcp \
  55. --enable-cache-digests \
  56. --disable-unlinkd \
  57. --enable-large-cache-files \
  58. --with-large-files \
  59. --enable-err-languages=English \
  60. --enable-default-err-language=English \
  61. --with-maxfd=65536
  62.  
  63.  
  64. ./configure \
  65. --prefix=/usr \
  66. --exec_prefix=/usr \
  67. --bindir=/usr/bin \
  68. --sbindir=/usr/sbin \
  69. --libexecdir=/usr/lib/squid \
  70. --sysconfdir=/etc/squid \
  71. --localstatedir=/var/spool/squid \
  72. --datadir=/usr/share/squid \
  73. --enable-http-gzip \
  74. --enable-async-io=24 \
  75. --with-aufs-threads=24 \
  76. --with-pthreads \
  77. --enable-storeio=aufs,coss \
  78. --enable-linux-netfilter \
  79. --enable-arp-acl \
  80. --enable-epoll \
  81. --enable-removal-policies=heap,lru \
  82. --with-aio \
  83. --with-dl \
  84. --enable-snmp \
  85. --enable-delay-pools \
  86. --enable-htcp \
  87. --enable-cache-digests \
  88. --disable-unlinkd \
  89. --enable-large-cache-files \
  90. --with-large-files \
  91. --enable-err-languages=English \
  92. --enable-default-err-language=English \
  93. --disable-wccp \
  94. --enable-x-accelerator-vary \
  95. --enable-kill-parent-hack \
  96. --enable-async-io=30 \
  97. --disable-ident-lookups \
  98. --with-maxfd=65536
  99.  
  100. make && make install
  101.  
  102. exit
  103.  
  104. sudo mkdir /cache && sudo mkdir /var/log/squid
  105.  
  106. sudo adduser squid
  107.  
  108. sudo chown squid /cache && sudo chown squid /var/log/squid
  109.  
  110. #Copy Config file to /etc/squid
  111.  
  112. run
  113. sudo squid -z
  114.  
  115. #Edit
  116. sudo nano /etc/security/limits.conf
  117.  
  118. #and add:
  119.  
  120. #Manual Add
  121. * soft nofile 65535
  122. * hard nofile 65535
  123.  
  124. sudo update-rc.d squid defaults
  125.  
  126.  
  127. ######################
  128.  
  129. sudo nano /etc/grub.d/00_header
  130.  
  131. #Change set timeout=-1 @ /etc/grub.d/00_header at line 233 to set timeout=0
  132.  
  133. sudo update-grub
  134.  
  135. #####################################
  136. I changed my /etc/grub.d/00_header and edited the recordfail section to:
  137.  
  138. if [ \${recordfail} = 1 ]; then
  139. set timeout=${GRUB_TIMEOUT}
  140. else
  141. set timeout=${GRUB_TIMEOUT}
  142. fi
  143. EOF
  144.  
  145. Ran sudo update-grub, rebooted and it booted straight into Ubuntu. Yipee!
  146.  
  147. #####################################
  148.  
  149. sudo nano /etc/default/rcS
  150.  
  151. change UTC=yes to UTC=no
  152.  
  153.  
  154. wget https://dl.dropboxusercontent.com/u/52635849/Lightsquid.rar
  155.  
  156. paste on /var/www/ls
  157. sudo chown +x /var/www/ls/*.cgi
  158. sudo chown +x /var/www/ls/*.pl
  159.  
  160. sudo nano /etc/apache2/httpd.conf
  161.  
  162. <Directory "/var/www/html/lightsquid">
  163. AddHandler cgi-script .cgi
  164. AllowOverride All
  165. </Directory>
  166.  
  167. sudo shutdown -r now
Advertisement
Add Comment
Please, Sign In to add comment