What's new

How to setup a squid cache for websites, windows updates, etc?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bamboo

New Around Here
I read this guidefor setting up a squid cache to speed up browsing, and I'd like to do it in rmerlin. How much of the guide is transferrable? I've already installed squid via entware, and pasted the conf in the guide, but past that, it's all greek to me. Can anyone help out? Thanks!
 
Last edited:
Allow me to clarify what problems I'm having. I install squid as per the guide, and edit the conf file appropriately. However, the sticking point seems to be when I attempt to add this "nobody" user. I get no confirmation that any action has taken place.

Code:
grep -q ^nobody /etc/group  || echo "nobody:x:99:" >> /etc/group 
grep -q ^nobody /etc/passwd || echo "nobody:*:99:99:nobody:/var:/bin/false" >> /etc/passwd

results in nothing. Here is a copy of the text

ASUSWRT-Merlin RT-N66U_3.0.0.4 Fri May 9 21:15:50 UTC 2014
admin@RT-N66U:/tmp/home/root# grep -q ^nobody /etc/group || echo "nobody:x:99:" >> /etc/group
admin@RT-N66U:/tmp/home/root# grep -q ^nobody /etc/passwd || echo "nobody:*:99:99:nobody:/var:/bin/false" >> /etc/passwd
admin@RT-N66U:/tmp/home/root#

Just for laughs, I pasted "grep -q ^nobody /etc/group || echo "nobody:x:99:" >> /etc/group
grep -q ^nobody /etc/passwd || echo "nobody:*:99:99:nobody:/var:/bin/false" >> /etc/passwd" into the ssh terminal all together, resulted in the same lack of response (No surprises here).

So lets say that it is creating this "nobody" user and simply isn't giving me any confirmation, here is what happens when I attempt to move onto the next line in the guide, "squid -z"

admin@RT-N66U:/tmp/home/root# squid -z
2014/05/27 22:09:41| WARNING: '127.0.0.1' is a subnetwork of '127.0.0.1'
2014/05/27 22:09:41| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
2014/05/27 22:09:41| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
2014/05/27 22:09:41| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2014/05/27 22:09:41| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2014/05/27 22:09:41| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
2014/05/27 22:09:41| Creating Swap Directories
FATAL: Failed to make swap directory /opt/var/squid/cache: (2) No such file or directory
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
admin@RT-N66U:/tmp/home/root#

This is a little advanced to me, but it seems that I need to edit the conf file?


Then, lets say I was supposed to also ignore this warning and input the next part of the guide, "/opt/etc/init.d/S80squid start" into the terminal, it results in this

admin@RT-N66U:/tmp/home/root# /opt/etc/init.d/S80squid start
-sh: /opt/etc/init.d/S80squid: not found
admin@RT-N66U:/tmp/home/root#



Now, I never expected the guide to be exactly copy and paste, but I'm at a loss for what I should augment to allow this to work on asuswrt-merlin. Any suggestions?
 
Those two commands are simply appending a line to /etc/group and /etc/passwd files if they do not already exist there. Check the files to see if the change was made

cat /etc/group
cat /etc/passwd
 
FATAL: Failed to make swap directory /opt/var/squid/cache: (2) No such file or directory

... There's your problem.

mkdir -p /opt/var/squid/cache

chown -R nobody:nobody /opt/var/squid/cache
chmod 777 /opt/var/squid/cache
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top