How to install Kanboard project management software on CentOS 8
How to install Kanboard project management software on CentOS 8
Kanboard is an open source project management software that can help you manage projects and visualize workflows. It uses the Kanban method and is designed for small teams that focus on simplicity and simplicity. Kanban provides a simple and easy-to-use web interface that allows you to manage projects through a web browser. You can also use plugins to integrate Kanban into external services.
In this tutorial, we will show you how to install Kanban using Nginx and let us encrypt SSL on CentOS 8.
prerequisites
- Server running CentOS 8.
- A valid domain name pointing to the 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 on the server. You can install all components 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
After installing all the packages, start the Nginx, PHP-FPM and MariaDB services and use the following commands to start them when the system reboots:
systemctl start mariadbsystemctl enable mariadbsystemctl start nginxsystemctl start php-fpmsystemctl enable nginxsystemctl 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 line:
user = nginx group = nginx
Save and close the file, then restart the PHP-FPM service to apply the changes:
systemctl restart php-fpm
Once completed, you can proceed to the next step.
Create a database for Kanban
Kanban uses SQLite and MariaDB as the database backend. Therefore, you will need to create a database and users for Kanban.
First, connect to MariaDB using the following command:
mysql
After connecting, use the following commands to create the database and user:
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, refresh the privileges and exit from MariaDB using the following command:
MariaDB [(none)]> FLUSH PRIVILEGES;MariaDB [(none)]> EXIT;
After creating the database and user, you can proceed to the next step.
Download Kanban
First, you 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
After the download is complete, use the following command to decompress the downloaded file:
tar -xvzf v1.2.18.tar.gz
Next, use the following command to move the extracted directory to the Nginx Web root directory:
mv kanboard-1.2.18 /var/www/html/kanboard
Next, change the directory to the Nginx Web root directory and copy the sample configuration file:
cd /var/www/html/kanboardcp config.default.php config.php
Next, edit the configuration file and define the database settings:
nano config.php
Change the following lines according to 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 done. Next, use the following commands to set ownership and permissions:
chown -R nginx:nginx /var/www/html/kanboardchmod -R 775 /var/www/html/kanboard
Once completed, 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 the board. You can create it with the following command:
nano /etc/nginx/conf.d/kanboard.conf
Add the following line:
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 done. Then, use the following command to verify the syntax error of Nginx:
nginx -t
You should see the following output: Advertising
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 has been configured as a service board. You can now continue to access the Kanban dashboard.
Configure SELinux and firewall
By default, SELinux is enabled in CentOS 8. Therefore, you need to configure SELinux context for Kanban. You can configure it with the following command:
setsebool httpd_can_network_connect on -Pchcon -R -u system_u -t httpd_sys_rw_content_t -r object_r /var/www/html/kanban
Next, use the following command to allow ports 80 and 443 through firewalld:
firewall-cmd --permanent --add-service=httpfirewall-cmd --permanent --add-service=httpsfirewall-cmd --reload
Once completed, you can proceed to the next step.
Access the Kanban dashboard
Now, open your web browser and use the URL to access the Kanban dashboard http://kanban.example.com.You will
Redirect to the kanban administrator login page:
Provide the default user name and password as admin / admin, then click Sign in Button.You should see the Kanban dashboard on the following page: Ads
Let’s encrypt SSL to protect the board
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 using the following command:
wget https://dl.eff.org/certbot-automv certbot-auto /usr/local/bin/certbot-autochown root /usr/local/bin/certbot-autochmod 0755 /usr/local/bin/certbot-auto
Next, use the following command to obtain and install an SSL certificate for your let domain:
certbot-auto --nginx -d kanban.example.com
The above command will first install all the necessary dependencies on the server. After installation, you will be asked to provide an email address and accept the terms 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, choose whether 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 press Enter to continue. After the installation is complete, 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 safely access the board using URL https://kanban.example.com.
in conclusion
Congratulations! You have successfully installed Kanban on Nentx and let us encrypt SSL on CentOS 8. Now you can implement Kanban in the development environment and start working together. If you have any questions, please feel free to ask me.