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 |
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 | |
# 脚本用于自动化配置 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 | |
# 确保脚本以 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 | |
# 更新系统软件包列表 | |
sudo apt update | |
# 安装必需的软件包 | |
for pkg in curl wget git vim; do | |
if ! command -v $pkg &> /dev/null; then | |
echo "Installing $pkg..." | |
sudo apt install -y $pkg |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Welcome to nginx!</title> | |
<meta charset="UTF-8"> | |
<style> | |
body { | |
width: 35em; | |
margin: 0 auto; | |
font-family: Tahoma, Verdana, Arial, sans-serif; |
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 | |
# 生成随机密码 | |
POSTGRES_PASSWORD=$(openssl rand -base64 12) | |
# 数据库名称 | |
DATABASE_NAME=server | |
# 创建 Docker 卷 | |
docker volume create postgres_data |
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
i#!/bin/bash | |
# 更新系统软件包列表 | |
sudo apt update | |
# 安装必需的软件包 | |
for pkg in curl wget git vim; do | |
if ! command -v $pkg &> /dev/null; then | |
echo "Installing $pkg..." | |
sudo apt install -y $pkg |
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
vue -V @vue/cli 4.1.2 | |
{ | |
mode: 'development', | |
context: '/Users/didi/Documents/project/test-cli4-driver', | |
node: { | |
setImmediate: false, | |
process: 'mock', | |
dgram: 'empty', | |
fs: 'empty', |
NewerOlder