Squid Proxy On Solaris
As part of a project I required a proxy which would allow remote users to access serveral internal servers sitting behind our firewall from a single access point. The easiest way of accomplishing this is via a proxy. My first choice of proxy is squid which supports HTTP, HTTPS, FTP and protocols. Used in reverse proxy mode it also alows you to reduce the load on webservers serving dynamic content which is an added bonus. I’m used to building most of my stuff on Redhat Enterprise severs so i found it a bit of a steep learning curve when handed a Solaris 8 SPARC server without even a basic C-complier. I thought i’d document my steps here as a reference for others.
Squid is built in C so without a C compiler i was faced with two options. Build GCC on the solaris box or find a pre-complied Solaris binary for squid. Well i’ve built GCC before an its not a whole heep of fun so I chickened out and went for a squid binary. Here are the steps required.
Pick the OS and Processor from the left hand menu and then find the squid binary.
Download the squid binary package to /opt/temp. Note solaris 8 didn’t have the excellent wget by default so you might need to push it on to the server via ftp.
Use gunzip to extract the package.
gunzip -xf squidfilename.gz
Add the package using pkgadd and follow the instructions.
Squid is installed in /usr/local/squid
In order to run squid you need to give make the logs directory writeable
chmod 665 /usr/local/squid/log
You’ll also need to create a cache dir
Make the directory writeable
chmod 665 /usr/local/squid/cache
Know you need to create the cache filestructure. To do this run squid with the -z option
You can alter the squid settings by editing /usr/local/squid/etc/squid.conf When you’re happy you can know run squid.