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

Cómo instalar Mantis Bug Tracker en CentOS 8

MantisBT es un software de seguimiento de errores gratuito, de código abierto y basado en la web, escrito en PHP. Es simple, fácil de usar, fácil de usar y viene con muchas herramientas que lo ayudan a colaborar con los equipos para resolver errores y problemas rápidamente. Ofrece un amplio conjunto de características que incluyen notificación por correo electrónico, control de acceso basado en funciones, proyectos, subproyectos y compatibilidad con categorías, gráfico de relación de problemas, panel de control personalizable y mucho más.

En este tutorial, le mostraremos cómo instalar el sistema de seguimiento de errores Mantis en CentOS 8.

Requisitos

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

Instalar servidor LAMP

Primero, deberá instalar el servidor web Apache, el servidor MariaDB, PHP y otros paquetes necesarios en su sistema. Puede instalarlos todos con el siguiente comando:

dnf install httpd mariadb-server php php-mysqli php-mbstring php-curl unzip -y

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

systemctl start httpd
systemctl start mariadb
systemctl enable httpd
systemctl enable mariadb

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

Crear una base de datos para Mantis

Mantis usa MariaDB o MySQL como base de datos. Por lo tanto, deberá crear una base de datos y un usuario para Mantis.

Primero, inicie sesión en el shell de MariaDB con el siguiente comando:

mysql

Una vez que inicie sesión, cree una base de datos y un usuario con el siguiente comando:

MariaDB [(none)]> CREATE DATABASE mantisdb;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON mantisdb.* TO 'mantis'@'localhost' IDENTIFIED BY 'mantispassword';

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

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

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

Instalar Mantis

Primero, descargue la última versión de Mantis desde el sitio web de Sourceforge con el siguiente comando:

wget https://excellmedia.dl.sourceforge.net/project/mantisbt/mantis-stable/2.24.2/mantisbt-2.24.2.zip

Una vez completada la descarga, descomprima el archivo descargado con el siguiente comando:

unzip mantisbt-2.24.2.zip

A continuación, copie el directorio extraído en el directorio raíz de Apache con el siguiente comando:

cp -r mantisbt-2.24.2 /var/www/html/mantis

A continuación, cambie la propiedad del directorio mantis a apache:

chown -R apache:apache /var/www/html/mantis

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

Configurar Apache para Mantis

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

nano /etc/httpd/conf.d/mantis.conf

Agregue las siguientes líneas:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/mantis"
ServerName mantis.linuxbuz.com
<Directory "/var/www/html/mantis/">
Options MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

TransferLog /var/log/httpd/mantis_access.log
ErrorLog /var/log/httpd/mantis_error.log

</VirtualHost>

Guarde y cierre el archivo cuando haya terminado, luego reinicie el servicio Apache para aplicar los cambios:

systemctl restart httpd

También puede verificar el estado de Apache con el siguiente comando:

systemctl status httpd

Deberías obtener el siguiente resultado:

? httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           ??php-fpm.conf
   Active: active (running) since Sat 2020-09-19 11:06:51 EDT; 37s ago
     Docs: man:httpd.service(8)
 Main PID: 41737 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 25014)
   Memory: 25.0M
   CGroup: /system.slice/httpd.service
           ??41737 /usr/sbin/httpd -DFOREGROUND
           ??41738 /usr/sbin/httpd -DFOREGROUND
           ??41739 /usr/sbin/httpd -DFOREGROUND
           ??41740 /usr/sbin/httpd -DFOREGROUND
           ??41741 /usr/sbin/httpd -DFOREGROUND

Sep 19 11:06:51 centos8 systemd[1]: Starting The Apache HTTP Server...

Asegure Mantis 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 su sitio web de Mantis.

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

Luego, obtenga e instale un certificado SSL para su sitio web de Mantis con el siguiente comando:

certbot-auto --apache -d mantis.linuxbuz.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 apache, Installer apache
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 mantis.linuxbuz.com
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/apache/conf.d/mantis.conf

A continuación, deberá elegir 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/apache/conf.d/mantis.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://mantis.linuxbuz.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=mantis.linuxbuz.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/mantis.linuxbuz.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/mantis.linuxbuz.com/privkey.pem
   Your cert will expire on 2020-03-23. 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

Configurar SELinux y Firewall

De manera predeterminada, SELinux está habilitado en CentOS 8. Por lo tanto, deberá configurarlo para su sitio web de Mantis.

Puede configurar SELinux 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/mantis

Luego, permita el puerto 80 y 443 a través del firewall 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 a la interfaz de usuario web de Mantis

Ahora, abra su navegador web y acceda a la interfaz web de Mantis usando la URL https://mantis.linuxbuz.com. Debería ver la siguiente pantalla:

Proporcione su nombre de base de datos, nombre de usuario, nombre de usuario de administrador, contraseña, correo electrónico y haga clic en Instalar/Actualizar Botón de base de datos. Una vez completada la instalación, debería ver la siguiente pantalla:

A continuación, haga clic en "Continuar ", debería ver la página de inicio de sesión de Mantis BT en la siguiente pantalla:

Proporcione un administrador de nombre de usuario predeterminado de Mantis y haga clic en Iniciar sesión botón. Se le pedirá que proporcione la contraseña como se muestra en la siguiente pantalla:

Proporcione la contraseña predeterminada de Mantis "root" y haga clic en el botón Iniciar sesión. Será redirigido a la siguiente pantalla:

Se recomienda cambiar su contraseña de administrador predeterminada. Proporcione su contraseña actual, nueva contraseña, correo electrónico, nombre real, nivel de acceso, nivel de acceso al proyecto y haga clic en Actualizar usuario botón. Debería ver el panel de control de Mantis en la siguiente pantalla:

Conclusión

¡Felicidades! Ha instalado correctamente Mantis con Let's Encrypt SSL en CentOS 8. Ahora puede implementar Mantis en su entorno de desarrollo y colaborar con los equipos. Siéntase libre de preguntarme si tiene alguna pregunta.


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

  2. Cómo instalar Apache Cassandra en CentOS 8

  3. Cómo instalar Apache en CentOS 7

  4. Cómo instalar Apache Cassandra en CentOS 7

  5. Cómo instalar Mantis Bug Tracker en CentOS 7

Cómo instalar Streama en CentOS 7

Cómo instalar Apache CouchDB en CentOS 7

Cómo instalar Webmin en CentOS 8

Cómo instalar Magento en CentOS 8

Cómo instalar Apache ActiveMQ y Hawt.io en CentOS 8

Cómo instalar Apache en CentOS 8