今天在docker的mysql容器中需要修改mysql的配置文件,发现容器中没有安装vim,使用vi时提示
bash: vi: command not found
因此详细记录下安装vim的过程
我安装的mysql容器是debian操作系统
1.在centos的任务目录下创建source.list文件
cd / #进入根目录
vi source.list # 直接编辑source.list
输入以下内容:
deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backpor