-
Notifications
You must be signed in to change notification settings - Fork 1
/
dev.sh
35 lines (26 loc) · 1.02 KB
/
dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
echo "Please set utf8 if Chinese garbled under minGW"
echo "不认证主机公钥"
sed -i 's/^#\s\+StrictHostKeyChecking ask/StrictHostKeyChecking no/' \
/etc/ssh/ssh_config
echo "将yum的base源设置为aliyun"
if [ -z "`sed -n -e '/aliyun.*CentOS-7/p' /etc/yum.repos.d/CentOS-Base.repo`" ]; then
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl -o /etc/yum.repos.d/CentOS-Base.repo \
http://mirrors.aliyun.com/repo/Centos-7.repo
fi
echo "禁用fastmirror插件"
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
echo "yum安装git"
yum install -y git
echo "yum安装vim"
yum install -y vim
echo "yum安装gcc等(用来编译keepalived)"
yum install -y gcc openssl-devel libnl3-devel net-snmp-devel libnfnetlink-devel
# 修复NetworkManager与network冲突的问题
echo "禁用NetworkManager"
systemctl disable NetworkManager
echo "设置CST时区"
timedatectl set-timezone Asia/Shanghai
echo "重启依赖系统时间的服务"
systemctl restart rsyslog
systemctl restart crond