I have a CentOS 7 server (server X)in a datacenter that has a firewall that I couldn't do 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
And the datacenter doesn't offer a proxy server for me to yum install anything.
However, I can ssh to server X from my home computer over Internet + VPN.
I just wonder whether there is a way to utilize the ssh connection to yum install packages (or any other ways to yum install packages).
This post suggested that people just install with RPMs or DVD.
I think installing from RPMs are simple if there isn't any dependency but it will be troublesome to deal with dependency.
Any suggestion is welcome.
Thanks in advance!
Update 1: I couldn't even ping the IP of mirrorlist.centos.org (although it is pingable):
# 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
So the DNS resolution isn't the root cause.
Traceroute indicates the traffic is blocked:
# 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 * *
It couldn't go out because the datacenter has a firewall. Server X itself has no firewall nor iptable to prevent going out.
Update 2: downloading rpms and rsync-ing and then installing failed
# 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
Make sure you have related and established connections allowed in via the firewall or else the response won’t be able to come back in