Several Common commands during Squid installation and debugging. When your squid. conf configuration document is modified according to your ideas, the squid journey begins. 1. initialize the cache directory # squid/sbin/squid-z you configured in squid. conf. If an error message is displayed, check the permission of your cache directory. 2. Check the syntax and configuration of squid. conf. # Squid/sbin/squid-k parse if squid. conf has syntax or configuration errors, a prompt will be returned here. If no result is returned, congratulations, you can try to start squid. 3. Start squid on the frontend and output the startup process. # Squid/sbin/squid-N-d1 if there is ready to server reques, congratulations, the startup is successful. Press ctrl + c to stop squid and start it later. 4. Start squid to run in the background. # Squid/sbin/squid-s at this time, you can view system processes in ps-A, and you can see two squid processes. 5. Stop squid # squid/sbin/squid-k shutdown. 6. Reboot the modified squid. conf # squid/sbin/squid-k reconfigure is often used. You can modify squid at any time when you find that your configuration is not satisfactory. conf, and then do not forget your squid. conf troubleshooting, and then execute this command to let squid repeat your squid. conf to run. 7. Add the squid to the system startup Item and edit/etc/rc. d/rc. add the following lines to local:/usr/local/squid/sbin/squid-s. Of course, not everyone likes this startup method. You can use the method you like best; or install it as a service. Click another one. 1. Modify the cache directory permissions. # Chown-R squid: squid/home/cache my cache directory is/home/cache, and squid and user group are squid and squid. 2. modify the permissions of the squid log directory # chown-R squid: squid/usr/local/squid/var/logs is not suitable for every user who uses squid. indicates that squid has the permission to perform write operations in this directory. For example, generate access. log cache. log store. log 3 and view your log document. # More/usr/local/squid/var/logs/access. log | grep TCP_MEM_HIT. During squid running, the files are cached in the memory by squid and returned to the access user. # More/usr/local/squid/var/logs/access. log | grep TCP_HIT this command shows that during squid running, some files are cached into the cache directory by squid and returned to the access user. # More/usr/local/squid/var/logs/access. log | grep TCP_MISS this command shows that during squid running, some files are not cached by squid, but are retrieved from the original server and returned to the accessed user. Of course, the blue text in this example can be changed to other parameters, for example, your domain name www.linuxidc.com, you can also see the access. log line about this domain name.