This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 确保脚本以 root 权限运行 | |
if [ "$EUID" -ne 0 ] | |
then echo "请以 root 权限运行" | |
exit | |
fi | |
# 更新系统包列表 | |
echo "更新系统包列表..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 脚本用于自动化配置 Nginx 以支持 HTTPS 和 WebSocket (WSS) | |
# 新子域名 | |
new_domain=$1 | |
# 检查参数 | |
if [ -z "$new_domain" ]; then | |
echo "Usage: $0 <newdomain.xindamate.com>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 数据库配置变量 | |
DB_USER="xxx" | |
DB_PASSWORD="xxx" | |
DB_NAME="xxx" | |
DB_HOST="0.0.0.0" # 监听所有 IP 地址,根据需要可以修改为特定的外部 IP 地址 | |
# 安装 PostgreSQL | |
echo "Installing PostgreSQL..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 定义数据库相关变量 | |
DB_USER="newxxx" | |
DB_PASSWORD="newxxx" | |
DB_NAME="newxxx" | |
# 确保 PostgreSQL 服务正在运行 | |
sudo systemctl start postgresql |
OlderNewer