Image

在本指南中,我们将在虚拟服务器上安装 Mantis 应用程序,以免每次都做同样的工作,我们将采用程序集 Debian 12 上的 Web 堆栈。 该程序集专门用于快速部署需要 php 和 mariadb 的 Web 应用程序。 从官网下载最新版本,通过浏览器安装。 所有必要的服务都已安装和配置。 您还可以订购预装 Mantis 的 vps 服务器,您只需要指定登录名和密码即可进行管理。
1. 下载最新版本的 Mantis
版本 2.25.7
apt update && apt upgrade
wget https://deac-ams.dl.sourceforge.net/project/mantisbt/mantis-stable/2.25.7/mantisbt-2.25.7.zip
unzip mantisbt-2.25.7.zip -d /var/www/
mv /var/www/mantisbt-2.25.7/ /var/www/domain.tld

2. 创建数据库并写入设置

mariadb -u root

create database mantis;
grant all privileges on mantis.* to user@localhost identified by 'your-password';
flush privileges;
exit;

3. 网络服务设置

为我们的域分配权限并创建配置文件:

chown www-data:www-data /var/www/domain.tld/ -R
mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/domain.tld.conf

配置文件:

/etc/nginx/conf.d/domain.tld.conf

server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/domain.tld;
index index.php index.html index.htm index.nginx-debian.html;

location / {
try_files $uri $uri/ /index.php;
}

location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
}

location /phpmyadmin {
auth_basic "Admin Login";
auth_basic_user_file /etc/nginx/pma_access;
}

# A long browser cache lifetime can speed up repeat visits to your page
location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
access_log off;
log_not_found off;
expires 360d;
}

# disable access to hidden files
location ~ /\.ht {
access_log off;
log_not_found off;
deny all;
}
}

将 ftp 用户的主目录更改为我们的主目录:

/etc/passwd

ftpuser:x:1000:1000:,,,:/var/www/domain.tld:/bin/bash

让我们为配置更改 phpMyAdmin 的路径:

ln -s /usr/share/phpmyadmin /var/www/domain.tld/
service nginx restart

将 domain.tld 更改为您已经在 DNS 编辑器中配置的 VPS 服务器的 ip 地址。 这样,您可以依此类推添加多个站点。 使用配置的 http://domain.tld/ 域转到浏览器并在浏览器中完成安装。 需要删除安装目录,修改配置文件中的管理员密码。

4. 要完成安装,请点击以下链接:

http://server-ip/

刷新页面并测试应用程序。

行政部门。


螳螂安装完成。




暂时没有评论