1.机器初始化
#vim change_host_configuration.sh
#!/bin/bash
yum install -y epel-release wget vim ntpdate net-tools lrzsz
yum install htop -y
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
cat >>/root/.bashrc<<EOF
##change configuration
export HISTFILESIZE=100000
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S " ##(history 显示时间)
export PS1='\[\e[32;1m\][\[\e[36;1m\]\u@\h \[\e[33;1m\]\w \[\e[32;1m\]\t \[\e[34;1m\]#\#\[\e[32;1m\]]\\$ \[\e[0;0m' ###(显示主机名 目录 时间)
ulimit -c unlimited
ulimit -HSn 1024000
echo "%e.core" > /proc/sys/kernel/core_pattern
EOF
wget http://file.zhidianjh.com/change_host_configuration/change_host_configuration.sh && bash -x change_host_configuration.sh && source /root/.bashrc
curl http://file.zhidianjh.com/change_host_configuration/change_host_configuration.sh | bash -x && source /root/.bashrc
2.修改主机名
hostnamectl set-hostname hdss7-200.host.com