---
# System prepended metadata

title: '[節點] 節點安裝1.0版本'

---

# 節點安裝1.0版本

## <span class="red">步驟一</span> 、執行Preinstall.sh腳本
**該指令要切root 並且要有 wget (GCP 預設沒有須先安裝wget)**
```
sudo su -
yum install wget -y
```


[點此參照Preinstall說明執行](https://hackmd.io/@47aHWKkwTqeMfAcDncIT3g/SynfDr3dp)   
    
<br><br><br><br>

## <span class="red">步驟二</span> 、安裝節點

**1.0.14指令**
`yum install -y wget && wget -O install.sh http://download.antsxdp.com/nginx/install_114-f.sh && sh install.sh`

**輸入主控A的IP**
`8.218.25.81`


**1.0.21指令**
```
wget -O /root/modules.tar.gz  http://download.antsxdp.com/nginx/1.21-f/nginx/modules.tar.gz
rm -rf /home/local/nginx/modules
tar xfz /root/modules.tar.gz  -C /home/local/nginx/
rm -rf /home/local/nginx/sbin/nginx
wget -O /home/local/nginx/sbin/nginx  http://download.antsxdp.com/nginx/1.21-f/nginx/sbin/nginx
chmod +x /home/local/nginx/sbin/nginx
/home/local/nginx/sbin/nginx -t
pkill nginx
echo > /home/local/nginx/logs/error.log
```

**1.0.23指令**

```
cd /home/local/nginx/modules
rm -rf ngx_http_waf_module.so
wget download.antsxdp.com/nginx/ngx_http_waf_module.so
pkill nginx
```

**檢查配置**

`sudo cat /home/local/nginx/conf/config.json`

**確認是否如圖所示**
![image](https://hackmd.io/_uploads/rkcvYyPLp.png)

<br><br><br>

## <span class="red">步驟三</span> 、装Blacklist

```
sudo -i
cd /home/local/nginx/sbin/
wget -O install.sh http://download.antsxdp.com/blacklist2.sh && sh install.sh
```


`sudo cat /home/local/nginx/sbin/blacklist_config.yaml`

**主控A是 master_url: 'http://cdn1689.k2net.com' 如果不是 请再做一次步驟三**
![image](https://hackmd.io/_uploads/S1l55JwLp.png)


**確認blacklist是否有安裝完成**
```
systemctl restart blacklist
sudo systemctl status blacklist
```
![image](https://hackmd.io/_uploads/r16C9yP8a.png)

**都安裝好後重啟機器**

`reboot`

<br><br><br><br><br><br>

## <span class="red">步驟四</span> 、主控A加節點

**在發現節點裡面設置節點**

![image](https://hackmd.io/_uploads/Hkrl_ZDLa.png)

![image](https://hackmd.io/_uploads/SkkN_-wU6.png)

**在節點列表 案"更新" 更新節點**
![image](https://hackmd.io/_uploads/HkNA_ZPUT.png)

**在業務分組 的 "k2net" "設置解析" 去新增 新的節點的 兩個IP**
![image](https://hackmd.io/_uploads/H11XtbP8p.png)

**使用ctrl +f 的方式搜索到IP後 批量添加 "兩組IP" 
(ctrl +f 有小BUG 針對第二步 一直按enter 邊滑滑鼠滾輪)**

![image](https://hackmd.io/_uploads/rylqtbwIp.png)


