yum download dependent files
Download dependent yum rpm package for offline installation.
外网装个一样环境的虚机 用 mkdir /root/1 yum install cloud-init --downloadonly --downloaddir=/root/1 yum install cloud-utils --downloadonly --downloaddir=/root/1 然后把rpm包拷进内网, cd /root/1 yum localinstall * -y
Turn off the firewall
CentOS7 turn off the firewall
# 关闭 systemctl stop firewalld.service systemctl disable firewalld.service # 打开 systemctl start firewalld.service systemctl enable firewalld.service
Change the hostname
CentOS7 change the hostname, effective immediately, is not lost after restart
hostnamectl set-hostname 主机名称
disk partition
Execute shell:
磁盘分区 fdisk $mount_point<<EOF n p 1 w EOF
Mounting swap partition
Execute shell
swapoff –a mkswap $mount_point swapon –a echo "$mount_point swap swap defaults 0 0" >> /etc/fstab
ssh refused landing
Delete deny list:
we /etc/hosts.deny
Delete inside ip