GNU/Linux >> Tutoriales Linux >  >> Cent OS

Cómo instalar el software de gestión de proyectos Kanboard en CentOS 8

Kanboard es un software de gestión de proyectos de código abierto que le ayuda a gestionar sus proyectos y visualizar su flujo de trabajo. Utiliza la metodología Kanban y está especialmente diseñado para equipos pequeños que se enfocan en el minimalismo y la simplicidad. Kanban proporciona una interfaz web simple y fácil de usar que le permite administrar su proyecto a través de un navegador web. También puede integrar Kanban a servicios externos utilizando los complementos.

En este tutorial, le mostraremos cómo instalar Kanban con Nginx y Let's Encrypt SSL en CentOS 8.

Requisitos

  • Un servidor que ejecuta CentOS 8.
  • Un nombre de dominio válido apuntado con la IP de su servidor.
  • Se ha configurado una contraseña raíz en su servidor.

Instalar servidor LEMP

Primero, deberá instalar Nginx, MariaDB, PHP y otras extensiones de PHP en su servidor. Puede instalarlos todos con el siguiente comando:

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

Una vez que todos los paquetes estén instalados, inicie el servicio Nginx, PHP-FPM y MariaDB y habilítelos para que se inicien al reiniciar el sistema con el siguiente comando:

systemctl start mariadb
systemctl enable mariadb
systemctl start nginx
systemctl start php-fpm
systemctl enable nginx
systemctl enable php-fpm

A continuación, edite el archivo de configuración de PHP-FPM y cambie el usuario y el grupo de apache a nginx.

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

Cambie las siguientes líneas:

user = nginx
group = nginx

Guarde y cierre el archivo y luego reinicie el servicio PHP-FPM para aplicar los cambios:

systemctl restart php-fpm

Una vez que haya terminado, puede continuar con el siguiente paso.

Crear una base de datos para Kanban

Kanban usa SQLite y MariaDB como base de datos. Por lo tanto, deberá crear una base de datos y un usuario para Kanban.

Primero, conéctese a MariaDB con el siguiente comando:

mysql

Una vez conectado, cree una base de datos y un usuario con el siguiente comando:

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';

A continuación, elimine los privilegios y salga de MariaDB con el siguiente comando:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Una vez que se crea la base de datos y el usuario, puede continuar con el siguiente paso.

Descargar Kanban

Primero, deberá descargar la última versión de Kanban del repositorio de Git Hub. Puedes descargarlo con el siguiente comando:

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

Una vez que se complete la descarga, extraiga el archivo descargado con el siguiente comando:

tar -xvzf v1.2.18.tar.gz

A continuación, mueva el directorio extraído al directorio raíz web de Nginx con el siguiente comando:

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

A continuación, cambie el directorio a la raíz web de Nginx y copie el archivo de configuración de muestra:

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

A continuación, edite el archivo de configuración y defina la configuración de su base de datos:

nano config.php

Cambie las siguientes líneas según su base de datos:

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');

Guarde y cierre el archivo cuando haya terminado. A continuación, establezca la propiedad y los permisos con el siguiente comando:

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

Una vez que haya terminado, puede continuar con el siguiente paso.

Configurar Nginx para Kanban

A continuación, deberá crear un archivo de configuración de host virtual de Nginx para alojar Kanban. Puedes crearlo con el siguiente comando:

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

Agregue las siguientes líneas:

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;
    }

Guarde y cierre el archivo cuando haya terminado. Luego, verifique el error de sintaxis de Nginx con el siguiente comando:

nginx -t

Debería ver el siguiente resultado:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Finalmente, reinicie el servicio Nginx para aplicar los cambios:

systemctl restart nginx

En este punto, Nginx está configurado para servir kanban. Ahora puede proceder a acceder al tablero kanban.

Configurar SELinux y Firewall

De manera predeterminada, SELinux está habilitado en CentOS 8. Por lo tanto, deberá configurar el contexto de SELinux para Kanban. Puedes configurarlo con el siguiente comando:

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

A continuación, permita los puertos 80 y 443 a través del cortafuegos con el siguiente comando:

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

Una vez que haya terminado, puede continuar con el siguiente paso.

Acceder al panel Kanban

Ahora, abra su navegador web y acceda al tablero kanban usando la URL http://kanban.example.com . serás 

redirigido a la página de inicio de sesión del administrador de Kanban:

Proporcione un nombre de usuario y contraseña predeterminados como admin / admin y haga clic en Iniciar sesión botón. Debería ver el panel Kanban en la siguiente página:

Asegure Kanban con Let's Encrypt SSL

A continuación, deberá instalar la utilidad Certbot en su sistema para descargar e instalar Let's Encrypt SSL para el dominio Let's Chat.

Puede instalar el cliente Certbot con el siguiente comando:

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

A continuación, obtenga e instale un certificado SSL para su dominio de Lets con el siguiente comando:

certbot-auto --nginx -d kanban.example.com

El comando anterior instalará primero todas las dependencias requeridas en su servidor. Una vez instalado, se le pedirá que proporcione una dirección de correo electrónico y acepte el término del servicio como se muestra a continuación:

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

A continuación, seleccione si desea redirigir o no el tráfico HTTP a HTTPS como se muestra a continuación:

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

Escriba 2 y presione Entrar para continuar. Una vez finalizada la instalación, debería ver el siguiente resultado:

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

Ahora puede acceder a su Kanban de forma segura utilizando la URL https://kanban.example.com .

Conclusión

¡Felicidades! Ha instalado correctamente Kanban con Nginx y Let's Encrypt SSL en CentOS 8. Ahora puede implementar Kanban en el entorno de desarrollo y comenzar a trabajar juntos. Siéntase libre de preguntarme si tiene alguna pregunta.


Cent OS
  1. Cómo instalar MongoDB en CentOS 8

  2. Cómo instalar Nginx en CentOS 7

  3. Cómo instalar XWiki en CentOS 7

  4. Cómo instalar el software de gestión de proyectos MyCollab en CentOS 7

  5. Cómo instalar Taiga Project Management en CentOS 8

Cómo instalar el software de gestión empresarial Flectra con Nginx en CentOS 8

Cómo instalar XAMPP en CentOS 8

Cómo instalar Nginx en CentOS

Cómo instalar Nginx en CentOS 6

Cómo instalar Kanboard en CentOS 7

¿Cómo instalar Nginx en CentOS 7?