Squid on slackware

Place to discuss Slackware
Post Reply
Doogee
administrator
administrator
Posts: 261
Joined: Fri Jan 10, 2003 1:40 am

Squid on slackware

Post by Doogee » Wed Mar 17, 2004 3:50 am

i have set up squid using your squid and adzapper tutorial. how do i actually start the squid daemon, and is it ok for the machine that the proxy is on to be the same as the browser?

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Wed Mar 17, 2004 10:02 am

so you have squid running on your machine just to zap ads for you?
I dont think there is anything wrong with that.

chmod the /etc/rc.d/rc.squid as executable (chmod +x /etc/rc.d/rc.squid) and it should start at startup. Or just run '/etc/rc.d/rc.squid start'

Im not sure but you might have to run squid -z first to create the cache directories

Doogee
administrator
administrator
Posts: 261
Joined: Fri Jan 10, 2003 1:40 am

Post by Doogee » Wed Mar 17, 2004 5:23 pm

i have no /etc/rc.d/rc.squid

Code: Select all

root@dans-computer:/etc/rc.d# ls
rc.0@  rc.M*      rc.atalk         rc.gpm*      rc.inet1.conf  rc.local*    rc.nfsd*    rc.sendmail*  rc.sysvinit*
rc.4*  rc.S*      rc.bind          rc.hotplug*  rc.inet2*      rc.lprng     rc.pcmcia*  rc.serial*    rc.yp*
rc.6*  rc.acpid*  rc.cups          rc.httpd     rc.inetd*      rc.modules*  rc.portmap  rc.sshd*
rc.K*  rc.alsa*   rc.font.sample*  rc.inet1*    rc.ip_forward  rc.mysqld    rc.samba    rc.syslog*

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Thu Mar 18, 2004 8:05 am

well maybe i made one myself, or i am probably running a different version of squid than you. I have 3.0 running.

You can just start squid by running "squid" on the command line as root.

To have it run at startup you should have an /etc/rc.d/rc.squid and then an entry in rc.M that starts that script.

This is what my rc.squid is. Its just a simple script to start/stop/restart the squid server

Code: Select all

#!/bin/sh
#
# Start the Squid proxy server
#

case "$1" in
   'start')
      /usr/sbin/squid start ;;
   'stop')
      /usr/sbin/squid stop ;;
   'restart')
      /usr/sbin/squid restart ;;
   *)
      echo "usage $0 start|stop|restart" ;;
esac
and then in my /etc/rc.d/rc.M on lines 187-191
there is this. Which will look to see if rc.squid is executable and then run it at startup.

Code: Select all

# Start Squid Proxy server
if [ -x /etc/rc.d/rc.squid ]; then
  . /etc/rc.d/rc.squid start
fi

Doogee
administrator
administrator
Posts: 261
Joined: Fri Jan 10, 2003 1:40 am

Post by Doogee » Thu Mar 18, 2004 9:51 am

AWESOME that worked very well.


I like squid :)

Post Reply