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.
how enable squid service automatically
how enable squid service automatically
Shahid Mahmood
0321-4538113
i am crazy to learn linux
0321-4538113
i am crazy to learn linux
what does that mean?i yet execute scripts for enabling service commands for it.
Code: Select all
/usr/lcoal/squid/sbin/squid -D
what does that mean? what, exactly, happened when you rebooted the system?but it is not functional.
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"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
why do you need to do that?i use -D to disable DNS test.
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"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
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
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
-
- Battalion Havaldaar Major
- Posts: 269
- Joined: Sat Dec 13, 2003 3:58 pm
- Location: Faisalabad
- Contact:
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
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
Cell: +92.300.8653568
UAN: 041-111432432
Nexlinx Faisalabad
www.nexlinx.net.pk
nafees29@gmail.com
-
- Battalion Havaldaar Major
- Posts: 269
- Joined: Sat Dec 13, 2003 3:58 pm
- Location: Faisalabad
- Contact:
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
Cell: +92.300.8653568
UAN: 041-111432432
Nexlinx Faisalabad
www.nexlinx.net.pk
nafees29@gmail.com