一般在docker镜像中,查看容器中的服务状态什么的和测试服务都特费力,你会发现容器中啥组建都没有安装。
以下整理几个常见组件的安装方法:

容器环境是ubuntu, 本人虽然不太喜欢ubuntu不过,作为容器的基础镜像,它的确比centos要小不少。所以还算是个比较好的基础镜像吧。

如果你想安装任何组件,第一步你需要更新包源。
apt-get update

1. apt-get update 太慢如何换源

a:清空/etc/apt/sources.list文件

echo > /etc/apt/sources.list

b:向/etc/apt/sources.list文件写入阿里云镜像地址

cat >> /etc/apt/sources.list <<EOF
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
EOF

2. 安装组件

1. rpm 找不到

bash: rpm: command not found
---
apt-get install rpm

3. netstat 找不到

-bash: netstat: command not found"问题
---
apt install -y net-tools --force-yes

4. telnet 找不到

-bash: telnet: command not found"问题
---
apt install -y telnet --force-yes

xxx(telnet, netstat): command not found相关推荐

  1. node-sass安装失败 error D:\xxx\xxx\node_modules\node-sass: Command failed.(window + mac M1 pro)

    error D:\xxx\xxx\node_modules\node-sass: Command failed. 导言:运行老项目的时候经常遇到node-sass安装不下来的问题,百度搜索更是千篇一律 ...

  2. Xcode10 报错 target xxx(project 'xxx')has copy command from ‘xxx/xxx’ to ''xxx/xxx.app/COPYING'解决方案

    Xcode10默认使用最新的系统,但运行旧APP时候就会报错 Showing Recent Messages :-1: Multiple commands produce 'xxx/xxx.app/C ...

  3. npm install安装失败 error D:\xxx\xxx\node_modules\node-sass: Command failed. Exit code: 1

    报错完整信息如下: error D:\xxx\xxx\node_modules\node-sass: Command failed. Exit code: 1 Command: node script ...

  4. node-sass安装失败 error D:\xxx\xxx\node_modules\node-sass: Command failed.

    node-sass安装失败 error D:\xxx\xxx\node_modules\node-sass: Command failed.(window + mac M1 pro) error D: ...

  5. IDEA启动单元测试报错,Shorten command line for xxx;Shorten command line不显示

    很多人都知道去Edit configuration 找Shorten comand line,但有时候单元测试的配置中找不到 Shorten comand line,不是没有而是被隐藏了,默认没有显示 ...

  6. Linux网络故障排查命令(ifconfig、ping、telnet、netstat、lsof、nc、curl、tcpdump)

    目录 ifconfig -s,显示网卡信息的精简列表 -a.up.down 将IP地址绑定到某个网卡,以及解绑操作 ping telnet netstat lsof nc 模拟一个服务器程序和客户端程 ...

  7. 在docker容器里的Linux环境下,执行netstat命令显示 command not found

    在docker容器里 root@38f61d87d288:/# netstat -ano | grep 80 bash: netstat: command not found 于是想安装 netsta ...

  8. netstat 为什么不显示进程 PID / Program Name

    问题: 一些应用程序绑定到一个特定端口突然不能启动由于端口冲突. telnet 命令对 port 表明套接字是开放的,但没有过程可以被识别. 一个破折号(-)被列"PID /Program ...

  9. linux_端口占用扫描port scan(lsof/ss/netstat/Nmap)使用实例

    文章目录 linux_端口占用扫描port scan lsof root权限 example lsof & grep more examples netstat&ss netstat ...

  10. 除了SSH,linux也可以使用telnet连接

    一键安装: yum install xinetd telnet telnet-server -y 离线安装: 下载地址:https://share.ljserver.cn/file/soft/linu ...

最新文章

  1. 大数据产品不仅仅是IT工具
  2. Saltstack使用(基础)
  3. SIMD学习 -- 用SSE2指令作点乘和累加计算
  4. php简单环境,PHP 简单的环境搭建
  5. 咸宁省2021年模拟高考成绩查询怎么查,2021咸宁市地区高考成绩排名查询,咸宁市高考各高中成绩喜报榜单...
  6. MongoTemplate.findById查不到数据的一种情况:由写入时未指定_id造成的
  7. 5g理论速度_华为5G随行WiFi Pro 有多强 我们试一下NSA网络下的5G速度
  8. java excel 电话号码_数值或者电话号码被EXCEL转成了科学计数法,用XSSFCell 如何读取...
  9. 敏捷落地的会议和工具
  10. 修改系统时间,TFS会无法登陆
  11. 微信小程序---家庭记账本开发(三)
  12. 模组厂商对话 MTK:智能音箱市场谈红海还早,下一个爆品将诞生丨WARE 2018
  13. Atitit 项目管理软件 在线服务 attilax总结 1. 项目管理协作的历史 1 1.1. Worktile 406k 1 1.2. Teambition  584k in baidu
  14. 蚂蚁金服 Service Mesh 落地实践与挑战,附全套PPT下载
  15. Java8新特性 Stream流式思想(三)
  16. React Native之携程Moles框架
  17. 浮点数的指数函数的计算
  18. 第一代程序员王小波 (送书活动)
  19. 如何度量测试开发的价值产出?
  20. t460 拆解_ThinkPad T460s开箱及更换内存和硬盘

热门文章

  1. js重力感应小球游戏
  2. AB PLC 1769模拟量模块量程转换
  3. Openerp权限设置总结
  4. GTA4 EFLC cheat code
  5. 关于严蔚敏老师《数据结构(C语言版)》书中代码的误解
  6. linux KVM的网络设置方法(bridge和nat)
  7. 小米手机相机英文翻译
  8. 1000+常用Python库大全,太实用了!
  9. iOS开发 非常全的三方库、插件、大牛博客等等
  10. python转pyd