centos minimal 处理

centos minimal 处理

  1. 网络设置
  2. 主机名设置
  3. 防火墙设置
  4. yum国内源设置
  5. 配置免密ssh
  6. 一些必须工具
    • jdk java开发
    • lrzsz 上传下载
    • wget 网络下载
    • telnet 网络相关
    • bind* 网络相关
    • net-tools 网络相关
    • nscd dns相关
    • docker 容器相关
  7. docker阿里镜像源
# 设置网络
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

IPADDR=
NETMASK=
GATEWAY=
# 主机名设置
hostnamectl --static set-hostname xxx
# 防火墙设置
systemctl stop firewalld
systemctl disable firewalld
# ssh免密, 复制本地的id_rsa.pub公钥串到目标主机的~/.ssh/authorized_keys 即可

# wget,没有则安装
yum list wget 
yum install wget -y
# yum 国内源设置
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all

yum makecache

# 一些工具
yum install telnet bind* nscd yum-utils   device-mapper-persistent-data lvm2 net-tools 

# 安装docker
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo

sudo yum install docker-ce docker-ce-cli containerd.io

systemctl enable docker

systemctl start docker
# docker 配置阿里云镜像加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://m3lbzk97.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

# DNS设置
vi /etc/resolv.conf
发布了161 篇原创文章 · 获赞 140 · 访问量 47万+

猜你喜欢

转载自blog.csdn.net/qq_37933685/article/details/103755742
今日推荐