用户认证功能的SQUID代理服务器

2008-02-23 07:43:41来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

SQUID和MYSQL的安装采用了SUN发布的二进制安装包,他在software_companion_x86 CD中能够找到;MySQL_AUTH用GOOGLE搜索就能够找到。

一、安装配置SQUID MySQL

1、建立用户和组


# groupadd squid
# useradd -g squid -d /dev/null -s /bin/false squid
# groupadd MySQL
# useradd -g mysql -s /bin/false MySQL

2、安装MySQL


# mount –F hsfs –o ro /dev/dsk/c1t0d0p0 /cdrom
# cd /cdrom/components/i386/Packages
# pkgadd -d ./ -s /var/spool/pkg SFWmysql SFWgcmn
# pkgadd SFWgcmn SFWmysql

# chown -R root /opt/sfw/mysql
# chgrp -R mysql /opt/sfw/mysql
# chown -R mysql /opt/sfw/mysql/var
# /opt/sfw/mysql/bin/mysql_install_db
# /opt/sfw/mysql/bin/mysqld_safe &

# cp /opt/sfw/mysql/share/MySQL/my-medium.cnf /etc/my.cnf
# vi /etc/my.cnf
bind-address = 127.0.0.1


配置启动脚本:


# cp /opt/sfw/mysql/share/mysql/mysql.server /etc/init.d/mysql.server
# ln /etc/init.d/mysql.server /etc/rc3.d/S79mysql
# ln /etc/init.d/mysql.server /etc/rc0.d/K00mysql
# ln /etc/init.d/mysql.server /etc/rc1.d/K00mysql
# ln /etc/init.d/mysql.server /etc/rc2.d/K00mysql
# ln /etc/init.d/mysql.server /etc/rcS.d/K00mysql
# chown root:sys /etc/init.d/mysql.server /etc/rc3.d/S79mysql
# chmod 0744 /etc/init.d/mysql.server /etc/rc3.d/S79MySQL


配置ROOT密码:

# MySQLadmin -u root password llzqq

3、安装SQUID


# pkgadd -d ./ -s /var/spool/pkg SFWsquid
# pkgadd SFWsquid
# cd /opt/sfw/squid/etc
# cp squid.conf.default squid.conf
# cp mime.conf.default mime.conf


4、配置SQUID.CONF


http_port 192.168.0.1:3128
cache_mgr llzqq@nero.3322.org
error_directory /opt/sfw/squid/share/errors/Simplify_Chinese
dns_nameservers 202.99.160.68 202.99.168.8
visible_hostname nero.3322.org
httpd_accel_uses_host_header on
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
cache_mem 20 MB
maximum_object_size 4096 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 30 KB
minimum_object_size_in_memory 0 KB
cache_swap_low 85
cache_swap_high 90
cache_dir ufs /opt/sfw/squid/var/cache
cache_effective_user squid
cache_effective_group squid

#http_access allow manager localhost
#http_access allow localhost
#http_access deny manager
#http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports
#http_access deny all
http_reply_access allow all
icp_access allow all
miss_ACCESS allow all
--------------------------------------------------------
# chown –R squid:squid /opt/sfw/squid/var
# /opt/sfw/squid/sbin/squid -z


5、SQUID启动脚本

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇: 剖析数据库特性:滞后联编和对象嵌套

下一篇: MySQL数据库的安全配置实用技巧