<\/span><\/h2>\nFirst, we will need to install the Nginx Web Server, MariaDB database server, PHP and all of the required PHP extensions onto your server. You can install all these packages using the following command:<\/p>\n
apt-get install nginx mariadb-server php7.2 php7.2-mysql php7.2-gd php7.2-mbstring php7.2-common php7.2-opcache php7.2-cli php7.2-xml php7.2-fpm php7.2-zip git unzip<\/pre>\nOnce all the packages are installed, start the Nginx and MariaDB services and enable them to start after system reboot:<\/p>\n
systemctl start nginx\r\nsystemctl start mariadb\r\nsystemctl enable nginx\r\nsystemctl enable mariadb<\/pre>\nOnce you have done, you can proceed to the next step.<\/p>\n
<\/span>Step 3: Configure a Database for Kanboard<\/span><\/h2>\nKanboard uses MariaDB to store its data. Optionally, you can secure MariaDB installation using mysql_secure_installation<\/strong> script:
\nJust in case you need to, the default root password is blank, so you can get around password prompts by simply pressing the [Enter] key.<\/p>\nmysql_secure_installation<\/pre>\nOnce secured, log in to MariaDB shell with the following command:<\/p>\n
mysql -u root -p<\/pre>\nProvide your root password then create a database and user for Kanboard:<\/p>\n
MariaDB [(none)]> CREATE DATABASE kanboarddb;\r\nMariaDB [(none)]> CREATE USER 'kanboard'@'localhost' IDENTIFIED BY 'password<\/span>';<\/pre>\nMake sure to replace “password<\/span>” with a unique and strong password.<\/p>\nNext, grant all the privileges to Kanboard using the following command:<\/p>\n
MariaDB [(none)]> GRANT ALL ON kanboarddb.* TO 'kanboard'@'localhost' WITH GRANT OPTION;<\/pre>\nNext, flush the privileges and exit from the shell with the following commands:<\/p>\n
MariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> EXIT;<\/pre>\n<\/span>Step 4: Install Kanboard<\/span><\/h2>\nYou will need to download the latest version of Kanboard from the Git repository. You can download it to the Nginx web root directory with the following commands:<\/p>\n
cd \/var\/www\/html\/\r\ngit clone https:\/\/github.com\/kanboard\/kanboard.git<\/pre>\nNext, change the directory to kanboard<\/code>, and rename the sample configuration file:<\/p>\ncd kanboard\r\nmv config.default.php config.php<\/pre>\nNext, open the config.php<\/code> file with the nano editor:<\/p>\nnano config.php<\/pre>\nDefine the database settings that you have created earlier as shown below:<\/p>\n
\/\/ Database driver: sqlite, mysql or postgres (sqlite by default)\r\ndefine('DB_DRIVER', 'mysql');\r\n\r\n\/\/ Mysql\/Postgres username\r\ndefine('DB_USERNAME', 'kanboard');\r\n\r\n\/\/ Mysql\/Postgres password\r\ndefine('DB_PASSWORD', 'password<\/span>');\r\n\r\n\/\/ Mysql\/Postgres hostname\r\ndefine('DB_HOSTNAME', 'localhost');\r\n\r\n\/\/ Mysql\/Postgres database name\r\ndefine('DB_NAME', 'kanboarddb');<\/pre>\nSave and close the file. Then, change the ownership of kanboard directory to www-data<\/strong>:<\/p>\nchown -R www-data:www-data \/var\/www\/html\/kanboard<\/pre>\n<\/span>Step 5: Create an Nginx Virtual Host Configuration file for Kanboard<\/span><\/h2>\nKanboard is now ready and configured. Let’s create a new Nginx configuration file inside the \/etc\/nginx\/sites-available\/<\/code> directory:<\/p>\nnano \/etc\/nginx\/sites-available\/kanboard.conf<\/pre>\nAdd the following contents:<\/p>\n
server {\r\n listen 80;\r\n server_name your-domain.com<\/span>;\r\n index index.php;\r\n root \/var\/www\/html\/kanboard;\r\n client_max_body_size 32M;\r\n\r\n location \/ {\r\n try_files $uri $uri\/ \/index.php$is_args$args;\r\n }\r\n\r\n location ~ \\.php$ {\r\n try_files $uri =404;\r\n fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\n fastcgi_pass unix:\/var\/run\/php\/php7.2-fpm.sock;\r\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n fastcgi_index index.php;\r\n include fastcgi_params;\r\n }\r\n\r\n location ~* ^.+\\.(log|sqlite)$ {\r\n return 404;\r\n }\r\n\r\n location ~ \/\\.ht {\r\n return 404;\r\n }\r\n\r\n location ~* ^.+\\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ {\r\n log_not_found off;\r\n expires 7d;\r\n etag on;\r\n }\r\n gzip on;\r\n gzip_comp_level 3;\r\n gzip_disable \"msie6\";\r\n gzip_vary on;\r\n gzip_types\r\n text\/javascript\r\n application\/javascript\r\n application\/json\r\n text\/xml\r\n application\/xml\r\n application\/rss+xml\r\n text\/css\r\n text\/plain;\r\n }<\/pre>\nMake sure to replace “your-domain.com<\/span>” with an actual registered domain name that is set up to work with your server.<\/p>\nSave and close the file. Then, enable the Nginx virtual host file using the following command:<\/p>\n
ln -s \/etc\/nginx\/sites-available\/kanboard.conf \/etc\/nginx\/sites-enabled\/<\/pre>\nFinally, restart the Nginx and PHP-FPM service to apply the configuration:<\/p>\n
systemctl restart php7.2-fpm\r\nsystemctl restart nginx<\/pre>\n