How to Install Mantis Bug Tracker on CentOS 7

Prerequisites

Update System

sudo yum -y update
sudo yum -y install epel-release

Install LAMP Server

sudo yum -y install httpd
sudo systemctl start httpd.service && systemctl enable httpd.service
sudo systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-01 04:05:26 UTC; 2min 8s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 387 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─387 /usr/sbin/httpd -DFOREGROUND
├─388 /usr/sbin/httpd -DFOREGROUND
├─389 /usr/sbin/httpd -DFOREGROUND
├─390 /usr/sbin/httpd -DFOREGROUND
├─391 /usr/sbin/httpd -DFOREGROUND
└─392 /usr/sbin/httpd -DFOREGROUNDJan 01 04:05:26 Tue 2019-01-01systemd[1]: Starting The Apache HTTP Server...
Jan 01 04:05:26 Tue 2019-01-01systemd[1]: Started The Apache HTTP Server.
sudo yum -y install mariadb mariadb-server
sudo systemctl start mariadb && sudo systemctl enable mariadb
sudo systemctl status mariadb.service[root@Sajid ~]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-01 14:47:40 UTC; 22s ago
Main PID: 18035 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─18035 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─18192 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/ma...Jan 01 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: The latest information about MariaDB is available at http://mariadb.org/.
Jan 01 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: You can find additional information about the MySQL part at:
Jan 01 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: http://dev.mysql.com
Jan 01 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: Support MariaDB development by buying support/new features from MariaDB
Jan 01 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: Corporation Ab. You can contact us about this at sales@mariadb.com.
Jan 01 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: Alternatively consider joining our community based development effort:
Jan 01 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
Jan 01 14:47:39 ip-172-31-22-142 mysqld_safe[18035]: 170208 14:47:39 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jan 01 14:47:39 ip-172-31-22-142 mysqld_safe[18035]: 170208 14:47:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jan 01 14:47:40 ip-172-31-22-142 systemd[1]: Started MariaDB database server.
sudo mysql_secure_installation
mysql -u root -p
CREATE DATABASE mantis_data;
CREATE USER 'mantis_user'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON mantis_data.* TO 'mantis_user'@'localhost';
FLUSH PRIVILEGES;
exit
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
sudo yum -y install php71w php71w-cli php71w-mysqli

Install Mantis

wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.18.0/mantisbt-2.18.0.zip
unzip mantisbt-2.18.0.zip
sudo mv mantisbt-2.18.0 /var/www/html/mantis
chown -R apache:apache /var/www/html/mantis

Create a Virtual Host

sudo nano /etc/httpd/conf.d/mantis.conf
<VirtualHost *:80>
ServerAdmin admin@YourDomain.com
DocumentRoot "/var/www/html/mantis"
ServerName YourDomain.com
<Directory />
Options FollowSymLinks
AllowOverride All
<Directory "/var/www/html/mantis/">
Options MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
TransferLog /var/log/httpd/mantis_access.log
ErrorLog /var/log/httpd/mantis_error.log
</VirtualHost>
sudo systemctl restart httpd
sudo firewall-cmd --zone=public --permanent --add-service=httpsudo firewall-cmd --reload

Mantis Web Interface

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store