How-to: Install squid on ubuntu
What is squid?
Squid is a caching proxy of web which supports HTTP, HTTPS, FTP and many more. It can be used to reduce bandwidth (in term reduce the internet bill to some extend ) , improve response time. It has many features like access control. Can also server the purpose of server accelerator.
In this article we will see how to install Squid on Ubuntu 8.04 (desktop edition) and configure some parameters so squid can server as basic proxy.
With Ubuntu 8.04 (desktop edition) squid does not gets installed by default as the purpose of the Ubuntu desktop edition is to setup and use the OS as your desktop.
Now to install squid on your Ubuntu 8.04 box please use the below command which will install squid and it’s decencies
$ sudo apt-get install squid
Once you issue above command it will fetch squid and squid-common package and install them on the system, configure them with defaults and tries to start them, but fails in some cases with the below error:
Preconfiguring packages ...
Selecting previously deselected package squid-common.
(Reading database ... 95877 files and directories currently installed.)
Unpacking squid-common (from .../squid-common_2.6.18-1ubuntu3_all.deb) ...
Selecting previously deselected package squid.
Unpacking squid (from .../squid_2.6.18-1ubuntu3_i386.deb) ...
Setting up squid-common (2.6.18-1ubuntu3) ...
Setting up squid (2.6.18-1ubuntu3) ...
Creating squid spool directory structure
FATAL: Could not determine fully qualified hostname. Please set 'visible_hostname'
Squid Cache (Version 2.6.STABLE18): Terminated abnormally.
Or
Squid Cache (Version 2.6.STABLE18): Terminated abnormally.
CPU Usage: 0.016 seconds = 0.008 user + 0.008 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Aborted
FATAL: Could not determine fully qualified hostname. Please set 'visible_hostname'
Squid Cache (Version 2.6.STABLE18): Terminated abnormally.
CPU Usage: 0.020 seconds = 0.004 user + 0.016 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Aborted
[fail]
The above error means that the hostname is not set properly set.
To resolve the above error you can set value for “visible_hostname” in squid.conf and restart squid with below command.
/etc/init.d/squid start
In the next blog we will see how-to configure basic squid for small office.



Click on image to Enlarge
