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.

Goto www.sunfreeware.com

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.
pkgadd squidfilename

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
mkdir /usr/local/squid/cache

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
./usr/local/squid/bin/squid -z

You can alter the squid settings by editing /usr/local/squid/etc/squid.conf When you’re happy you can know run squid.
./usr/local/squid/bin/squid

3 Responses to Squid Proxy On Solaris

  1. Solaris Complie issues

    Were you able to implement SSL? When I config it using the standard verbage in squid.conf I get errors that it doesn’t know how to handle SSL. I too am using the binary from sunfreeware

  2. Hi,

    I’m Vignesh from Chennai. I like to take up my career in Solaris. Currently working in Windows.May I get the websites where i can learn the basics.

    Thanks,

    Vignesh.K
    +919994448081

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Go back to top