找一台可以上网的机器

[root@controller ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

 

 

安装squid

yum install squid -y

 

修改配置文件

[root@controller ~]# cat /etc/squid/squid.conf
http_port 3128
cache_mem 64 MB
maximum_object_size 4 MB
cache_dir ufs /var/spool/squid 100 16 256
access_log /var/log/squid/access.log
acl localnet src xxxx.xxxx.xxxx.xxx/24
http_access allow all

 

启动服务

 systemctl start squid

 

 

配置不能上网服务器

[root@localhost ~]# vi /etc/yum.conf

在[main]下增加

proxy=http://yumproxyIP:3128

 

此时这个机器就可以使用yum代理安装包

 

相关文章:

  • 2021-07-13
  • 2021-06-06
  • 2021-09-22
  • 2021-12-28
  • 2021-12-20
  • 2021-09-27
猜你喜欢
  • 2022-12-23
  • 2021-06-27
  • 2021-07-09
  • 2021-12-10
  • 2021-12-10
  • 2021-12-10
  • 2021-07-24
相关资源
相似解决方案