~~NOTOC~~
~~NOCACHE~~
[[category:IS]]
====== CentOS7 安装 Mantis ======
* 安装apache、mariadb:
* 准备工作:
* 安装EPEL repo并用最新的稳定版本更新系统。
* yum install epel-release -y
* yum update -y
* 安装apache httpd:
* yum install httpd -y
//安装httpd
* systemctl start httpd
//启动httpd
* systemctl enable httpd
//配置自启动
* 安装mariadb server:
* yum install mariadb mariadb-server mariadb-devel -y
* systemctl start mariadb
* systemctl enable mariadb
* 安装php7.1
* Mantis支持PHP大于5.5,这里我们将安装PHP版本7。
* 默认情况下,PHP 7在CentOS存储库中不可用,需要首先安装Webtatic存储库:rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
* 安装php7.1:yum install php71w php71w-cli php71w-mysqli php71w-mbstring -y
* 安装后验证php:php -v
* 安装php8
* yum -y install yum-utils
* yum install epel-release
* sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
* yum-config-manager --enable remi-php80
* yum -y install php php-cli php-fpm php-devel
* 配置mariadb
* 初始化:mysql_secure_installation
* 首先是设置密码,会提示先输入密码
* Enter current password for root (enter for none):
<–初次运行直接回车
* 设置密码
* Set root password? [Y/n]
<– 是否设置root用户密码,输入y并回车或直接回车
* New password:
<– 设置root用户的密码
* Re-enter new password:
<– 再输入一次你设置的密码
* 其他配置
* Remove anonymous users? [Y/n]
<– 是否删除匿名用户,回车
* Disallow root login remotely? [Y/n]
<–是否禁止root远程登录,回车,
* Remove test database and access to it? [Y/n]
<– 是否删除test数据库,回车
* Reload privilege tables now? [Y/n]
<– 是否重新加载权限表,回车
* 初始化MariaDB完成,接下来测试登录:mysql -uroot -p
* 创建mantis数据库和用户:
* CREATE DATABASE mantisdb;
* CREATE USER 'mantis'@'localhost' IDENTIFIED BY 'yourpassword';
* GRANT ALL PRIVILEGES ON testlink.* TO 'mantis'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
* FLUSH PRIVILEGES;
* EXIT;
* 配置mantis
* 下载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
* 重启httpd:systemctl restart httpd
* 浏览:http://your ip:port/mantis
* 按照实际情况输入hostname,databasename(即第3步里面的mantis),username(即第3步里面的user),password(即第3步里面的password)。其中数据库类型可以选择Mysqli。
* 填写好这些内容,点击install/update database即可。
* 配置mantis:
* cd /var/www/html/mantis/config
* rm -rf config_inc.php
* cp config_inc.php.sample config_inc.php
* vim config_inc.php
* 主要的配置如下:
* $g_hostname = 'localhost';
* $g_db_username = 'mantis';
* $g_database_name = 'mantisdb';
* $g_db_type = 'mysqli';
* — Security —$g_crypto_master_salt = 'n3ZjoEXpRhws7Ba/PeX+g+0dDjFJTRvXTWJpIo9EtHo=';
* 如果安装完毕登陆的时候出现如下类似如下错误:$g_crypto_master_salt is not specified correctly in config_inc.php or is shorter than 16 characters long.
需要在点击完 'install/updrage' 按钮之后的界面找到类似“n3ZjoEXpRhws7Ba/PeX+g+0dDjFJTRvXTWJpIo9EtHo=”的字码,在config_inc.php文件中将其赋值给g_crypto_master_salt
* 安装完毕之后删除admin目录并重启httpd.
* 至此,配置Mantis完毕。
* 补充说明:Mantis默认账号密码为 administrator/root
====== CentOS安装禅道ipd系统 ======
* zbox工具使用
* /opt/zbox/zbox --mport=3307 restart
# 一次性修改mysql端口,重启跟随,分开命令的话会失效
* /opt/zbox/zbox --aport=8830 restart
# 一次性修改http端口,重启跟随,分开命令的话会失效
====== zbox、bitnami、lxpp等环境自启动 ======
* 在linux系统自启动文件 /etc/rc.local
中,添加 sudo /opt/zbox/zbox restart
* 需要给/etc/rc.local
文件777权限
====== CentOS搭建php环境的注意点 ======