2018/05/28

How to install MantisBT on Ubuntu 16.04

sudo su
apt update && apt upgrade -y
apt install -y apache2 libapache2-mod-php7.0 php7.0 php7.0-mysql php7.0-xml php-mbstring mysql-server
mysql -uroot -p
CREATE DATABASE mantisbt;
CREATE USER 'mantisbt'@'localhost' IDENTIFIED BY 'mantisbt';
GRANT ALL PRIVILEGES ON mantis.* TO 'mantisbt'@'localhost' IDENTIFIED BY 'mantisbt' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit

wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.14.0/mantisbt-2.14.0.tar.gz
tar zxvf mantisbt-2.14.0.tar.gz
mv mantisbt-2.14.0 /var/www/html/mantisbt
chown -R www-data:www-data /var/www/html/mantisbt
nano /etc/php/7.0/apache2/php.ini

date.timezone = Asia/Taipei
upload_max_filesize = 20M
memory_limit = 256M

nano /etc/apache2/sites-available/mantisbt.conf

<VirtualHost *:80>
ServerAdmin admin
DocumentRoot "/var/www/html/mantisbt"
ServerName localhost
ServerAlias localhost
ErrorLog "/var/log/apache2/mantisbt-error_log"
CustomLog "/var/log/apache2/mantisbt-access_log" combined
<Directory "/var/www/html/mantisbt/">
DirectoryIndex index.php index.html
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

a2ensite mantisbt.conf
systemctl restart apache2

http://localhost/mantisbt/admin/install.php

沒有留言:

張貼留言