It's been a long time coming, recently spent a week to the company configured a squid agent, because the first contact with the CentOS system, see black Background white, on a head of the circle, in the past thousand difficult million resistance, finally is configured successfully, and has been promoted use.
1. Install Squid:
installation command: Yum install squid
After installation check: RPM-QA | grep squid
If successful installation will prompt:
2. Install Apache, command: Yum install httpd
Add user, Command: htpasswd-c/etc/squid/passwd user
3. Create an encrypted squid proxy channel
OpenSSL req-new > TANK.CSR
OpenSSL rsa-in privkey.pem-out Tank.key
OpenSSL x509-in squid.csr-out squid.crt-req-signkey squid.key-days 3650
4. Configure squid, plays, there are a lot of information on the Internet, but in fact, the command to use only 1 lines, yes, is 1 lines.
Https_port 443 CERT=/ETC/SQUID/TANK.CRT Key=/etc/squid/tank.key
Now you can start up, that is, no validation, next is validation.
5. Add the account password to the configuration file:
Auth_param Basic PROGRAM/USR/LIB64/SQUID/BASIC_NCSA_AUTH/ETC/SQUID/PASSWD
Auth_param Basic Children 5
Auth_param Basic Credentialsttl 8 hours
Auth_param Basic Realm my test prosy
ACL test123 Proxy_auth REQUIRED
http_access Allow user
Http_access Deny All
6. Done, start.
Command: Service squid start
7. View Status: Service Squid status
Another reminder of a big pit, but also let me tangle 2 days a big pit ... Remember to close the firewall ....