Ubuntu Postfix Mail Server 設定筆記 (六) SMTP/POP3/IMAP TLS 加密 (Let’s Encrypt 免費證書)

本系列第六篇: 使用 Let’s Encrypt 免費證書加密 SMTP

前面第四篇已設定好了 Dovecot SMTP 認證,
但在多數 MUA 上無法啓用連綫加密,原因是我們未設定好加密的證書。

轉眼距離上一篇已經兩年多,
現在已經是全民加密,免費證書的年代了,就用 Let’s Encrypt 搞個免費證書吧。

Continue reading “Ubuntu Postfix Mail Server 設定筆記 (六) SMTP/POP3/IMAP TLS 加密 (Let’s Encrypt 免費證書)”

Shadowsocks Linux Server / Qnap NAS 安裝 (Docker)

Server 端安裝


docker pull oddrationale/docker-shadowsocks
docker run -d -p 1989:1989 oddrationale/docker-shadowsocks -s 0.0.0.0 -p 1989 -k somepassword -m aes-256-cfb

Port 1989 和 somepassword 可自行更改


1. Create Container > Docker Hub 找到 oddrationale/docker-shadowsocks, 按 “Install”
2. 設定

Command:

 -s 0.0.0.0 -p 1989 -k somepassword -m aes-256-cfb

Entry Point 保持原有

/usr/local/bin/ssserver

按 Advanced Setting > Network 加入 Port Forwarding:

Port 1989 / 1989 / TCP

Port 1989 和 somepassword 可自行更改

如有 Router 自行設定 Port Forward



Client 端安裝

下載 Windows/Mac/Linux/Android/iOS Client端:
https://shadowsocks.org/en/download/clients.html

設定指向Server:Port, Proxy Port = 1080, Password = somepassword
然後點選 ShadowSocks On

Firefox 設定 Proxy = SOCK5 127.0.0.1:1080, Remote DNS On
IE/Edge/Chrome 使用系統 (IE)設定

然後測試 Google / Youtube 應該可以載入成功

MySQL Percona Galera Cluster with phpMyAdmin export

Galera Cluster have some limitations, for example all tables MUST have primary key.

In recent version, pxc_strict_mode is introduced to avoid unsupported features that can risk your data and server stability

One common trap is that SQL file exported with phpMyAdmin create index AFTER creating the table and inserting data.

During import, there is a transit state that table have no primary key and data need to insert to table, thus trigger the pxc_strict_mode error.

#1105 - Percona-XtraDB-Cluster prohibits use of DML command on a table (database.table) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

Continue reading “MySQL Percona Galera Cluster with phpMyAdmin export”