Several common commands during Squid installation and debugging

Source: Internet
Author: User
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 you in squid. the cache directory configured in conf # squid/sbin/squid-z. If an error message is displayed ,... several common commands during Squid installation and debugging when your squid. after modifying the conf configuration document according to your ideas, start the squid journey. 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.
 
Related Article

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.