AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 911912
Accepted
HCSF
HCSF
Asked: 2018-05-13 06:23:43 +0800 CST2018-05-13 06:23:43 +0800 CST 2018-05-13 06:23:43 +0800 CST

Yum 在防火墙后面安装软件包

  • 772

我在一个数据中心有一个 CentOS 7 服务器(服务器 X),它有一个我不能做 yum 的防火墙:

# yum search htop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
 * base: mirrors.163.com
 * extras: mirrors.shu.edu.cn
 * updates: ftp.sjtu.edu.cn
Warning: No matches found for: htop
No matches found

而且数据中心没有为我提供代理服务器来安装任何东西。

但是,我可以通过 Internet + VPN 从家用计算机 ssh 到服务器 X。

我只是想知道是否有办法利用 ssh 连接到 yum 安装包(或任何其他 yum 安装包的方法)。

这篇文章建议人们只使用 RPM 或 DVD 安装。

我认为如果没有任何依赖关系,从 RPM 安装很简单,但处理依赖关系会很麻烦。

欢迎任何建议。

提前致谢!

更新 1:我什至无法 ping mirrorlist.centos.org 的 IP(虽然它是可 ping 的):

# ping 85.236.43.108
PING 85.236.43.108 (85.236.43.108) 56(84) bytes of data.
^C
--- 85.236.43.108 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

所以DNS解析不是根本原因。

Traceroute 表示流量被阻塞:

# traceroute 85.236.43.108
traceroute to 85.236.43.108 (85.236.43.108), 30 hops max, 60 byte packets
 1  gateway (172.18.22.254)  3.884 ms  4.100 ms  4.322 ms
 2  gateway (172.18.22.254)  3.200 ms !H * *

它不能出去,因为数据中心有防火墙。Server X 本身没有防火墙,也没有 iptable 来防止外出。

更新 2:下载 rpms 和 rsync-ing 然后安装失败

# yum localinstall /tmp/audit-libs-2.8.1-3.el7.x86_64.rpm --disablerepo=*
Loaded plugins: fastestmirror
Examining /tmp/audit-libs-2.8.1-3.el7.x86_64.rpm: audit-libs-2.8.1-3.el7.x86_64
Marking /tmp/audit-libs-2.8.1-3.el7.x86_64.rpm as an update to audit-libs-2.7.6-3.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package audit-libs.x86_64 0:2.7.6-3.el7 will be updated
--> Processing Dependency: audit-libs(x86-64) = 2.7.6-3.el7 for package: audit-2.7.6-3.el7.x86_64
Loading mirror speeds from cached hostfile
---> Package audit-libs.x86_64 0:2.8.1-3.el7 will be an update
--> Finished Dependency Resolution
Error: Package: audit-2.7.6-3.el7.x86_64 (@anaconda)
           Requires: audit-libs(x86-64) = 2.7.6-3.el7
           Removing: audit-libs-2.7.6-3.el7.x86_64 (@anaconda)
               audit-libs(x86-64) = 2.7.6-3.el7
           Updated By: audit-libs-2.8.1-3.el7.x86_64 (/audit-libs-2.8.1-3.el7.x86_64)
               audit-libs(x86-64) = 2.8.1-3.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
firewall
  • 1 1 个回答
  • 2242 Views

1 个回答

  • Voted
  1. Best Answer
    Timothy Frew
    2018-05-13T09:47:30+08:002018-05-13T09:47:30+08:00

    确保您已通过防火墙允许相关且已建立的连接,否则响应将无法返回

    • 0

相关问题

  • 用 D-LINK DFL-CPG310 防火墙替换 Cisco Pix 防火墙

  • MSMQ 防火墙端口

  • IP-KVM(在我的例子中是 ADDER Ipeps):轻松防火墙穿越

  • 远程连接 sql server 不工作,但如果防火墙禁用它呢?

  • 服务器 2003 R2 上的 Cisco VPN 客户端

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve