Automatically starting Squid at system startup
Once we have a properly configured and running proxy server, we would like it to start whenever the system is started or rebooted. Next, we'll have a brief look at the most common ways of adding or modifying the boot scripts for popular operating systems. These methods will most probably work on your operating system. If they don't, please refer to the corresponding operating system manual for information on boot scripts.
Adding Squid command to /etc/rc.local file
Adding the full path of the Squid executable file is the easiest way to start Squid on system startup. The file /etc/rc.local
is executed after the system boots as the super or root user. We can place the Squid command in this file and it will run every time the system boots up. Add the following line at the end of the /etc/rc.local
file:
${prefix}/sbin/squid
Please replace ${prefix}
with the installation prefix which you used before compiling Squid.
Adding init script
Alternatively,...