how enable squid service automatically

Taking care of your Linux box.

how enable squid service automatically

Postby smk08 » Mon Jun 01, 2009 7:13 am

Asslamu Alaikum

i am using squid 2.7 after compiling it through source code. i yet execute scripts for enabling service commands for it. i put the following command to /etc/rc.local to start squid automatically.

/usr/lcoal/squid/sbin/squid -D


but it is not functional.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

Postby lambda » Mon Jun 01, 2009 8:52 am

i yet execute scripts for enabling service commands for it.
what does that mean?

Code: Select all

/usr/lcoal/squid/sbin/squid -D
why did you use -D?
but it is not functional.
what does that mean? what, exactly, happened when you rebooted the system?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Postby smk08 » Mon Jun 01, 2009 2:00 pm

Asslamu Alaikum

i use -D to disable DNS test.




Jazaku Mullah
Shahid Mahmood

0321-4538113

i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

Postby lambda » Mon Jun 01, 2009 3:40 pm

i use -D to disable DNS test.
why do you need to do that?

where're the answers to my other questions?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Postby ajt74 » Tue Jun 02, 2009 7:02 am

1. Make init.d or rc.d script executable
2. If you are running Debian then use
root@skx:~# update-rc.d squid defaults

For any other distribution search the net

Cheers
"With faith, discipline and selfless devotion to duty, there is nothing worthwhile that you cannot achieve." - -- Muhammad Ali Jinnah
ajt74
Cadet
 
Posts: 13
Joined: Wed Mar 28, 2007 1:39 pm
Location: Christchurch, New Zealand

Postby nasacis » Thu Aug 06, 2009 4:59 pm

use startup script to start squid automatically when your linux box startup.
create file /etc/rc.d/init.d and change mode 755 and make soft link to appropriate run level
like
ln -s /etc/rc.d/init.d/squid /etc/rc.d/rc3.d/S93squid
S mean start
93 is prority

regards

#!/bin/sh
#
# Basic startup script for Squid
#
case "$1" in
start)
echo "Starting Squid"
/usr/local/squid/bin/RunCache > /dev/null 2>&1 &
;;
stop)
echo "Shutting down Squid"
/usr/bin/killall -q RunCache
/usr/local/squid/sbin/squid -k shutdown
;;
restart)
echo "Restarting Squid"
/usr/local/squid/sbin/squid -k reconfigure
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit 0
Nafees Ahmed
Cell: +92.300.8653568
UAN: 041-111432432
Nexlinx Faisalabad
www.nexlinx.net.pk
nafees29@gmail.com
nasacis
Battalion Havaldaar Major
 
Posts: 269
Joined: Sat Dec 13, 2003 3:58 pm
ICQ: 22342780
Website: http://www.homepages.com.pk/nafeesahmed
WLM: nafees21
Yahoo Messenger: n_ahmad.rm
Location: Faisalabad

Postby nasacis » Thu Aug 06, 2009 5:00 pm

change path according to your squid installation in startup script
Nafees Ahmed

Cell: +92.300.8653568

UAN: 041-111432432

Nexlinx Faisalabad

www.nexlinx.net.pk

nafees29@gmail.com
nasacis
Battalion Havaldaar Major
 
Posts: 269
Joined: Sat Dec 13, 2003 3:58 pm
ICQ: 22342780
Website: http://www.homepages.com.pk/nafeesahmed
WLM: nafees21
Yahoo Messenger: n_ahmad.rm
Location: Faisalabad


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 0 guests

cron