kanboard
date = 2020-11-11T09:23:35+01:00
Installation du serveur LEMP¶
apt-get install nginx php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mbstring php7.3-json php7.3-opcache php7.3-zip php7.3-xml php7.3-gd php7.3-ldap php7.3-mysql php7.3-json php7.3-sqlite3 wget sudo curl
Si la base se trouve sur le même serveur : Installer les 3 paquets également en plus des autres ci dessous.
- Si base déportée :
- sur le serveur web :
apt install mariadb-client php-pdo-mysql
- sur la base :
apt install mariadb-server
Activation des services¶
systemctl enable --now nginx
systemctl enable --now mariadb
préparation de la base¶
mysql_secure_installation
mysql -u root -p
CREATE DATABASE kanboard CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboard'@'localhost' IDENTIFIED BY 'mypassword';
FLUSH PRIVILEGES;
\q
Installation de kanboard¶
wget https://github.com/kanboard/kanboard/archive/v1.2.16.tar.gz
tar xvf v1.2.16.tar.gz
cp -r kanboard-1.2.16 /var/www/html/kanboard
cd /var/www/html/kanboard
cp config.default.php config.php
Edition du config.php¶
- Mettez vos valeurs
// 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');
puis :
chown -R www-data:www-data /var/www/html/kanboard
NGINX¶
- /etc/nginx/conf.d/kanboard.conf
server {
listen 80;
server_name 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:/var/run/php/php7.3-fpm.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
}
- Si kanboard se trouve dans un sous-dossier :
server {
listen 80;
server_name example.com;
root /var/www/html;
index index.php index.html index.htm;
client_max_body_size 32M;
location / {
try_files $uri $uri/ =404;
}
location ^~ /kanboard {
location /kanboard {
try_files $uri $uri/ /kanboard/index.php$is_args$args;
}
location ~ ^/kanboard/(?:kanboard|config.php|config.default.php) {
deny all;
}
location ~* /kanboard/data {
deny all;
}
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on; # Use only if HTTPS is configured
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
location ~ /kanboard/\.ht {
deny all;
}
}
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;
}
Puis :
nginx -t
systemctl restart nginx
systemctl restart php7.3-fpm