MySQL 資料庫
參考 MySQL Replication 設定。要注意的是因為做的是 DNS Round Robin,所以隨機兩台主機都要設定 master-slave 兩種角色同時運行,我參考 Digital Ocean 的文章完成。
同步腳本
因為 WordPress 要處理 cache、files 資料夾,腳本請參閱 FTP Replication。
#!/bin/bash | |
if [ "$EUID" -ne 0 ]; then | |
echo "Please run as root." | |
exit | |
fi | |
IDENTITY="/home/user0/.ssh/id_rsa" | |
REMOTE="user0@H1:pool" | |
LOG="H0.log" | |
cd WWW_PATH | |
while true; do | |
raw=$(inotifywait -rq --excludei "thumbs.db" -e delete -e moved_to -e close_write -e create --timefmt "%y/%m/%d %T" --format "%T %e %w%f" WWW_PATH) | |
echo ${raw} >> ${LOG} | |
IFS=" " read -a actions <<< ${raw} | |
action=${actions[2]} | |
# Remove the prefix. | |
path=${actions[3]#WWW_PATH} | |
# Remove the file name part. | |
path=${path%/*} | |
RSYNC_RSH="ssh -i ${IDENTITY}" RSYNC_PATH -rltgoD --delete --progress ${path} ${REMOTE} >> ${LOG} | |
done | |
cd ~ |
15/10/04 21:37:05 CREATE /var/www/example.com/index.html
#!/bin/bash | |
if [ "$EUID" -ne 0 ]; then | |
echo "Please run as root." | |
exit | |
fi | |
SRC="POOL_PATH" | |
LOG="H1.log" | |
cd $SRC | |
while true; do | |
raw=$(inotifywait -rq --excludei "thumbs.db" -e delete -e moved_to -e close_write -e create --timefmt "%y/%m/%d %T" --format "%T %e %w%f" $SRC) | |
echo ${raw} >> ${LOG} | |
IFS=" " read -a actions <<< ${raw} | |
action=${actions[2]} | |
# Remove the prefix. | |
path=${actions[3]#${SRC}/} | |
# Remove the file name part. | |
path=${path%/*} | |
RSYNC_PATH -rltgoD --delete --progress ${path} WWW_PATH >> ${LOG} | |
chown -R www-data: WWW_PATH | |
done | |
cd ~ |
0. 試著聯繫 Whois 上面錯誤的 Email。
1. 透過 ICANN 投訴。
2. 法院傳票要回。
I was not able to duplicate this in another account. You may want to try using an alternate email address.