Running, Testing and Stopping Squid

A. Running Squid

1. If installation squid done using RPM, than running squid is very easy. Do the following command:

service squid start
or
./etc/init.d/squid start
2. If installation squid done using source code and installation directory /usr/local/squid, than there two step must be done to run squid.

a. Create directory cache for squid. Open terminal as root, than do the following command:

./usr/local/squid/sbin/squid -z

b. After directory cache has been created without error, than you can running squid using the following command:

./usr/local/squid/sbin/squid -D

Note: The step no.a only run once, after that if you want to running squid, you just do step no.b

 

B. Stopping Squid

1. If installation squid done using RPM, than stopping squid is very easy. Do the following command:

service squid stop

or

./etc/init.d/squid stop

2. If installation squid done using source code and installation directory /usr/local/squid, than do the following command:

./usr/local/squid/sbin/squid -k shutdown

 

C. Testing Squid

1. Testing must be done to make sure squid running well. We can use squidclient program include in squid. This program can be locate at /usr/local/squid/bin. To using this program, make sure you have web site to connect to.

service apache2 start

/usr/local/squid/bin/squidclient http://localhost

if there is a reply from proxy server (in HTML format) then it means that the proxy works.