以下のVagrantfileを使用して、Mantis Bug TrackerとPostgreSQLがインストールされた仮想マシンを構築する事ができます。
仮想マシン構築後、ブラウザからhttp://192.168.55.105/mantisbt/にアクセスして初期設定を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/debian-9.3"
config.vm.hostname = "db93mantisbtpg"
config.vm.provider :virtualbox do |vbox|
vbox.name = "db93mantisbtpg"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.105", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.105", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
apt-get -y install task-japanese
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
# install postgresql
apt-get -y install postgresql-9.6
echo "listen_addresses='*'" >> /etc/postgresql/9.6/main/postgresql.conf
echo "standard_conforming_strings=off" >> /etc/postgresql/9.6/main/postgresql.conf
#sed -i 's/host.*all.*all.*127.0.0.1/#host all all 127.0.0.1/g' /etc/postgresql/9.6/main/pg_hba.conf
echo "host all all 127.0.0.1/32 password" >> /etc/postgresql/9.6/main/pg_hba.conf
echo "host all all 192.168.1.0/24 password" >> /etc/postgresql/9.6/main/pg_hba.conf
echo "host all all 192.168.55.0/24 password" >> /etc/postgresql/9.6/main/pg_hba.conf
su - postgres << EOF
createdb mantisbt
psql -c "
alter user postgres with password 'postgres';
create user mantisbt with password 'mantisbt';
grant all privileges on database mantisbt to mantisbt;
"
EOF
echo "postgres:postgres" | chpasswd
systemctl restart postgresql.service
apt-get -y install apache2 libapache2-mod-php7.0
apt-get -y install php7.0-pgsql php7.0-cli php7.0-mbstring
# install mantisbt
wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.10.0/mantisbt-2.10.0.tar.gz
tar xvfz mantisbt-2.10.0.tar.gz
mv mantisbt-2.10.0 /opt/mantisbt
chown -R www-data:www-data /opt/mantisbt
ln -s /opt/mantisbt /var/www/html
mkdir -p /var/mantisbt
chown -R www-data:www-data /var/mantisbt
service apache2 restart
echo 'access http://192.168.55.105/mantisbt/'
echo 'db user:mantisbt password:mantisbt db:mantisbt'
echo 'default user: administrator default password: root'
SHELL
end
○Mantis Bug Trackerの初期設定画面
○Mantis Bug Trackerの画面
○関連情報
・Mantis Bug Trackerに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿