在 CentOS 6 中使用CNTLM为 Yum 配置本地代理

CNTLM(Fast NTLM Authentication Proxy -使用C 语言编写快速 NTLM 身份验证代理 )是一个本地代理服务器,可以与许多 linux 实用程序一起使用,例如 yum、wget 等。

在本文中,我们使用 CNTLM,使 yum 能够通过网络代理服务器查看。

欢迎 on it road

在 CentOS 6 上配置 CNTLM

在 linux 机器上,当我们尝试运行它时,它会给我们一个连接错误。

[root@webserver-01 ~]# yum repolist

从 https://sourceforge.net/projects/cntlm/files/cntlm/ 下载包 cntlm-0.92.3-1.x86_64.rpm

将下载的rpm复制到linux服务器并安装。

安装 CNTLM 后,根据需要对其进行配置。

[root@webserver-01 ~]# vi /etc/cntlm.conf

更新用户名、域、密码和代理地址。

[root@webserver-01 ~]# mkdir /var/run/cntlm
[root@webserver-01 ~]# chown cntlm:cntlm /var/run/cntlm/
[root@webserver-01 ~]# service cntlmd start
[root@webserver-01 ~]# service cntlmd status

配置 yum 以使用 CNTLM。

[root@webserver-01 ~]# vi /etc/yum.conf

并添加以下指令。

proxy=http://127.0.0.1:3128/

现在,尝试使用 yum 命令执行一些操作以检查它是否可以通过 CNTLM 访问存储库。

[root@webserver-01 ~]# yum repolist

现在我们的 yum 服务器可以通过 CNTLM 本地代理服务器,连接到公共 yum 存储库,。

日期:2020-09-17 00:12:49 来源:oir作者:oir