You are on page 1of 5

Squid Server Installation & Configuration Base Operating System Installation CentOS or RedHat Enterprise Linux For Installing

any linux distro we need minimum 2 partions; but we can make more partions according to our need. / partition is the root partion which is ext3 or ext4 related with the distro we -are using; we can give maximum space for / partition. /boot Boot loader (The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.) /tmp Partion is the temperory partion used for storing temp files. Swap Partition is the virtual memmory; must be twice the size of system -memory(RAM). Installaion Step You will get detailed installation instruction from the below given website http://www.howtoforge.com/installation-guide-centos5.1-desktop Installation of SQUID Proxy Server Installation of packages in CentOS or RHEL is done by the help of (YUM) YUM - Yum (short for Yellow Dog Update Manager) is a package manager for Yellow Dog and a few other Linux distributions. It is used to install, update, and remove programs. We can create local YUM Repository as below Step1: Copy packages from CD or DVD which come along with Distro. CentOS package resides in CentOS folder inside CD Copy packages --> make a folder named Package in / cd /Package -> Enter rpm -ivh createrepo* -> Enter cd -> Enter createrepo -v /Package -> Enter Step2: Create a yum repo on /etc/yum.repos.d gedit /etc/yum.repos.d/a.repo a.repo file contains the following lines [YumServer] name=Packages baseurl=file:///Package/ enabled=1 gpgcheck=0 yum clean all -> Enter yum update -> Enter

Step3: Install Squid on Server yum install squid Step4: Start the squid Service service squid start service squid restart Step5: Permanently on the squid service chkconfig squid on step5: Configuration and Customisation of squid configuration file Squid configuration file resides in /etc/squid/squid.conf. This is the main confiuration file for squid. We can give specific rules for squid server by using this file. Before editing the configuration file you must take the backup of default configuration file of squid by using the following command cp /etc/squid/squid.conf /etc/squid/squid.conf_back For editing the configuration file gedit /etc/squid/squid.conf Squid will block all the trafic by default The default configuration for squid is to only allow connections from the localhost. We still need a way for us to connect externally. For that, we will add an acl that will prompt us for a password and if we're authenticated it will let us in. We'll add it right before the "deny all" portion in squid.conf file. Authentication for Squid using NCSA Authentication; authenticated by username & password First create a NCSA password file using htpasswd command. htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of squid users. htpasswd /etc/squid/passwd user1 Output: New password: Re-type new password: Adding password for user user1 Make sure squid can read passwd file: chmod o+r /etc/squid/passwd

Step 2: Locate nsca_auth authentication helper Usually nsca_auth is located at /usr/lib/squid/ncsa_auth. You can find out location using rpm (Redhat,CentOS,Fedora) or dpkg (Debian and Ubuntu) command: dpkg -L squid | grep ncsa_auth Output: /usr/lib/squid/ncsa_auth If you are using RHEL/CentOS/Fedora Core or RPM based distro try: rpm -ql squid | grep ncsa_auth Output: /usr/lib/squid/ncsa_auth Step #3: Configure nsca_auth for squid proxy authentication Now open /etc/squid/squid.conf file # vi /etc/squid/squid.conf Append (or modify) following configration directive: auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours auth_param basic casesensitive off Also find out your ACL section and append/modify acl ncsa_users proxy_auth REQUIRED http_access allow ncsa_users Save and close the file.

1. Install Media The install media(s) are available at http://isoredirect.centos.org/. 2.Installation Hit "Enter" to start the installation.

Partitioning of file system

You might also like