首页 » PHP教程 » mantisphp7技巧_CentOS7下Mantis安装与设备

mantisphp7技巧_CentOS7下Mantis安装与设备

访客 2024-11-17 0

扫一扫用手机浏览

文章目录 [+]

yum install httpd -y //安装httpd

systemctl start httpd //启动httpd

mantisphp7技巧_CentOS7下Mantis安装与设备

systemctl enable httpd //配置自启动

mantisphp7技巧_CentOS7下Mantis安装与设备
(图片来自网络侵删)

httpd默认是80端口,如果做事器80端口被占用,可以通过修正/etc/httpd/conf/httpd.conf文件改变httpd的端口。

vim /etc/httpd/conf/httpd.conf --> Listen 9900

二、安装php

首先检讨做事器环境是否安装php,Mantis哀求php版今年夜于5.5,演示环境php选择7.1版本。

1、准备事情

安装EPEL repo,否则会在实行第二步时报出非常error: Failed dependencies:epel-release >= 7 is needed by webtatic-release-7-3.noarch。

yum -y install epel-release

2、默认情形下,PHP 7在CentOS存储库中不可用,须要首先安装Webtatic存储库。

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

3、安装php7.1

yum install php71w php71w-cli php71w-mysqli php71w-mbstring -y

三、下载并解压Mantis

wget https://excellmedia.dl.sourceforge.net/project/mantisbt/mantis-stable/2.4.0/mantisbt-2.4.0.zip

unzip mantisbt-2.4.0.zip

mv mantisbt-2.4.0 /var/www/html/mantis

systemctl restart httpd //重启httpd

实行完上述命令,重启httpd,然后在浏览器中访问http://xx.xx.xx.xx:9900/mantis,会涌现如下界面,填写数据库干系信息(Hostname、Username、Password、Database name),点击【Install/Upgrade Database】初始化数据库。

四、配置Mantis

数据库初始化完毕后,须要根据之前数据库干系信息配置mantis的数据库。

cd /var/www/html/mantis/config

rm -rf config_inc.php

cp config_inc.php.sample config_inc.php

vim config_inc.php

详细配置信息如下:

# --- Database Configuration ---$g_hostname = 'xx.xx.xx.xx:3306';$g_db_username = 'root';$g_db_password = '123456';$g_database_name = 'mantis';$g_db_type = 'mysqli'; # --- Security ---$g_crypto_master_salt = '1qaz2wsx3edc4rfv';# Random string of at least 16 chars, unique to the installation # --- Anonymous Access / Signup ---$g_allow_signup= ON;$g_allow_anonymous_login= OFF;#$g_anonymous_account= ''; # --- Email Configuration ---$g_phpMailer_method= PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL$g_smtp_host= 'localhost';# used with PHPMAILER_METHOD_SMTP$g_smtp_username= '';# used with PHPMAILER_METHOD_SMTP$g_smtp_password= '';# used with PHPMAILER_METHOD_SMTP$g_webmaster_email = 'webmaster@example.com';$g_from_email = 'noreply@example.com';# the \"大众From: \"大众 field in emails$g_return_path_email = 'admin@example.com';# the return address for bounced mail # --- Attachments / File Uploads ---$g_allow_file_upload= ON;$g_file_upload_method= DISK;$g_absolute_path_default_upload_folder = '/var/www/html/mantis/upload/'; # used with DISK, must contain trailing \ or /.$g_max_file_size= 5000000;# in bytes # --- Others ---$g_default_language = 'chinese_simplified';

相关文章

php页面缓存输出技巧_PHP输出缓冲及其应用

如上图,是一个大略单纯的缓冲区仿照图,左端入口的数据具有单个输入体积小,速率快,数量多,但右端输出数据具有体历年夜,速率慢的特点。...

PHP教程 2024-12-17 阅读0 评论0

php日期格局date技巧_PHP date 函数

PHP date( 函数PHP date( 函数可把韶光戳格式化为可读性更好的日期和韶光。韶光戳是一个字符序列,表示一定的事宜...

PHP教程 2024-12-17 阅读0 评论0

大数据保额,科技赋能保险业的新征程

随着大数据、云计算、人工智能等技术的飞速发展,保险行业迎来了前所未有的变革。大数据保额作为一种新兴的保险模式,以其精准定价、风险控...

PHP教程 2024-12-17 阅读0 评论0