The steps to install ikuai in vps are as follows
Command operation part
Check the IP address and gateway address of the current vps
ip route
default via 10.0.0.1 dev eth0 proto dhcp src 10.0.0.14 metric 100
10.0.0.0/22 dev eth0 proto kernel scope link src 10.0.0.14Add script
#!/bin/bash
# 檢查是否以 root 用戶運行
if [ "$EUID" -ne 0 ]; then
echo "請以 root 用戶運行此腳本"
exit 1
fi
# 詢問用戶下載 32 位或 64 位版本
read -p "請選擇要下載的 iKuai8 版本 (32/64): " arch
# 根據用戶選擇下載對應的 ISO 鏡像
if [ "$arch" == "32" ]; then
url="https://www.ikuai8.com/download.php?n=/3.x/iso/iKuai8_x32_3.7.20_Build202506041743.iso"
filename="ikuai8_x32.iso"
elif [ "$arch" == "64" ]; then
url="https://www.ikuai8.com/download.php?n=/3.x/iso/iKuai8_x64_3.7.20_Build202506041743.iso"
filename="ikuai8_x64.iso"
else
echo "無效的選擇,請重試"
exit 1
fi
# 下載 ISO 鏡像
echo "正在下載 $filename..."
wget "$url" -O "$filename"
echo "下載完成"
# 掛載 ISO 鏡像
echo "正在掛載 $filename..."
sudo mount -o loop "$filename" /mnt
if [ $? -ne 0 ]; then
echo "掛載 $filename 失敗,請手動檢查"
exit 1
fi
echo "掛載成功"
# 複製啟動文件
echo "正在複製啟動文件..."
sudo cp -rpf /mnt/boot /
# 檢查操作結果
echo "檢查操作結果:"
if [ -f "$filename" ]; then
echo "- $filename 存在"
else
echo "- $filename 不存在"
fi
if mountpoint -q /mnt; then echo "- 掛載成功" else echo "- 掛載失敗" fi
if [ -d "/boot" ]; then echo "- 啟動文件已複製" else echo "- 啟動文件複製失敗" fi
# 檢查主機 IP 地址和網關地址
ip_address=$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)
gateway=$(ip route show | grep default | awk '{print $3}')
echo "- IP 地址: $ip_address"
echo "- 網關地址: $gateway"
echo "所有操作完成,請執行 reboot 重啟 VPS,並通過 VNC 連接控制台"Execute script
chmod +x install_ikuai.sh bash install_ikuai.shFollow the prompts to restart the vps and connect to the vps through the vns console
Console operation part
- Unbind lan port
- Bind wan port
- Set the wan port address and gateway (enter the address and gateway obtained in the first step)
- Enter o to enable WAN port access
- Enter the public address of the vps in the browser to access it