nexus 代理 epel 源

服务 ip 端口 备注
nexus 192.168.80.129 (内网) 8081 内网地址无法访问外网
nginx

192.168.80.128 (内网)

192.168.174.126 (外网)

19000 192.168.174.126 地址可以访问外网

创建 Blob Stores

创建 Repositories

nginx 配置

server {
    listen       19000;
    server_name  localhost;

    # 设置代理访问日志
    access_log  logs/proxy.access.log ;
    error_log  logs/proxy.error.log ;

    location /epel {
        proxy_pass https://mirrors.aliyun.com;
    }

}

epel.repo 

[epel]
name=epel-$releasever - Base
baseurl=http://192.168.80.129:8081/repository/aliyun-epel-repo/$releasever/$basearch/
enable=1
gpgcheck=0

构建 yum 缓存

yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base                                                                                                                                                    | 2.2 kB  00:00:00     
epel                                                                                                                                                    | 3.3 kB  00:00:00     
extras                                                                                                                                                  | 1.5 kB  00:00:00     
updates                                                                                                                                                 | 1.5 kB  00:00:00     
(1/5): epel/7/x86_64/updateinfo                                                                                                                         | 1.0 MB  00:00:02     
(2/5): epel/7/x86_64/prestodelta                                                                                                                        |  470 B  00:00:00     
(3/5): epel/7/x86_64/primary                                                                                                                            | 3.9 MB  00:00:00     
(4/5): epel/7/x86_64/other                                                                                                                              | 2.4 MB  00:00:05     
(5/5): epel/7/x86_64/filelists                                                                                                                          |  12 MB  00:00:23     
epel                                                                                                                                                               13795/13795
epel                                                                                                                                                               13795/13795
epel                                                                                                                                                               13795/13795
Metadata Cache Created

安装软件

yum -y install go

查看软件版本

go version
go version go1.20.12 linux/amd64

查看 Repositories 状态

查看 Browse

posted @ 2024-03-29 08:56  小吉猫  阅读(29)  评论(0编辑  收藏  举报