〇Kanboardの画面
仮想マシンの構築
以下のVagrantfileを使用して、KanboardとPostgreSQL10をインストールした仮想マシンを構築できます。仮想マシン構築後、ブラウザからhttp://192.168.55.107/kanboard/にアクセスします。
デフォルトユーザのユーザ名はadmin、パスワードもadminです。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-7.5"
config.vm.hostname = "co75kanboard124pg10"
config.vm.provider :virtualbox do |vbox|
vbox.name = "co75kanboard124pg10"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.107", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.107", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
localectl set-locale LANG=ja_JP.UTF-8
# download and install postgresql.
wget https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
rpm -Uvh pgdg-centos10-10-2.noarch.rpm
yum -y update
yum -y install postgresql10-server postgresql10-devel postgresql10-contrib
systemctl enable postgresql-10
# initialize postgresql server
/usr/pgsql-10/bin/postgresql-10-setup initdb
echo "listen_addresses='*'" >> /var/lib/pgsql/10/data/postgresql.conf
sed -i 's/host.*all.*all.*127.0.0.1/#host all all 127.0.0.1/g' /var/lib/pgsql/10/data/pg_hba.conf
echo "host all all 127.0.0.1/32 password" >> /var/lib/pgsql/10/data/pg_hba.conf
echo "host all all 192.168.1.0/24 password" >> /var/lib/pgsql/10/data/pg_hba.conf
echo "host all all 192.168.55.0/24 password" >> /var/lib/pgsql/10/data/pg_hba.conf
systemctl start postgresql-10.service
# create users and databases...
su - postgres << EOF
createdb -T template0 --locale=ja_JP.UTF-8 --encoding=UTF8 kanboard
psql -c "
alter user postgres with password 'postgres';
create user kanboard with password 'kanboard';
alter database kanboard owner to kanboard;
"
EOF
systemctl restart postgresql-10.service
# install
yum -y install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# install apache2 and kanboard
yum -y install --enablerepo=remi,remi-php71 httpd php php-mbstring php-pgsql php-gd php-dom unzip
wget https://github.com/kanboard/kanboard/archive/v1.2.4.zip
unzip v1.2.4.zip
mv kanboard* /opt/kanboard
cp /opt/kanboard/config.default.php /opt/kanboard/config.php
sed -i -e "s#define('DB_DRIVER', 'sqlite');#define('DB_DRIVER', 'postgres');#" /opt/kanboard/config.php
sed -i -e "s#define('DB_USERNAME', 'root');#define('DB_USERNAME', 'kanboard');#" /opt/kanboard/config.php
sed -i -e "s#define('DB_PASSWORD', '');#define('DB_PASSWORD', 'kanboard');#" /opt/kanboard/config.php
sed -i -e "s#define('DB_HOSTNAME', 'localhost');#define('DB_HOSTNAME', '127.0.0.1');#" /opt/kanboard/config.php
chown -R apache:apache /opt/kanboard
sudo ln -s /opt/kanboard/ /var/www/html/
systemctl restart httpd
echo 'access http://192.168.55.107/kanboard/'
echo 'user: admin, password: admin'
SHELL
end
関連情報
・Kanboardの設定・操作方法については「Kanboardの設定・操作」を参照してください。・Kanboardに関する他の記事はこちらを参照してください。
・Kanboardのgithubリポジトリ
https://github.com/kanboard/kanboard
0 件のコメント:
コメントを投稿