扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
在本页阅读全文(共2页)
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.cnfbind-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启动脚本
# vi /etc/rc3.d/S78squid
====================== S78squid =====================
#!/sbin/sh
#
# Copyright (c) 2004 by llzqq, Inc
# llzqq@126.com
# All rights reserved.
#
#ident "@(#)squid 1.1 04/05/24 SMI"case "$1" in
start)
/opt/sfw/squid/sbin/squid -s
;;
stop)
/opt/sfw/squid/sbin/squid -k shutdown
pkill squid
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
====================== S78squid =====================
# chown root:sys /etc/rc3.d/S78squid
# chmod 744 /etc/rc3.d/S78squid
# ln -s /etc/rc3.d/S78squid /etc/rc2.d/K78squid
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者