How to Install Kanboard on CentOS 7

Using a Different System?

  • How to Install Kanboard on Debian 9

  • How to Install Kanboard on Ubuntu 18.04 LTS

  • How to Install Kanboard on Fedora 29

Are we missing a guide for your target system? Request one, or submit your own!


Kanboard is a free and open source project management software program which is designed to facilitate and visualize team workflow using the Kanban methodology.

In this article, I will show you how to setup Kanboard on CentOS 7.

Prerequisites

  • A Vultr CentOS 7 server instance, say its IP is 203.0.113.1.
  • A sudo user.

Step 1: Update the system

As usual, log into the server as a sudo user from an SSH terminal, and then update the CentOS 7 system to the latest stable status:

sudo yum install epel-release -ysudo yum update -ysudo shutdown -r now

After the reboot, log back in as the same sudo user and continue to the next step.

Step 2: Install Apache

Install the Apache 2.4 web server for Kanboard using YUM:

sudo yum install httpd -y

Remove the preset Apache welcome page:

sudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf

Prevent Apache from exposing files to visitors:

sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf

Start the Apache service:

sudo systemctl start httpd.servicesudo systemctl enable httpd.service

Step 3: Install MariaDB 10.1

By default, Kanboard use SQLite to store its data. Alternatively, you can choose MariaDB 10 or greater to enhance performance in a production environment.

Copy the following code segment into your SSH terminal, then press Enter to import the repo file:

cat <<EOF | sudo tee -a /etc/yum.repos.d/MariaDB.repo# MariaDB 10.1 CentOS repository list - created 2017-01-14 03:11 UTC# http://downloads.mariadb.org/mariadb/repositories/[mariadb]name = MariaDBbaseurl = http://yum.mariadb.org/10.1/centos7-amd64gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDBgpgcheck=1EOF

Install MariaDB 10.1 using YUM:

sudo yum install MariaDB-server MariaDB-client -y

Start the MariaDB service:

sudo systemctl start mariadb.servicesudo systemctl enable mariadb.service

Secure the installation of MariaDB:

sudo /usr/bin/mysql_secure_installation

Reply to the questions on the screen as shown below. For security purposes, you should always setup a private and strong MariaDB root password.

Enter current password for root (enter for none): EnterSet root password? [Y/n]: YNew password: <your-password>Re-enter new password: <your-password>Remove anonymous users? [Y/n]: YDisallow root login remotely? [Y/n]: YRemove test database and access to it? [Y/n]: YReload privilege tables now? [Y/n]: Y

Step 4: Install PHP 7

Kanboard requires PHP 5.3.9 or greater. In order to get best performance, you can install PHP 7.1 and its necessary dependencies using the Webtatic YUM repo as follows:

sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmsudo yum install php71w php71w-mysqlnd php71w-gd php71w-mbstring php71w-common php71w-ldap php71w-opcache php71w-cli -y

Step 5: Install Kanboard

Download and install the latest release of Kanboard:

cd /var/www/htmlsudo wget https://kanboard.net/kanboard-latest.zipsudo yum install unzip -ysudo unzip kanboard-latest.zipsudo chown -R apache:apache kanboard/datasudo rm kanboard-latest.zip

Setup a MySQL database and a database user for Kanboard:

mysql -u root -p -e "CREATE DATABASE kanboard;" mysql -u root -p kanboard < /var/www/html/kanboard/app/Schema/Sql/mysql.sqlmysql -u root -p -e "CREATE USER 'kanboarduser'@'localhost' IDENTIFIED BY 'yourpassword';"mysql -u root -p -e "GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboarduser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;"mysql -u root -p -e "FLUSH PRIVILEGES;"

Note:

  1. When prompted, input the MariaDB root password you had setup earlier.
  2. You should choose a strong user password other than the one listed above.

Update the Kanboard configuration file in order to switch to MySQL:

cd /var/www/html/kanboardsudo mv config.default.php config.phpsudo vi config.php

Find the following lines:

// Database driver: sqlite, mysql or postgres (sqlite by default)define('DB_DRIVER', 'sqlite');// Mysql/Postgres usernamedefine('DB_USERNAME', 'root');// Mysql/Postgres passworddefine('DB_PASSWORD', '');// Mysql/Postgres hostnamedefine('DB_HOSTNAME', 'localhost');// Mysql/Postgres database namedefine('DB_NAME', 'kanboard');

Modify them in accordance with:

// Database driver: sqlite, mysql or postgres (sqlite by default)define('DB_DRIVER', 'mysql');// Mysql/Postgres usernamedefine('DB_USERNAME', 'kanboarduser');// Mysql/Postgres passworddefine('DB_PASSWORD', 'yourpassword');// Mysql/Postgres hostnamedefine('DB_HOSTNAME', 'localhost');// Mysql/Postgres database namedefine('DB_NAME', 'kanboard');

Restart Apache:

 sudo systemctl restart httpd.service

Allow visitors access Kanboard on port 80:

sudo firewall-cmd --zone=public --permanent --add-service=httpsudo firewall-cmd --reload

Finally, point your web browser to http://203.0.113.1/kanboard to start using Kanboard. Use the following default credentials to log in:

  • Username: admin
  • Password: admin

Note: For security purposes, remember to modify admin’s password using the users management link from the upper right-hand admin drop-down menu.

Step 6 (Optional): Setup Zend OpCache

In order to achieve best performance on your Kanboard server, you can adjust the settings of Zend OpCache which has been enabled by default.

For example, when using Kanboard on a single-node setup in production as we intended in this article, you can use the following settings as a starter to optimize Zend OpCache.

Open the Zend OpCache configuration file:

sudo vi /etc/php.d/opcache.ini

Modify the file in accordance with the following settings:

zend_extension=opcache.so;opcache.enable=1;opcache.file_cache=/tmp/opcacheopcache.validate_timestamps=0opcache.revalidate_freq=0opcache.memory_consumption=192opcache.interned_strings_buffer=16opcache.max_accelerated_files=1979opcache.fast_shutdown=1

Save and quit:

:wq!

Restart the Apache service in order to put your changes into effect:

sudo systemctl restart httpd.service

Later, you can fine tune your settings by editing relevant lines in the /etc/php.d/opcache.ini file again.

Step 7 (Optional): Setup a daily cron job for reports and analytics

In order to generate accurate reports and analytics, you need to setup a daily cron job using the apache user:

sudo crontab -u apache -e

Populate the crontab file with:

0 3 * * * cd /var/www/html/kanboard && ./cli cronjob >/dev/null 2>&1

Save and quit:

:wq!

In this fashion, all of the reports and analytics will be updated at 3:00 AM everyday.

That concludes our tutorial. Thanks for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.