安装部署
本文档将指导你完成 TextPress 的安装和部署。
下载源码
你可以通过以下方式获取 TextPress:
Bash
git clone https://github.com/textpress/textpress.git
访问 GitHub Releases 下载最新版本。
配置 Web 服务器
Nginx 配置
Nginx
server {
listen 80;
server_name your-domain.com;
root /var/www/textpress;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
运行安装向导
1
访问安装页面
浏览器打开 http://your-domain/install.php
2
填写数据库信息
输入 MySQL 主机、用户名、密码和数据库名
3
创建管理员账户
设置管理员用户名、邮箱和密码
4
完成安装
点击安装按钮,等待安装完成