centos8 centos8.1刚刚发布 闲来没事体验一波

#安装启动的时候修改网卡命名规则,当然这个也参考了阿里云的镜像
net.ifnames=0
#配置网络
systemctl restart NetworkManager
nmcli connection modify ens192 ipv4.addresses 192.168.1.11/24
nmcli connection modify ens192 ipv4.dns 223.5.5.5 ipv4.gateway 192.168.1.251
nmcli con modify eth0 connection.autoconnect yes  #对应onboot=yes
nmcli connection modify ens192 ipv4.method manual #对应的是stati=manual  auto=dhcp
cmcli c up eth0
nmcli device connect eth0
nmcli device reapply eth0
nmcli c reload

#安装docker测试一下
dnf install -y yum-utils   device-mapper-persistent-data   lvm2
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce --nobest -y
cat > /etc/docker/daemon.json << EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "registry-mirrors": ["https://dockerhub.azk8s.cn", "https://docker.mirrors.ustc.edu.cn", "http://hub-mirror.c.163.com/", "https://registry.docker-cn.com"], 
  "storage-driver": "overlay2",
  "storage-opts": ["overlay2.override_kernel_check=true"],
  "insecure-registries": ["127.0.0.1/8"],
  "max-concurrent-downloads": 10,
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
    },
  "data-root": "/var/lib/docker"
}
EOF
systemctl daemon-reload
systemctl restart docker

#防火墙nftables还没有具体看文档
nft list ruleset