Squid Service Startup Script
The Squid service starts with the system. Because it is set up as a production environment, it is still started as a system service. Therefore, you can find a simple STARTUP script on the Internet.
The squid installation path is/usr/local/squid.
#! /Bin/bash #
Chkconfig: 345 61 61
# Description: squid is a web cache server
# Processname: squid
./Etc/rc. d/init. d/functions
Case $1 in
"Start")/usr/local/squid/sbin/squid-s
If [$? = "0"]; then
Echo "squid start OK"
Else
Echo "please check the log"
Fi
;;
"Stop")/usr/local/squid/sbin/squid-k shutdown
If [$? = "0"]; then
Echo "squid stop OK"
Else
Echo "please check the log"
Fi
;;
"Restart ")
/Usr/local/squid/sbin/squid-k shutdown
If [$? = "0"]; then
/Usr/local/squid/sbin/squid-s
If [$? = "0"]; then
Echo "squid restart OK"
Else
/Usr/local/squid/sbin/squid-s
If [$? = "0"]; then
Echo "squid restart OK"
Else
Echo "please check the log"
Fi
Fi
Fi
;;
*)
Echo "Usage only start | stop | restart"
;;
Esac
Put this file in the/etc/init. d/directory and name it squid.
Chmod + x/etc/init. d/squid
Chkconfig -- add squid
If the squid service does not support chkconfig
Then modify the preceding chkconfig: 345 61 61 numbers.
Configure Squid proxy http and rsync
Squid: high-speed Web Access
CentOS 6.2 compilation and installation Squid configuration Reverse Proxy Server
Simple configuration of Squid proxy and reverse proxy
Build high-availability Web servers using DNS + Squid + Nginx + MySQL in CentOS 6.4
Squid details: click here
Squid: click here
This article permanently updates the link address: