Ubuntu 8.04 server 用squid 做代理服务器(小试牛刀)
2010-04-28 21:39
337 查看
1,安装squid
#sudo apt-get install squid
查看安装到了那里
#sudo whereis squid
2,修改/etc/squid/squid.conf
备份配置文件
# cd /etc/squid
#sudo cp squid.conf squid.conf.bak
查看默认的配置
#sudo cat squid.conf |grep -v ^$ |grep -v ^#
修改
#sudo vim /etc/squid/squid.conf
修改:http_port 172.16.0.2:8080
在http_access deny all 前增加ACL:
acl my_networks src 172.16.0.0/24
http_access allow my_networks
3,对配置文件查错
#sudo /usr/sbin/squid –k parse
没有输出内容,则配置文件有效。
4,在默认情况下,没设置cache_dir ,若设置了,用以下命令初始化
#sudo /usr/sbin/squid -z
5,启动squid
#sudo /usr/sbin/squid –sD
6,查看是否正常启动
#netstat –nl |grep 8080
8080 是否出于侦听状态
#ps ax |grep squid
是否有两个进程,一个子进程,一个父进程。
7,在客户端的IE里做相应设置,看是否可以。
问题:在客户端上INTERNET很慢,太慢了!问题出在哪?
今天下午,在网上逛,发现有网友提到在squid.conf有一个配置dns_nameservers ,
官方解释为:Use this if you want to specify a list of DNS name servers
(IP addresses) to use instead of those given in your
/etc/resolv.conf file.
On Windows platforms, if no value is specified here or in
the /etc/resolv.conf file, the list of DNS name servers are
taken from the Windows registry, both static and dynamic DHCP
configurations are supported.
Example: dns_nameservers 10.0.0.1 192.172.0.4
我想是不是因为这个原因导致变慢的呢,在squid.conf里找到这个修改为dns_nameservers 202.96.209.5 202.96.209.133 后,#sudo /usr/sbin/squid -k reconfigure ,经测试,代理网速正常,问题解决。早晨,我修改了/etc/resolv.conf 文件了,问题已就,没想到这个可以解决。
#sudo apt-get install squid
查看安装到了那里
#sudo whereis squid
2,修改/etc/squid/squid.conf
备份配置文件
# cd /etc/squid
#sudo cp squid.conf squid.conf.bak
查看默认的配置
#sudo cat squid.conf |grep -v ^$ |grep -v ^#
修改
#sudo vim /etc/squid/squid.conf
修改:http_port 172.16.0.2:8080
在http_access deny all 前增加ACL:
acl my_networks src 172.16.0.0/24
http_access allow my_networks
3,对配置文件查错
#sudo /usr/sbin/squid –k parse
没有输出内容,则配置文件有效。
4,在默认情况下,没设置cache_dir ,若设置了,用以下命令初始化
#sudo /usr/sbin/squid -z
5,启动squid
#sudo /usr/sbin/squid –sD
6,查看是否正常启动
#netstat –nl |grep 8080
8080 是否出于侦听状态
#ps ax |grep squid
是否有两个进程,一个子进程,一个父进程。
7,在客户端的IE里做相应设置,看是否可以。
问题:在客户端上INTERNET很慢,太慢了!问题出在哪?
今天下午,在网上逛,发现有网友提到在squid.conf有一个配置dns_nameservers ,
官方解释为:Use this if you want to specify a list of DNS name servers
(IP addresses) to use instead of those given in your
/etc/resolv.conf file.
On Windows platforms, if no value is specified here or in
the /etc/resolv.conf file, the list of DNS name servers are
taken from the Windows registry, both static and dynamic DHCP
configurations are supported.
Example: dns_nameservers 10.0.0.1 192.172.0.4
我想是不是因为这个原因导致变慢的呢,在squid.conf里找到这个修改为dns_nameservers 202.96.209.5 202.96.209.133 后,#sudo /usr/sbin/squid -k reconfigure ,经测试,代理网速正常,问题解决。早晨,我修改了/etc/resolv.conf 文件了,问题已就,没想到这个可以解决。
相关文章推荐
- 用squid配置代理服务器(基于Ubuntu Server 12.04)
- ubuntu server 8.04 安装webmin
- ubuntu12.04——代理服务器squid
- ubuntu下设置代理服务器 Squid
- Installing Xen On An Ubuntu 8.04 (Hardy Heron) Server From The Ubuntu Repositories
- 将ubuntu 8.04 (server x86_64)的系统编码由英文改成中文
- ubuntu server 8.04 vi配置
- ubuntu squid 代理服务器安装配置
- Ubuntu下用Squid设置一台机器为代理服务器
- squid配置--再次冲击Ubuntu之server篇
- 将ubuntu 8.04 (server x86_64)的系统编码由英文改成中文,即由en_US.UTF-8改为zh_CN.GBK
- install informix IDS9.4 for Ubuntu Server 8.04
- Ubuntu安装squid作为内网的代理服务器(Proxy)的简单配制
- 安装“ubuntu-8.04-server”(上)
- 在ubuntu 8.04上安装Robocup 3D simspark simulation server (version 0.6.2)
- ubuntu 设置为代理服务器使用squid3
- Ubuntu Server配置代理服务器
- Ubuntu安装Squid作为内网的代理服务器(Proxy)的简单配置