🔗 CentOS上的Squid
🔗 预编译的二进制包
CentOS自带Squid。然而,似乎没有任何公开信息说明在哪里可以找到这些包,或者谁在打包它们。EPEL、DAG和RPMforge仓库似乎不再包含任何文件。其他来源暗示CentOS是RHEL的别名(我们知道并非如此)。尽管如此,RHEL的包确实可以在CentOS上工作。
🔗 Bug报告
http://bugs.centos.org/search.php?category=squid&sortby=last_updated&hide_status_id=-2
Eliezer: 2017年4月25日 - 我已经在小规模范围内测试了CentOS 7上Squid 3.5.25的RPM包,作为一个前向代理和基本功能,它对200-300个用户来说似乎足够稳定。
🔗 NgTech CentOS/Fedora Copr托管仓库
https://copr.fedorainfracloud.org/coprs/elicro/Squid-Cache/
🔗 稳定仓库包 (类似 epel-release)
要安装,请运行命令
yum install http://ngtech.co.il/repo/centos/7/squid-repo-1-1.el7.centos.noarch.rpm -y
或者
rpm -i http://ngtech.co.il/repo/centos/7/squid-repo-1-1.el7.centos.noarch.rpm
然后使用命令安装squid
yum install squid
🔗 可能缺失的操作系统资源 (库/软件)
CentOS可能需要一些依赖项,但目前还不能通过“yum install”进行安装。
我看到的一个依赖项是
“Crypt::X509”,这是一个Perl模块,不在CentOS的基础仓库中。
要安装它,请使用cpan或EPEL仓库。
# cpan
> install Crypt::X509
SSL故障排除:先安装库,然后看看会发生什么。
🔗 编译
# You will need the usual build chain
yum install -y perl gcc autoconf automake make sudo wget
# and some extra packages
yum install libxml2-devel libcap-devel
# to bootstrap and build from bzr needs also the packages
yum install libtool-ltdl-devel
以下./configure选项可以将Squid正确地安装到CentOS结构中
--prefix=/usr
--includedir=/usr/include
--datadir=/usr/share
--bindir=/usr/sbin
--libexecdir=/usr/lib/squid
--localstatedir=/var
--sysconfdir=/etc/squid
🔗 故障排除
🔗 仓库镜像脚本
https://gist.github.com/elico/333bff85f3df2889db7af2795f9d7898 的副本
#!/usr/bin/env bash
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER using lftp
# @modified: Eliezer Croitoru to mirror remote HTTP repo
# @url: https://gist.github.com/pixeline/0f9f922cffb5a6bba97a
## LICENSE, 3-Clause BSD.
lockfile -r 0 /tmp/mirror-ngtech-repo.lock || exit 1
# FTP LOGIN
HOST='http://ngtech.co.il'
PORT="80"
#USER='ftpusername'
#PASSWORD='ftppassword'
# DISTANT DIRECTORY
REMOTE_DIR='/repo/'
#LOCAL DIRECTORY
LOCAL_DIR='/tmp/backups'
DOWNLOAD_SPEED="1M"
# RUNTIME!
echo
echo "Starting download ${REMOTE_DIR} from ${HOST} to ${LOCAL_DIR}"
date
#lftp -u "${USER}","${PASSWORD}" ${HOST} <<EOF
lftp ${HOST}${REMOTE_DIR} -p ${PORT} <<EOF
# the next 3 lines put you in ftpes mode. Uncomment if you are having trouble connecting.
# set ftp:ssl-force true
# set ftp:ssl-protect-data true
# set ssl:verify-certificate no
# transfer starts now...
# mirror --only-newer --use-pget-n=10 ${REMOTE_DIR} ${LOCAL_DIR};
# set download and upload speed limit.
set net:limit-total-rate ${DOWNLOAD_SPEED}:500K
# start mirroring the folder.
mirror --only-newer --parallel=10 ${REMOTE_DIR} ${LOCAL_DIR};
exit
EOF
echo
echo "Transfer finished"
rm -f /tmp/mirror-ngtech-repo.lock
date
🔗 CERN镜像的NgTech仓库
Cern实验室已经镜像NgTech仓库很长一段时间,地址是http://linuxsoft.cern.ch/mirror/www1.ngtech.co.il/repo/centos/7/
类别: 知识库
导航: 站点搜索、站点页面、类别、🔼 向上