Squid Savings Mac OS
Tag
After integrating squid 2.7 stable to squidman, now I want to extend the squid functionality. That is to cache dynamic content, such as flash multimedia files from youtube video, amazon, metacafe and other similar sites. And also for static files, picture,jpg.bmp.gif.png, music.mp3.m4a, document.pdf.txt.doc, archive.zip.gz,. I have installed and configured squid in MAC OS X lion. It is working fine (when running./squid it is not returning error) but not sure is it caching the content or not. My target is to setup PROXY CACHE in my local MAC system so that the web documents are returned from the proxy cache. My basic configuration is as follows. Take digital handwritten notes for class, work, or fun with Squid on your Android or Chromebook! Markup PDFs, sign documents, & more. H ow do I clear squid cache? How do I re-create the cache directories on a server where Squid version 3.x/4.x is currently running in Linux or Unix based server? You can delete/clear cache and re-create the cache directories on a server using the following procedure. SQUID Manager is a free dedicated application that enables you to quickly import/export sequence patterns between the SQUID and a PC/Mac. Reaching out into your setup, the SQUID simultaneously controls up to 16 instruments with its master pulse.
Cache, Caching, How To, Internet, Mac OS, Squid, Tips, Tricks, Tutorial
I have some problems at first when installing this Squid 2.7 stable 9 on Mac OS. I will try to explain this as I remember, later 🙂
What do we need?
- XCode
I use XCode 3.2 came from Mac OS DVD Installer. Basically we just need to be able compiling the source. That’s all. Without error of course. As long as the compiler works that’s fine.
After installing XCode, I remove some unnecessary files to reduce the space. So it’s just take about 850 Mb on my Developer folder.
- squid 2.7 stable 9 http://www.squid-cache.org/
The reason I pick the 2.7 version because I need the store_url feature. As I know, we can easier install squidman but they don’t have the 2.7 version. We may go to squidman 3.0/3.1 and set the ICAP, but I’m no squid expert and setting ICAP seem more complicated (see http://squid-web-proxy-cache.1019090.n4.nabble.com/Youtube-dynamic-content-caching-with-squid-3-2-DONE-td4655311.html).
Okay, now we go to compiling part. Here some references you may want to check:
- okomestudio.net/biboroku/?p=816
Extract the squid source code archive somewhere, and go to that folder. At first I configure it, I use this code:
but then squid won’t cache anything. No Hits, no increase on cache folder size. I guess it’s permission issue, but all of my chmod “jutsu” didn’t make any difference.
Then I wonder why squidman work fine. So I change the code to this:
I need to say thanks to Tony Gray at http://squidman.net/squidman/ for the quick reply 🙂
There is no –disable-ipv6 option on squid 2.7 but compile still work anyway with that command.
Then run this command:
Squid will installed to /usr/local/squid/
Edit squid configuration file
And edit as you want 🙂 Okay, here my squid.conf as reference:
Save that files. Now we need to create the cache folder, if you follow my setting we will create squid cache folder on our user cache library, for me it’s /Users/nawaikhsan/Library/Caches/squid/, change to your user path. I did this because I will use squidman later, and use the same folder for this.
Squid will create cache folder on that path above. If you do like I did, these folder will be owned by you(user):wheel. If not, change the ownership to your user:wheel
In theory, if you change the owner to nobody:nobody squid will happily accept it. But because squidman use that above ownership, so I’ll stick to that.
Now we can run squid.
Use this command if you want to run squid in background. There will be two squid process.
And if you want to see what’s happen with squid in front of your eyes you can use this:
Please note I don’t run squid as root, and it’s work fine here.
To quit squid on background use:
and for the later, you can use ctrl+c.
Check if squid really cache something.
There maybe various way to check squid cache.
- You may look in to squid cache.log and see if there is hit at there.
- Or you can check store.log and read the log, except for the ffffffff (memory) that should be your cached files.
- You can also use squidclient, this will give some squid summary info.
- The last one, the simplest and my favorite, we can just check the folder size. This may won’t give you lot info, but it does what I need.
Now, everything should work. I do not recommend you to load squid at startup because I will use squidman for the manager. This will be worthy if you had a problem with some site, like dynamic content caching.
I will post about integrating it with squidman in next post. If you had any question, you can post any comment below. And if you like these post consider to click the share button. Thanks for reading!
Credit: squid-cache.org, Tony Gray, okemestudio.net, maxpowerindustries.com, aacable.wordpress.com, th30nly@comstuff.net
Squid Savings Mac Os Catalina
Next: Integrating squid with squidman
Squid Savings Mac OS