Acknowledgments
Ashwin Tumma
March 2011
Contents
1 Introduction
1.1 Squid: Proxy Server and Web Cache Daemon .
1.1.1 Why use Squid? . . . . . . . . . . . . . .
1.1.1.1 For ISPs . . . . . . . . . . . . .
1.1.1.2 For Websites . . . . . . . . . .
1.1.1.3 For Content Delivery Providers
1.2 About the Tool . . . . . . . . . . . . . . . . . .
1.3 Organization of this User Manual . . . . . . . .
.
.
.
.
.
.
.
1
1
1
1
2
2
2
2
3
3
3
3
3 Requirements
3.1 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
5
5
6
6
6
7
7
7
8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5 Future Enhancements
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ii
List of Figures
1.1
Squid Logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1
Ubuntu Logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1
4.2
4.3
4.4
4.5
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
6
7
7
8
8
of
of
of
of
of
iii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Chapter 1
Introduction
1.1
1.1.1
The developers of HTTP identified early on that there was going to be exporential growth
in content and, concerned with distribution mechanisms, added powerful caching primitives. These primtives allow content developers and distributions to hint to servers and
end-user applications how content should be validated, revalidated and cached. This had
the effect of dramatically reducing the amount of bandwidth required to serve content
and improved user response time.
Squid is one of the projects which grew out of the initial content distribution and
caching work in the mid-90s. It has grown to include extra features such as powerful access
control, authorization, logging, content distribution/replication, traffic management and
shaping and more.
1.1.1.1
For ISPs
Save on bandwidth, improve user performance Squid allows Internet Providers to save on
their bandwidth through content caching. Cached content means data is served locally
and users will see this through faster download speeds with frequently-used content.
1.1.1.2
For Websites
Scale your application, without massice investment in hardware and development time
Squid is one of the oldest content accelerators, used by thousands of websites around the
world to ease the load on their servers. Frequently-seen content is cached by Squid and
served to the client with only a fraction of the application server load needed normally.
Setting up an accelerator in front of an existing website is almosr always a quick and
simple task with immediate benefits.
1.1.1.3
Distribute your content worldwide Squid makes it easy for content distributors and
streaming media developers to distribute content worldwide. CDN providers can buy
cheap hardware running squid and deploy in strategic locations around the internet to
serve enormous amounts of data cheaply and efficiently.
1.2
The tool is developed for assisting novice users to install and configure Squid through a
Graphical User Interface. The details of the tool are:
Developed By: Ashwin Tumma, 2011
Programming Language: Python [3] and Tkinter [2]
Deployment Platform: GNU/Linux [6]
License: GNU GPL version 2 [1]
I have taken utmost care of explaining the source codes by means of comments. The
user is adviced to go through the comments in the shell scripts and other codes before
proceeding with the installations. We have tried our best to explain the esoteric concepts
in a lucid manner and hope this will assist users to gain a clear understanding of the
entire installation procedure.
Certain pre-requiste softwares are also required for the execution of this tool. Complete details of such softwares are explained in the initial chapters which is followed by
the User Manual and Future Enhancements that can be added to this tool.
1.3
Chapter 2
Installing Linux on x86 Machines
2.1
Why Linux?
Linux refers to the family of Unix-like computer operating systems using the Linux Kernel.
Linux can be installed on a wide variety of computer hardware, ranging from mobile
phones, tablet computers and video grame consoles, to mainframes and supercomputers.
It is a leading server operating system.
The development of Linux is one of the most prominent examples of free and open
source software collaboration, typically all the underlying source code can be used,
freely modified, and redistributed, both commercially and non-commercially, by
anyone under licenses such as the GNU General Public License.[1]
2.2
Ubuntu
We have used the Linux distribution which is most popular in the student community,
Ubuntu. Since it supports Debain packages on it, installation and configuration of any
new software is comparitively easy on Ubuntu machines.
2.2.1
Ubuntu can be obtained freely from Official Ubuntu website[6]. The version that we
have chosen for our work is Ubuntu 10.04 - Lucid Lynx. CD/DVD can be obtained
or an image of the installation disk can be downloaded.
3
Insert the CD/DVD in the CD-ROM drive of the system and reboot the system.
The machine will automatically boot from CD or can be made to do so by chosing
appropriate options from the BIOS.
Select the language of installation. E.g.: English
Select the keyboard layout of your machine. E.g.: English[US]
You can allocate the entire disk space to Ubuntu or choose to specify partitions
manually.
If you chose to specify partitions manually, then you need to allocate space of root
directory and swap area. You can also allocate space for other partitions like /boot
and /home.
You be prompted for creation of an administrative account and other trivial details.
Click on Start Installation.
After installation procedure is complete, you need to remove the CD/DVD from
the CD-ROM drive and restart your machine.
You can now login with your administrative account. If required, create other users.
The above steps are lucidly explained at [5].
Chapter 3
Requirements
Following are the pre-requisites for the tool.
3.1
Software Requirements
3.2
Hardware Requirements
x86 Machine
RAM Requirements - min 1GB
Chapter 4
User Manual: Graphical User
Interface for Squid Installation and
Configuration
This chapter is the User Manual for the tool.
4.1
Assumptions
The user is able to run shell scripts at the terminal as a sudo user.
The server has access to Internet Connection for downloading various packages.
4.2
The tool can be launched by going to the SquidGUI directory and then entering the
following command:
sudo python Squid.py
This will launch the tool 1 , as shown in Fig. 4.1.
Provided you have all the pre-requisite softwares installed, i.e. Python and Python-Tk libraries
4.3
Install Squid
This option lets you install Squid on your machine. On clicking, Install Squid button, a
shell script will be invoked in the background, and will install Squid on your machine.
If all the things go well, then Squid will be installed sucessfully and a corresponding
message box is shown to show the status of the installation of Squid. Fig. 4.2 shows
the screenshot when Squid has been successfully installed. If there is any error in the
installation process, then corresponding message pops up, and the user is advised to go
through the error log at /var/log/messages, to get a precise description of the error.
4.4
Configuring Squid
To configure Squid as per your needs, the user needs to click on Configure Squid button.
On clicking the button, the screen shown in Fig. 4.3 is shown where the user needs to enter
the Hostname and Port Number on which Squid will run. On clicking the Configure Squid
button, the shell script that configures Squid is invoked. These parameters will be taken
as input and are entered in the appropriate configuration file. Status of configuration is
also shown corresponding to the success or failure.
4.5
Starting Squid
Squid can be started by clicking the Start Squid button. If Squid is configured properly,
then on clicking the button, Squid will start running as a daemon process and an appropriate message box is shown on the screen as shown in Fig. 4.4 The corresponding
7
process id is also shown on the terminal. If there is any error whilst starting Squid, then
an error message is displayed, the screenshot is shown in Fig. 4.5
4.6
Chapter 5
Future Enhancements
This chapter gives a glimpse of some of the enhancements that can be employed in the
tool in near future. They are as follows:
I have not focused on the aesthetic beauty of the tool. Various colour combinations
can be added to make an aesthetically pleasing tool.
The tool currently only configures Squid, it can be further extended to set various
rules and other configurations like restricted sitesto Squid.
1
Bibliography
[1] GNU General Public License. www.gnu.org/licenses/gpl.html.
[2] Introduction to tkinter. http://www.pythonware.com/library/tkinter/introduction/.
[3] Official website of python. http://www.python.org/.
[4] Official website of squid. http://www.squid-cache.org/.
[5] Steps for installing Ubuntu. http://www.ubuntu.com/server/get-ubuntu/download.
[6] Ubuntu Version used : 10.04 - Lucid Lynx. http://www.ubuntu.com/.
10