Centos 7 系统安装后初始化操作
目录
修改静态 IP
vi /etc/sysconfig/network-scripts/ifcfg-ens33 # 不一定要和这一样,酌情修改
......
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.10.xxx
PREFIX=24
GATEWAY=192.168.10.2
DNS1=192.168.10.2
DNS2=114.114.114.114
init.sh
#!/bin/bash
yum -y install vim wget net-tools tree
systemctl stop firewalld && systemctl disable firewalld
sed -i 's/enforcing/disabled/' /etc/selinux/config
setenforce 0
sed -ri 's/.*swap.*/#&/' /etc/fstab
swapoff -a
systemctl stop NetworkManager && systemctl disable NetworkManager
cat > /etc/profile.d/color.sh << EOF
PS1="\[\e[1;35m\][\[\e[1;34m\]\u\[\e[1;36m\]@\[\e[1;34m\]\h \[\e[1;31m\]\w\[\e[1;35m\]]\[\e[1;36m\]\\$\[\e[0m\]"
EOF
source /etc/profile.d/color.sh
重启
reboot