Am using ubuntu 12.04 server edition for this purpose.Squid is a full-featured web proxy cache server application which provides proxy and cache services for HTTP..
Installation
sudo apt-get install squid3
Configuration
Squid is configured by editing the directives contained within the /etc/squid3/squid.conf
configuration file.First make a backup copy of the squid.conf file..Copy the /etc/squid3/squid.conf
file and protect it from writing with the following commands entered at a terminal prompt
sudo cp /etc/squid3/squid.conf /etc/squid3/squid.conf.original sudo chmod a-w /etc/squid3/squid.conf.original
By default squid listens to default TCP port 3128..we can change the port by editing the squid.conf file…
sud vim /etc/squid3/squid.conf
search for http_port…change the http_port directive as you wish am changing it to 8888
http_port 8888
After changing the settings restart squid..For restarting we can use both these commands
sudo /etc/init.d/squid3 restart or sudo service squid3 restart