centos9 stream 安装postal server
首先安装 Docker Engine
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Start Docker
systemctl start docker
安装postal前置
yum install git curl jq
克隆安装文件
git clone https://github.com/postalserver/install /opt/postal/install
ln -s /opt/postal/install/bin/postal /usr/bin/postal
docker安装数据库
docker run -d \
–name postal-mariadb \
-p 127.0.0.1:3306:3306 \
–restart always \
-e MARIADB_DATABASE=postal \
-e MARIADB_ROOT_PASSWORD=postal \
mariadb
安装postal
postal bootstrap postal.yourdomain.com
postal initialize
postal make-user
启动postal
postal start
添加SSL证书
docker run -d \
–name postal-caddy \
–restart always \
–network host \
-v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \
-v /opt/postal/caddy-data:/data \
caddy
解析IP A记录到IP
浏览器打开域名登录