Squid Proxy On Solaris

August 23rd, 2007

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

del.icio.us Digg Furl Reddit Ma.gnolia RawSugar Shadows Spurl StumbleUpon Tailrank Technorati

Tags: Server Side

RSS feed | Trackback URI

2 Comments »

Comment by Solaris Complie issues
2007-11-06 18:16:58

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

Comment by admin
2008-01-15 11:01:53

The config i used worked fine with SSL. Maybe check that openSSL is installed and setup correctly?

 
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment.

Article Categories

Recent Articles

Resources

Feeds

Blog Rush


Clicky Web Analytics