Squid Service Startup Script

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.