1️⃣ Install Debian 13
最小安裝完成後:
apt update
apt upgrade -y
2️⃣ Enable Root Login
nano /etc/ssh/sshd_config
加入或修改:
PermitRootLogin yes
重新啟動 SSH:
systemctl restart ssh
3️⃣ Set Static IP
nano /etc/network/interfaces
加入:
auto ens18
iface ens18 inet static
address 10.0.0.x
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8 8.8.4.4
up ip route add 10.y.0.0/24 via 10.0.0.z
down ip route del 10.y.0.0/24 via 10.0.0.z
確認無拼字錯誤。
4️⃣ Reboot
reboot
5️⃣ Set DNS
nano /etc/resolv.conf
內容:
nameserver 8.8.8.8
nameserver 8.8.4.4
6️⃣ Test Network
ping google.com
若可解析並 ping 通,表示 DNS 正常。
7️⃣ Edit Hosts
nano /etc/hosts
加入:
10.0.0.w master.ispconfig.domain
(確認 IP 與實際 master 相符)
8️⃣ Install ISPConfig
cd /tmp
wget -O - https://get.ispconfig.org | sh -s -- --interactive
9️⃣ Installation Mode
Installation mode (standard,expert) [standard]: expert
🔟 Join Multiserver Setup
Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: y
11️⃣ MySQL Master Information
MySQL master server hostname []:
master.ispconfig.domain
MySQL master server root password []:
⚠ 必須:
- 知道 master 的 MySQL root password
- 並且 master MySQL 必須允許 slave IP 連線
在 master 上確認:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.0.0.x' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
12️⃣ Keep MySQL Root Password
安裝過程中會顯示:
- MySQL root password
請保存。
13️⃣ Remove Install Logs
rm /root/ispconfig-install-log/setup-*
避免密碼留在系統中。
14️⃣ Set Default PHP Version
update-alternatives --config php
選擇:
php 7.4
否則 slave cronjob 會無法與 master 正常連線。
確認:
php -v
✅ Installation Complete
登入:
https://slave.ispconfig.domain:8080
使用 master 帳號登入。
WordPress Installation
- ISPConfig → Sites → Add Website
- 建立 Database
- 上傳 WordPress
- 設定 wp-config.php
- 完成安裝
如果你需要,我可以:
- 幫你排成「正式教學文件格式」
- 或整理成「公司內部 SOP 文件版」
- 或轉成 PDF 版教學稿
告訴我你要哪種格式。