centos7.8最小化安装是没有telnet、ifconfig、netstat和wget网络工具的,需要自行安装 [root@localhost ~]# ipconfig -bash: ipconfig: 未找到命令 [root@localhost ~]# telnet -bash: telnet: 未找到命令 [root@localhost ~]# netstat -bash: netstat: 未找到命令 [root@localhost ~]# wget -bash: wget: 未找到命令 如果该服务器既没有联网,也没有yum仓库可用,那么又如何安装呢?这个场景还是比较常见的,经常会出现在客户现场的机房环境,客户的工程师给你开了一台服务器,服务器默认开SSH服务,然后再分配你个账号,所有你需要的其他软件自行通过U盘或者移动硬盘拷贝到服务器自行安装。 安装方式分享 获取安装包及依赖 首先准备一个与目标系统相同的联网系统 安装必要依赖 yum install -y yum-utils 查询对应软件 yum search wget ifconfig netstat telnet 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.tuna.tsinghua.edu.cn ============================================================ N/S matched: wget ============================================================= wget.x86_64 : A utility for retrieving files using the HTTP or FTP protocols =========================================================== N/S matched: telnet ============================================================ perl-Net-Telnet.noarch : Net-Telnet Perl module telnet.x86_64 : The client program for the Telnet remote login protocol telnet-server.x86_64 : The server program for the Telnet remote login protocol tn5250.i686 : 5250 Telnet protocol and Terminal tn5250.x86_64 : 5250 Telnet protocol and Terminal ========================================================= 匹配:ifconfig, netstat ========================================================== net-tools.x86_64 : Basic networking tools 如查询结果,安装net-tools,telnet,wget这3个依赖即可,其中ifconfig和netstat在net-tools模块里。 下载依赖 yumdownloader --resolve net-tools telnet wget 打包依赖 tar czf nettools.offline.tar.gz *.rpm 此时在目录下生成一个文件,nettools.offline.ta.gz 就是离线安装 telnet、ifconfig、netstat和wget 所需的全部依赖了 离线部署 将刚刚生成的nettools.offline.tar.gz 复制到离线部署的机器 解压缩 tar zxf nettools.offline.tar.gz 安装 telnet、ifconfig、netstat和wget rpm -ivh --replacefiles --replacepkgs *.rpm 显示各个命令信息 [root@localhost nettools]# ifconfig --version net-tools 2.10-alpha [root@localhost nettools]# wget --version GNU Wget 1.14 在 linux-gnu 上编译。 [root@localhost nettools]# netstat --version net-tools 2.10-alpha [root@localhost nettools]# telnet telnet> centos
Centos 7.8 离线安装telnet、ifconfig、netstat
猜你喜欢
转载自blog.csdn.net/vlogghd/article/details/131455995
今日推荐
周排行