diff --git a/wp.sh b/wp.sh new file mode 100644 index 0000000..044325c --- /dev/null +++ b/wp.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# 使用黄色字体提示用户输入域名 +echo -e "\033[33m请输入您的域名(确保已经解析到本机): \033[0m" +read DOMAIN + +# 更新系统包 +sudo apt update && sudo apt upgrade -y + +# 安装必要的软件包 +sudo apt install -y mariadb-server php php-mysql php-fpm php-curl php-json php-cgi php-mbstring php-xml php-gd php-xmlrpc php-soap php-intl php-zip wget unzip + +# 启动并启用MariaDB +sudo systemctl start mariadb +sudo systemctl enable mariadb + +# MariaDB安全设置 +sudo mysql_secure_installation < /etc/caddy/Caddyfile" <