Install Kanban (kanboard) on Centos 8

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Kanboard is an Open source project management software which helps you to manage your project and visualize your work details. It offers easy to use web interface that allows you to manage your project with ease. You can also integrate kanboard with external programs using plugins.

In this article we will see how to install kanboard / Kanban on CentOS 8.

First, You will install Nginx, MariaDB, PHP and PHP extensions. You can Install all of them using the following single command:

dnf install nginx mariadb-server php php-fpm php-mbstring php-cli php-json php-opcache php-zip php-xml php-gd php-ldap php-mysqli php-sqlite3 php-json php-dom -y

Once the dependencies are installed start and enable them so that they can automatically start after system reboot.

systemctl start mariadb.service
systemctl enable mariadb.service

systemctl status mariadb.service
systemctl start nginx.service
systemctl enable nginx.service
systemctl status nginx.service
systemctl start php-fpm.service
systemctl enable php-fpm.service
systemctl status php-fpm.service 

Next, We will edit the php-fpm configuration file and replace user and group from Apache to nginx.

nano /etc/php-fpm.d/www.conf

save and exit the file. Restart php-fpm service.

systemctl restart php-fpm.service

Kanban uses MariaDB as database so we will configure MariaDB for kanban accordingly.

mysql -u root -p

Now, create a database and user for kanban using following commands:

CREATE DATABASE kanboard CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboard'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;

Download Kanban:

Now, Download the latest version of kanban using the following command:

wget https://github.com/kanboard/kanboard/archive/v1.2.18.tar.gz

Extract the downloaded file.

tar -xvzf v1.2.18.tar.gz

move the extracted directory to the Nginx web root directory.

mv kanboard-1.2.18 /var/www/html/kanboard

configure the kanban.

cd /var/www/html/kanboard
cp config.default.php config.php
nano config.php

change the following lines as per your database:

// Database driver: sqlite, mysql or postgres (sqlite by default)
define('DB_DRIVER', 'mysql');

// Mysql/Postgres username
define('DB_USERNAME', 'kanboard');

// Mysql/Postgres password
define('DB_PASSWORD', 'password');

// Mysql/Postgres hostname
define('DB_HOSTNAME', 'localhost');

// Mysql/Postgres database name
define('DB_NAME', 'kanboard');

save and exit the file.

change the ownership of the file to nginx.

chown -R nginx:nginx /var/www/html/kanboard
chmod -R 775 /var/www/html/kanboard

Configure Nginx for Kanban:

Create an Nginx virtual host configuration file to host kanban. Use the following command to do so:

nano /etc/nginx/conf.d/kanboard.conf

add the following lines:

server {
        listen       80;
        server_name  192.168.189.128;
        index        index.php;
        root         /var/www/html/kanboard;
        client_max_body_size 32M;

        location / {
            try_files $uri $uri/ /index.php$is_args$args;
        }

        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/run/php-fpm/www.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_index index.php;
            include fastcgi_params;
        }

        location ~* ^.+\.(log|sqlite)$ {
            return 404;
        }

        location ~ /\.ht {
            return 404;
        }

        location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ {
            log_not_found off;
            expires 7d;
            etag on;
        }

        gzip on;
        gzip_comp_level 3;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_types
            text/javascript
            application/javascript
            application/json
            text/xml
            application/xml
            application/rss+xml
            text/css
            text/plain;
    }

save and exit the file.

verify the configurations entered in above mentioned file.

nginx -t

Restart nginx to apply the above changes.

systemctl restart nginx.service

You will need to configure SELinux for Kanban. You can configure using the following command:

setsebool httpd_can_network_connect on -P
chcon -R -u system_u -t httpd_sys_rw_content_t -r object_r /var/www/html/kanboard

Allow port 80 and 443 through the firewalld with the following command:

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

Open your web browser and access the kanban dashboard using the URL http://192.168.189.128. You will be redirected to the Kanban admin login page:

Enter admin as username and password to access Kanban Dashboard.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Mel
Melhttps://unixcop.com
Unix/Linux Guru and FOSS supporter

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook