-
配置镜像
-
获取自己的镜像地址
-
写入docker-setting
-
测试是否成功
docker info
-
-
以特权程序创建和运行容器,便于使用服务
docker run -d --name centos --privileged=true centos:centos7 /usr/sbin/init
docker exec -it centos /bin/bash
docker centos
-
docker pull centos:latest
-
Linux中必备常用支持库的安装
在CentOS安装软件的时候,可能缺少一部分支持库,而报错。这里首先安装系统常用的支持库。那么在安装的时候就会减少很多的错误的出现。
# yum install -y epel-release # yum install -y gcc gdb strace gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs patch e2fsprogs-devel krb5-devel libidn libidn-devel openldap-devel nss_ldap openldap-clients openldap-servers libevent-devel libevent uuid-devel uuid mysql-devel
-
安装vim
yum -y install vim*
-
配置vim
-
vim /etc/vimrc
-
找个位置添加以下代码
set su set showmode set ruler set autoindent syntax on
:wq
保存并退出
-
-
卸载
yum remove -y vim*
-
安装
ifconfig
、firewall
、nmcli
、nmtui
yum install net-tools.x86_64
yum install firewalld firewall-config
yum install NetworkManager
yum install NetworkManager-tui
-
防火墙的关闭
systemctl stop firewalld
systemctl disable firewalld.service