In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how RHEL Squid is installed and debugged. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.
Initialize the cache directory you configured in RHEL Squid.conf
#RHEL Squid/sbin/RHEL Squid -z //** * This command must be entered to start RHEL Squid service the second time
If there is an error, check your cache directory permissions.
2. Error your RHEL Squid.conf by verifying RHEL Squid.conf syntax and configuration.
#RHEL Squid/sbin/RHEL Squid -k parse
If RHEL Squid.conf has syntax or configuration errors, you will be prompted here, if not, congratulations, you can try to start RHEL Squid.
3. Start RHEL Squid in the foreground and output the startup process.
#RHEL Squid/sbin/RHEL Squid -N -d1
If there are any ready to server requests, congratulations.
Then ctrl + c stops RHEL Squid and starts it running in the background.
Start RHEL Squid to run in the background.
#RHEL Squid/sbin/RHEL Squid -s
At this point you can ps -A to view the system process, you can see two RHEL Squid processes.
Stop RHEL Squid
#RHEL Squid/sbin/RHEL Squid -k shutdown
6. Reboot the modified RHEL Squid.conf
#RHEL Squid/sbin/RHEL Squid -k reconfigure
This estimate is used more often. When you find that your configuration is not satisfactory, you can modify RHEL Squid.conf at any time, and then don't forget to correct your RHEL Squid.conf, and then execute this command to make RHEL Squid run according to your RHEL Squid. conf.
7. Add RHEL Squid to the system startup item
Edit/etc/rc.d/rc.local
Add the following line: /usr/local/RHEL Squid/sbin/RHEL Squid -s
Of course, not everyone likes this startup method, you can use it the way you are most accustomed to; or install it as a service.
And something else.
1. Modify cache directory permissions.
#chown -R RHEL Squid:RHEL Squid /home/cache, my cache directory is/home/cache,RHEL Squid Executive users and user groups are RHEL Squid, RHEL Squid
2. Modify RHEL Squid log directory permissions
#chown -R RHEL Squid:RHEL Squid /usr/local/RHEL Squid/var/logs, this step is not suitable for everyone who uses RHEL Squid. RHEL Squid has permission to write to this directory. For example, generate access.log cache.log store.log
3. Check your log files.
◆#more /usr/local/RHEL Squid/var/logs/access.log |grep TCP_MEM_HIT, this command can see RHEL Squid during the run, there are files cached by RHEL Squid into memory, and returned to the accessing user.
◆#more /usr/local/RHEL Squid/var/logs/access.log |grep TCP_HIT, this directive can see which files are cached by RHEL Squid in the cache directory during RHEL Squid operation and returned to the accessing user.
◆#more /usr/local/RHEL Squid/var/logs/access.log |grep TCP_MISS, this directive can see which files are not cached by RHEL Squid during RHEL Squid operation, but are retrieved by the original server and returned to the accessing user.
4、RHEL Squid -k rotate
Rotation RHEL Squid log file/var/log/RHEL Squid,RHEL Squid proxy server log file growth rate is amazing, it is easy to penalty full disk space caused by the system does not work properly, or even crash. RHEL Squid uses rotation to solve the problem of log file growth. In RHEL Squid.conf, you can set the number of file rotations through logfile_rotate, such as: logfile_rotate 10 , rotation work is generally completed with crontab timer in the periodic log rotation, for example, every Saturday morning at 2:00 log rotation, then execute the following command: crontab -e0 2 * * 6 RHEL Squid -k rotate
About "RHEL Squid how to install and debug" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.