X2board安装详细教程 后端对接



项目地址
https://github.com/cedar2025/Xboard
服务器升级apt update -y && apt install wget curl sudo git -y


1.安装dockercurl -fsSL https://get.docker.com | bash -s docker


2.安装aapanelURL=https://www.aapanel.com/script/install_6.0_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO "$URL" ;else wget --no-check-certificate -O install_6.0_en.sh "$URL";fi;bash install_6.0_en.sh aapanel


3.aapanel安装数据库
MySQL 5.7
Nginx 任意版本
4.新建网站
在 Domain 填入你指向服务器的域名
在 Database 选择MySQL
在 PHP Verison 选择纯静态
5.拉取数据# 删除目录下文件 chattr -i .user.ini rm -rf .htaccess 404.html index.html .user.ini


6.执行命令从 Github 克隆到当前目录。git clone https://github.com/cedar2025/Xboard.git ./


7.复制一份docker-compose.yaml文件cp docker-compose.sample.yaml docker-compose.yaml


8.执行命令安装依赖包以及Xboarddocker compose run -it --rm xboard sh init.sh


根据提示完成安装 执行这条命令之后,会返回你的后台地址和管理员账号密码(你需要记录下来)
你需要执行下面的 启动xborad 步骤之后才能访问后台
9.启动dockerdocker compose up -d


10.设置反向代理
站点设置 > 反向代理 > 添加反向代理
在 代理名称 填入 Xboard
在 目标URL 填入 http://127.0.0.1:7001 修改反向代理规则为:location ^~ / { proxy_pass http://127.0.0.1:7001; proxy_http_version 1.1; proxy_set_header Connection ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header Scheme $scheme; proxy_set_header Server-Protocol $server_protocol; proxy_set_header Server-Name $server_name; proxy_set_header Server-Addr $server_addr; proxy_set_header Server-Port $server_port; proxy_cache off; }


11.后续更新
进入shell访问站点的路径后(如:/www/wwwroot/你的站点域名)docker compose run -it --rm xboard sh update.sh


重启dockerdocker compose restart


后端
https://github.com/wyx2685/V2bXwget -N https://raw.githubusercontent.com/wyx2685/V2bX-script/master/install.sh && bash install.sh


评论