---
# System prepended metadata

title: 騰訊雲裝主控3.0

---

## 　第一步、更新Centos Repo

```
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum makecache
```


## 　第二步、調整sshd

```
echo -e '@daily rm -rf /data/cache/*\n' | crontab -
timedatectl set-timezone Asia/Shanghai
systemctl stop firewalld > /dev/null 2>&1
systemctl disable firewalld > /dev/null 2>&1
systemctl stop postfix > /dev/null 2>&1
systemctl disable postfix > /dev/null 2>&1
sed -i "s/#\?Port.*/Port 63112/" /etc/ssh/sshd_config
sed -i "s/#\?PermitRootLogin.*/PermitRootLogin yes/" /etc/ssh/sshd_config
sed -i "/#\?PasswordAuthentication.*/d" /etc/ssh/sshd_config
sed -i "/#PermitEmptyPasswords no/aPasswordAuthentication yes" /etc/ssh/sshd_config
semanage port -a -t ssh_port_t -p tcp 63112
systemctl restart sshd
```


## 　第三步、安裝雙網卡設定檔自動化程式

```
wget https://iso-1255486055.cos.ap-guangzhou.myqcloud.com/nic-hotplug.tgz
tar -zxvf nic-hotplug.tgz
cd nic-hotplug
chmod +x ./install.sh
./install.sh
reboot
```


## 　第四步、重開機後使用59118端口查看網卡路由

```
ip route show
確定兩行
```


xxxx dev eth0 proto kernel scope link src xxxxx
xxxx dev eth1 proto kernel scope link src xxxxx



## 　第五步、填寫路由表

<font color="#f00">
編輯rc.local

`vim /etc/rc.d/rc.local`

內網的副IP 第二行填寫正確IP
 </font> 

```
ip route add default via 10.0.xx.1 dev eth1 table 2
ip rule add from 10.0.xx.xx/32 table 2
```

`chmod +x /etc/rc.d/rc.local`

## 　第六步、主控安裝
```
echo "34.132.0.157 sign.antsxdp.com" >> /etc/hosts
wget -O install.sh http://download.antsxdp.com/nginx20/3.0/install.sh
```

<font color="#f00">
擇1主控安裝
 </font> 
 
主控A
`bash install.sh -i 20.24.88.33 -p fa2a5a0b`
主控B
`bash install.sh -i 13.75.120.157 -p fa2a5a0b`
主控C
`bash install.sh -i 13.94.41.196 -p fa2a5a0b`

## 　第七步、Zabix

```
sudo bash -c "$(wget -qO- https://oss.k2dns2.com/tool/zabix.sh)"
```

Zabbix執行如果有錯誤要調整下 阿里雲正式帳號OSS的 /tool/zabix.sh
