安装squid服务
wget --no-check-certificate https://raw.githubusercontent.com/squidproxy/squidproxy/master/cross_os_squid.sh
chmod +x cross_os_squid.sh
./cross_os_squid.sh
1 部署成功会看到squid的25端口已经启动! 2 crontab -e 可以查看到一个检测squid运行状态的计划任务,cron服务将每分钟检测squid 的运行状态! 3 单独创建了/squid/目录,可以看到3个脚本,cron.sh为计划任务的脚本,restart.sh为squid 服务重启的脚本 start.sh为squid启动脚本,如果squid没启动可以手动执行restart.sh脚本 4 可以将squid 的端口加入finalspeed 的客户端,加速端口为squid 服务的端口比如25,finalspeed 的服务器IP为squid服务器的IP!
安装失败:
回复删除cron is not running
./cross_os_squid.sh: line 208: /etc/init.d/cron: 没有那个文件或目录
centos
start installing unzip package for you!
回复删除Install centos unzip ...
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 294, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 146, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 438, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 210, in doCommand
return base.installPkgs(extcmds)
File "/usr/share/yum-cli/cli.py", line 699, in installPkgs
self.install(pattern=arg)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3513, in install
mypkgs = self.pkgSack.returnPackages(patterns=pats,
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 906, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 686, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 290, in populateSack
self.doSetup()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 105, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 202, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 369, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 413, in _poll_mirrors
pollThread.start()
File "/usr/lib/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
Install centos squid ...
回复删除已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 294, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 146, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 438, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 210, in doCommand
return base.installPkgs(extcmds)
File "/usr/share/yum-cli/cli.py", line 699, in installPkgs
self.install(pattern=arg)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3513, in install
mypkgs = self.pkgSack.returnPackages(patterns=pats,
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 906, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 686, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 290, in populateSack
self.doSetup()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 105, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 202, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 369, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 413, in _poll_mirrors
pollThread.start()
File "/usr/lib/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
start installing squid package for you!
./cross_os_squid.sh: line 138: squid: command not found
/etc/squid/squid.conf: 没有那个文件或目录
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
Download software...
--2016-04-09 13:43:55-- https://raw.githubusercontent.com/squidproxy/squidproxy/master/control_squid.zip
正在解析主机 raw.githubusercontent.com... 23.235.44.133
正在连接 raw.githubusercontent.com|23.235.44.133|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1796 (1.8K) [application/zip]
正在保存至: “cross_squid.zip”
100%[======================================>] 1,796 --.-K/s in 0s
2016-04-09 13:43:55 (490 MB/s) - 已保存 “cross_squid.zip” [1796/1796])
Update Software...
Archive: cross_squid.zip
inflating: /squid/cron.sh
inflating: /squid/restart.sh
inflating: /squid/start.sh
centos
cron is not running
./cross_os_squid.sh: line 208: /etc/init.d/cron: 没有那个文件或目录
centos
安装失败