Help you easily complete RHEL Squid installation and debugging

Source: Internet
Author: User

I have explained and introduced the RHEL Squid installation process a lot. Here I will give a detailed introduction to some commands in the RHEL Squid installation and debugging process, to facilitate the use of RHEL Squid.

1. initialize the cache directory you configured in RHEL Squid. conf.
# RHEL Squid/sbin/RHEL Squid-z // This command is required when the RHEL Squid service is started for the first time
If an error message is displayed, check the permission of your cache directory.

2. Check the syntax and configuration of your RHEL Squid. conf file.
# RHEL Squid/sbin/RHEL Squid-k parse
If there is a syntax or configuration error in RHEL Squid. conf, a prompt is returned. If no result is returned, congratulations. You can try to start RHEL Squid.

3. Start RHEL Squid at the front end and output the startup process.
# RHEL Squid/sbin/RHEL Squid-N-d1
If there is ready to server reques, congratulations, the startup is successful.
Press ctrl + c to stop the RHEL Squid and start it later.

4. Start RHEL Squid to run in the background.
# RHEL Squid/sbin/RHEL Squid-s
At this time, you can view the system process in ps-A, and you can see two RHEL Squid processes.

5. Stop RHEL Squid
# RHEL Squid/sbin/RHEL Squid-k shutdown

6. re-boot the modified RHEL Squid. conf
# RHEL Squid/sbin/RHEL Squid-k reconfigure
This estimation is often used. When you find that your configuration is not satisfactory, you can modify the RHEL Squid at any time. conf, and then do not forget your RHEL Squid. conf troubleshooting, and then execute this command to make the running RHEL Squid repeat your RHEL Squid. conf to run.

7. Add RHEL Squid to the system startup Item
Edit/etc/rc. d/rc. local
Add the following lines:/usr/local/RHEL Squid/sbin/RHEL Squid-s
Of course, not everyone likes this startup method. You can use the method you like most or install it as a service.

Click another one.
1. Modify the cache directory permissions.
# Chown-r rhel Squid: RHEL Squid/home/cache. My cache directory is/home/cache. The RHEL Squid execution user and user group are RHEL Squid and RHEL Squid.

2. modify the permissions of the RHEL Squid log directory
# Chown-r rhel Squid: RHEL Squid/usr/local/RHEL Squid/var/logs. This step is not suitable for every user who uses RHEL Squid. indicates that RHEL Squid has the permission to perform write operations in this directory. For example, generate access. log cache. log store. log

3. view your log document.
◆ # More/usr/local/RHEL Squid/var/logs/access. log | grep TCP_MEM_HIT, which indicates that during RHEL Squid running, files are cached to the memory by RHEL Squid and returned to the access user.
◆ # More/usr/local/RHEL Squid/var/logs/access. log | grep TCP_HIT, which indicates that during RHEL Squid running, files are cached to the cache directory by RHEL Squid and returned to the access user.
◆ # More/usr/local/RHEL Squid/var/logs/access. log | grep TCP_MISS. This command shows that during RHEL Squid running, files are not cached by RHEL Squid, but are retrieved from the original server and returned to the accessed user.
 
4. RHEL Squid-k rotate

Rotate the log file/var/log/RHEL Squid of RHEL Squid. the growth speed of the log file on the RHEL Squid Proxy Server is amazing. It is easy to take a penalty when the disk space is full and the system cannot work normally, or even a crash. to solve the problem of fast Log File growth, RHEL Squid adopts the "rotation" method. in RHEL Squid. in conf, you can use logfile_rotate to set the number of file rotations, for example, logfile_rotate 10. Generally, the crontab timer is used to complete periodic log rotations. For example, log rotations are performed at every Saturday, run the following command: crontab-e0 2 ** 6 RHEL Squid-k rotate

TIPS:
The default error message of RHEL Squid is in English, which is inconvenient for users with poor English. in/etc/RHEL Squid. add error_directory/usr/share/RHEL Squid/errors/Simplify_Chinese to the conf file to display Chinese error messages.

The above are some of the common commands that can be used in RHEL Squid installation and debugging. Now they are all presented to you. I hope you can help us rent them.

  1. Set up the Samba server of ORACLE11g with RHELRHEL 5
  2. Rhelrhel ftp Server SETUP steps and Problem Analysis (1)
  3. RHELRHEL 5 is a perfect combination of FTP
  4. Problem Analysis: in this way, use RHELRHEL 4 to configure Postfix in four perfect steps
  5. Seven steps for RHEL to set up RHEL4 system Sendmail

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.