الجمعة، 17 سبتمبر 2010

Install and configure Squid with config template and video tutorial

Squid is a proxy server and web cache daemon. It has a wide variety of uses, from speeding up a web server by caching repeated requests, to caching web, DNS and other computer network lookups for a group of people sharing network resources, to aiding security by filtering traffic. Although primarily used for HTTP and FTP, Squid includes limited support for several other protocols including TLS, SSL, Internet Gopher and HTTPS. The development version of Squid (3.1) includes IPv6 and ICAP support.

Now, we install Squid 3.1 in our OS.

- If you are currenty using Debian run apitude:
sudo apr-get install squid3


- If you are currenty using FreeBSD run Ports:
ports/www/squid31/ 
make && make install && clean


- If you are currenty using Gentoo run Emerge:
emerge squid3


For installing Squid from RPM if you are using CentOS, Fedora, RedHat..
64Bit:
http://people.redhat.com/jskala/squid/squid-3.0.STABLE16-1.el5/x86_64/squid-3.0.STABLE16-1.el5.x86_64.rpm

32Bit:
http://people.redhat.com/jskala/squid/squid-3.0.STABLE16-1.el5/i386/squid-3.0.STABLE16-1.el5.i386.rpm


After installing Squid, we need to configure it..

All of require is in /etc/squid/ so open squid.conf

- Frist, we do change the standard port of Squid, 3128 will be change in a different port (i use 8888). Do not forget to open the port in your firewall!!
- Add all IPs of the server (or only the ip that you need/want to use squid)
- Add ACL of users
- Add User
- Done, just to test it.

nano /etc/squid/squid.conf


For add user will do generate password from htpasswd.

root@st [/etc/squid]# htpasswd -n admin
admin:cpDjhqGda7kv


(if you are using cpanel, maybe htpasswd don't run in squid directory so you do fix that problem with "symbolic link")
root@st [/etc/squid]# ln -s /home/cpeasyapache/src/httpd-2.2.13/support/.libs/htpasswd /bin/htpasswd


After generate the password of user add in /etc/squid/passwd file.

After everyting config change or add users, restart squid.

service squid restart



I let you download my configuration of Squid in the Attachment
Attached File  Config-Squid.zip (103.72K)
Number of downloads: 7

In the Attachement there are also a Video Tutorial that let you learn more about caching proxy.
http://mirror1.rv89.net/video/Squid-Proxy.avi

ليست هناك تعليقات:

إرسال تعليق