How to Install Kanboard Project Management Software on CentOS 8
Kanboard is an open-source project management software that helps you to manage your projects and visualize your workflow. It uses Kanban methodology and is specially designed for small teams that focus on minimalism and simplicity. Kanban provides a simple and easy to use web interface that allows you to manage your project through a web browser. You can also integrate Kanban to external services using the plugins.
In this tutorial, we will show you how to install Kanban with Nginx and Let's Encrypt SSL on CentOS 8.
Prerequisites
- A server running CentOS 8.
- A valid domain name pointed with your server IP.
- A root password is configured on your server.
Install LEMP Server
First, you will need to install Nginx, MariaDB, PHP and other PHP extensions to your server. You can install all of them with the following 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 all the packages are installed, start the Nginx, PHP-FPM and MariaDB service and enable them to start at system reboot with the following command:
systemctl start mariadb
systemctl enable mariadb
systemctl start nginx
systemctl start php-fpm
systemctl enable nginx
systemctl enable php-fpm
Next, edit the PHP-FPM configuration file and change the user and group from apache to nginx.
nano /etc/php-fpm.d/www.conf
Change the following lines:
user = nginx group = nginx
Save and close the file then restart the PHP-FPM service to apply the changes:
systemctl restart php-fpm
Once you are finished, you can proceed to the next step.
Create a Database for Kanban
Kanban uses SQLite and MariaDB as a database backend. So you will need to create a database and user for Kanban.
First, connect to the MariaDB with the following command:
mysql
Once connected, create a database and user with the following command:
MariaDB [(none)]> CREATE DATABASE kanboard CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboard'@'localhost' IDENTIFIED BY 'password';
Next, flush the privileges and exit from the MariaDB with the following command:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Once the database and user is created, you can proceed to the next step.
Download Kanban
First, you will need to download the latest version of Kanban from the Git Hub repository. You can download it with the following command:
wget https://github.com/kanboard/kanboard/archive/v1.2.18.tar.gz
Once the download is completed, extract the downloaded file with the following command:
tar -xvzf v1.2.18.tar.gz
Next, move the extracted directory to Nginx web root directory with the following command:
mv kanboard-1.2.18 /var/www/html/kanboard
Next, change the directory to Nginx web root and copy the sample config file:
cd /var/www/html/kanboard
cp config.default.php config.php
Next, edit the configuration file and define your database settings:
nano config.php
Change the following lines as per your database:
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 close the file when you are finished. Next, set the ownership and permissions with the following command:
chown -R nginx:nginx /var/www/html/kanboard
chmod -R 775 /var/www/html/kanboard
Once you are finished, you can proceed to the next step.
Configure Nginx for Kanban
Next, you will need to create an Nginx virtual host configuration file to host Kanban. You can create it with the following command:
nano /etc/nginx/conf.d/kanboard.conf
Add the following lines:
server { listen 80; server_name kanboard.example.com; 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 close the file when you are finished. Then, verify the Nginx for syntax error with the following command:
nginx -t
You should see the following output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Finally, restart the Nginx service to apply the changes:
systemctl restart nginx
At this point, Nginx is configured to serve kanban. You can now proceed to access the kanban dashboard.
Configure SELinux and Firewall
By default, SELinux is enabled in CentOS 8. So you will need to configure SELinux context for Kanban. You can configure it with 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/kanban
Next, 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
Once you are finished, you can proceed to the next step.
Access Kanban Dashboard
Now, open your web browser and access the kanban dashboard using the URL http://kanban.example.com. You will be
redirected to the Kanban admin login page:
Provide, default username and password as admin / admin and click on the Sign in button. You should see the Kanban dashboard in the following page:
Secure Kanban With Let's Encrypt SSL
Next, you will need to install the Certbot utility in your system to download and install Let's Encrypt SSL for Let's Chat domain.
You can install the Certbot client with the following command:
wget https://dl.eff.org/certbot-auto
mv certbot-auto /usr/local/bin/certbot-auto
chown root /usr/local/bin/certbot-auto
chmod 0755 /usr/local/bin/certbot-auto
Next, obtain and install an SSL certificate for your lets domain with the following command:
certbot-auto --nginx -d kanban.example.com
The above command will first install all the required dependencies on your server. Once installed, you will be asked to provide an email address and accept the term of service as shown below:
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator nginx, Installer nginx Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel): [email protected] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must agree in order to register with the ACME server at https://acme-v02.api.letsencrypt.org/directory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (A)gree/(C)ancel: A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about our work encrypting the web, EFF news, campaigns, and ways to support digital freedom. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: Y Obtaining a new certificate Performing the following challenges: http-01 challenge for kanban.example.com Waiting for verification... Cleaning up challenges Deploying Certificate to VirtualHost /etc/nginx/conf.d/kanban.conf
Next, select whether or not to redirect HTTP traffic to HTTPS as shown below:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Type 2 and hit Enter to continue. Once the installation has been finished, you should see the following output:
Redirecting all traffic on port 80 to ssl in /etc/nginx/conf.d/kanban.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations! You have successfully enabled https://kanban.example.com You should test your configuration at: https://www.ssllabs.com/ssltest/analyze.html?d=kanban.example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/kanban.example.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/kanban.example.com/privkey.pem Your cert will expire on 2021-04-2. To obtain a new or tweaked version of this certificate in the future, simply run certbot-auto again with the "certonly" option. To non-interactively renew *all* of your certificates, run "certbot-auto renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
You can now access your Kanban securely using the URL https://kanban.example.com.
Conclusion
Congratulations! you have successfully installed Kanban with Nginx and Let's Encrypt SSL on CentOS 8. You can now implement Kanban in the development environment and start working together. Feel free to ask me if you have any questions.