Usando Linux para muchas cosas y disfrutando de videojuegos, en dispositivos moviles, consolas y pc. Using Linux for many things and enjoying video games, mobile devices, consoles and pc

Mostrando entradas con la etiqueta request tracker manual. Mostrar todas las entradas
Mostrando entradas con la etiqueta request tracker manual. Mostrar todas las entradas

Como instalar y configurar RT y RTIR en Ubuntu Linux

Como instalar y configurar RT y RTIR en Ubuntu server

La organización habla muy bien de tus procesos y una forma de poner orden es por medio de tickets, estos te servirán para dejar un rastro de cuando comenzó todo, quien se hizo cargo y como lo resolvieron. Hoy te mostrare como instalar y configurar RT (Request Tracker) y RTIR (Request Tracker for Incident Response) en un servidor Linux Ubuntu paso a paso.

RT y RTIT son productos de la compañia Best Practical Solutions en USA y brindan diferentes servicios en base a estos desde el 2001.

Requerimientos para instalar RT y RTIR en Linux Ubuntu



Como instalar RT y RTIR en Ubuntu Server


Mariadb para RT y RTIR en Ubuntu Server

-Abrimos una consola e instalamos MariaDB y sus dependencias

sudo apt install mariadb-server mariadb-client libmysqlclient-dev

Apache2 para RT y RTIR en Ubuntu Server

-Instalamos Apache2 y dependencias

sudo apt install make apache2 libapache2-mod-fcgid libssl-dev libyaml-perl libgd-dev libgd-gd2-perl libgraphviz-perl

Perl para RT y RTIR en Ubuntu Server

-Instalamos módulos de perl necesitados para nuestra implementación. Debemos prestar atención de instalarlos todos o podemos tener errores después que no nos dejaran instalar RT. Mas abajo instalaremos de forma manual los que no se encuentran como deb

sudo apt install libwww-perl libcss-squish-perl libmodule-versions-report-perl libcatalyst-plugin-log-dispatch-perl libregexp-common-perl libuniversal-require-perl libtext-wrapper-perl  libtext-password-pronounceable-perl libtime-modules-perl liblist-moreutils-perl libscalar-util-numeric-perl libdatetime-locale-perl libtext-template-perl libhtml-scrubber-perl libcache-simple-timedexpiry-perl   liblocale-maketext-lexicon-perl libdigest-whirlpool-perl libregexp-common-net-cidr-perl libtext-quoted-perl libmime-tools-perl libdevel-globaldestruction-perl  liblocale-maketext-lexicon-perl libregexp-common-net-cidr-perl libdbix-searchbuilder-perl libdevel-stacktrace-perl libhtml-rewriteattributes-perl libgnupg-interface-perl libperlio-eol-perl libdata-ical-perl libtext-wikiformat-perl libhtml-mason-perl libapache-session-browseable-perl libcgi-psgi-perl libhtml-mason-psgihandler-perl  libcgi-emulate-psgi-perl libconvert-color-perl liblocale-maketext-fuzzy-perl libhtml-quoted-perl libdatetime-perl libnet-cidr-perl libregexp-ipv6-perl libregexp-common-email-address-perl libipc-run3-perl  libxml-rss-perl libconfig-json-perl starlet libgd-text-perl libgd-graph-perl libdatetime-format-natural-perl libhtml-formattext-withlinks-andtables-perl libcrypt-eksblowfish-perl libemail-address-list-perl libsymbol-global-name-perl libdate-extract-perl librole-basic-perl libjavascript-minifier-xs-perl libcss-minifier-xs-perl libnet-ip-perl libdata-guid-perl libdate-manip-perl libfile-which-perl libcrypt-ssleay-perl libstring-shellquote-perl libcrypt-x509-perl libdata-page-perl libtest-exception-perl libset-intspan-perl libhook-lexwrap-perl libnet-whois-ripe-perl

-Descargamos el módulo  Mozilla::CA
wget -c http://search.cpan.org/CPAN/authors/id/A/AB/ABH/Mozilla-CA-20160104.tar.gz

-Descomprimimos el archivo y entramos a su directorio
tar xzvf Mozilla-CA-20160104.tar.gz
cd Mozilla-CA-20160104/

-Compilamos e instalamos
perl Makefile.PL
make
sudo make install
cd

-Descargamos el módulo Data::Page::Pageset
wget -c http://search.cpan.org/CPAN/authors/id/C/CH/CHUNZI/Data-Page-Pageset-1.02.tar.gz

-Descomprimimos el archivo y entramos a su directorio
tar xzvf Data-Page-Pageset-1.02.tar.gz
cd Data-Page-Pageset-1.02

-Compilamos e instalamos
perl Makefile.PL
make
sudo make install
cd

-Descargamos el módulo Business::Hours
wget -c http://search.cpan.org/CPAN/authors/id/R/RU/RUZ/Business-Hours-0.12.tar.gz

-Descomprimimos y entramos a su directorio
tar xzvf Business-Hours-0.12.tar.gz
cd Business-Hours-0.12

-Compilamos e instalamos
perl Makefile.PL
make
sudo make install
cd

-Descargamos el módulo Parse::BooleanLogic
wget -c http://search.cpan.org/CPAN/authors/id/R/RU/RUZ/Parse-BooleanLogic-0.09.tar.gz

-Descomprimimos y entramos a su directorio
tar xzvf Parse-BooleanLogic-0.09.tar.gz
cd Parse-BooleanLogic-0.09

-Compilamos e instalamos
perl Makefile.PL
make
sudo make install
cd

RT y RTIR en Ubuntu Server

-Descargamos las últimas versiones disponibles de RT y RTIR. Hay que tener cuidado porque RTIR generalmente tiene una versión para RT. Normalmente siempre seran las ultimas en su sitio oficial

wget -c https://download.bestpractical.com/pub/rt/release/rt-4.4.2.tar.gz
wget -c https://download.bestpractical.com/pub/rt/release/RT-IR-4.0.0.tar.gz

-Creamos un usuario rt y lo agregamos al grupo www-data
sudo adduser --system --group rt
sudo usermod -aG rt www-data

-Descomprimimos el archivo de rt y entramos a su directorio
tar xzvf rt-4.4.2.tar.gz
cd rt-4.4.2/

-Nos preparamos para compilar

./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd

-El listado de dependencias es largo por lo que es recomendable primero filtrar si hay alguna faltante. Si todo esta ok, no debe devolver ningún mensaje, sino, instala la que falte y vuelve a repetir el comando

make testdeps | grep MISSING

-Cuando ya todo está ok los mensajes en pantalla seran parecidos a los que te muestro aqui debajo. Todas las dependencias de perl estan instaladas

make testdeps               
/usr/bin/perl ./sbin/rt-test-dependencies --with-mysql --with-fastcgi
perl:
>=5.10.1(5.22.1) ...found
users:
rt group (rt) ...found
bin owner (root) ...found
libs owner (root) ...found
libs group (bin) ...found
web owner (www-data) ...found
web group (www-data) ...found
CLI dependencies:
LWP ...found
Text::ParseWords ...found
HTTP::Request::Common ...found
Term::ReadKey ...found
Term::ReadLine ...found
Getopt::Long >= 2.24 ...found
CORE dependencies:
Regexp::Common ...found
Mail::Mailer >= 1.57 ...found
CGI::Emulate::PSGI ...found
MIME::Entity >= 5.504 ...found
HTML::RewriteAttributes >= 0.05 ...found
List::MoreUtils ...found
Tree::Simple >= 1.04 ...found
Text::Wrapper ...found
CGI::Cookie >= 1.20 ...found
Devel::GlobalDestruction ...found
Module::Versions::Report >= 1.05 ...found
Locale::Maketext::Lexicon >= 0.32 ...found
JavaScript::Minifier::XS ...found
Scope::Upper ...found
Date::Manip ...found
HTML::Entities ...found
HTML::Scrubber >= 0.08 ...found
Apache::Session >= 1.53 ...found
Business::Hours ...found
Encode >= 2.64 ...found
CGI >= 4 ...found
Class::Accessor::Fast ...found
Data::GUID ...found
Storable >= 2.08 ...found
UNIVERSAL::require ...found
Plack::Handler::Starlet ...found
Net::IP ...found
HTTP::Message >= 6.0 ...found
Log::Dispatch >= 2.30 ...found
Pod::Select ...found
HTML::Quoted ...found
Digest::SHA ...found
Email::Address >= 1.908 ...found
Text::WikiFormat >= 0.76 ...found
CSS::Squish >= 0.06 ...found
Text::Password::Pronounceable ...found
Time::ParseDate ...found
Regexp::Common::net::CIDR ...found
URI::QueryParam ...found
Sys::Syslog >= 0.16 ...found
Errno ...found
HTML::Mason >= 1.43 ...found
Data::Page::Pageset ...found
Digest::base ...found
IPC::Run3 ...found
JSON ...found
CSS::Minifier::XS ...found
Text::Quoted >= 2.07 ...found
File::ShareDir ...found
HTML::FormatText::WithLinks::AndTables >= 0.06 ...found
HTML::FormatText::WithLinks >= 0.14 ...found
File::Spec >= 0.8 ...found
Symbol::Global::Name >= 0.05 ...found
File::Glob ...found
Date::Extract >= 0.02 ...found
DBI >= 1.37 ...found
DateTime::Locale >= 0.40 ...found
Mail::Header >= 2.12 ...found
Locale::Maketext::Fuzzy >= 0.11 ...found
Scalar::Util ...found
MIME::Types ...found
Net::CIDR ...found
LWP::Simple ...found
Digest::MD5 >= 2.27 ...found
HTML::Mason::PSGIHandler >= 0.52 ...found
File::Temp >= 0.19 ...found
DateTime::Format::Natural >= 0.67 ...found
Convert::Color ...found
XML::RSS >= 1.05 ...found
Role::Basic >= 0.12 ...found
DBIx::SearchBuilder >= 1.65 ...found
Text::Template >= 1.44 ...found
Data::ICal ...found
Regexp::IPv6 ...found
Crypt::Eksblowfish ...found
Email::Address::List >= 0.02 ...found
Time::HiRes ...found
Locale::Maketext >= 1.06 ...found
DateTime >= 0.44 ...found
Module::Refresh >= 0.03 ...found
URI >= 1.59 ...found
Plack >= 1.0002 ...found
Devel::StackTrace >= 1.19 ...found
CGI::PSGI >= 0.12 ...found
FASTCGI dependencies:
FCGI >= 0.74 ...found
GD dependencies:
GD::Graph >= 1.47 ...found
GD::Text ...found
GD ...found
GPG dependencies:
PerlIO::eol ...found
GnuPG::Interface ...found
File::Which ...found
GRAPHVIZ dependencies:
IPC::Run >= 0.90 ...found
GraphViz ...found
MAILGATE dependencies:
Crypt::SSLeay ...found
LWP::UserAgent >= 6.0 ...found
Mozilla::CA ...found
LWP::Protocol::https ...found
Getopt::Long ...found
Net::SSL ...found
Pod::Usage ...found
MYSQL dependencies:
DBD::mysql >= 2.1018 ...found
SMIME dependencies:
String::ShellQuote ...found
File::Which ...found
Crypt::X509 ...found

All dependencies have been found.

-Instalamos

sudo make install

-Inicializamos nuestra db en MariaDB. Los defaults son perfectos (el password esta vacío, por lo cual presionamos Enter y no escribimos nada)

sudo make initialize-database
/usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database --action init --prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to your  mysql instance on localhost (port '') as root
Please specify that user's database password below. If the user has no database
password, just press return.

Password: 
Working with:
Type: mysql
Host: localhost
Port:
Name: rt4
User: rt_user
DBA: root
Now creating a mysql database rt4 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs.
Done.
Now inserting RT core system objects.
Done.
Now inserting data.
Done inserting data.
Done.

-Probamos el servicio ejecutando de forma manual

sudo /opt/rt4/sbin/rt-server --port 8080

-Abrimos un browser en otro equipo y navegamos http://IP-Servidor-RT:8080 Ingresamos con el usuario root y contraseña password
Ingresamos en la prueba como root a RT


-Llegamos al dashboard de RT comprobando que esta funcionando ok
Llegamos al dashboard de RT

-Nos devolvemos a la consola y presionamos CTRL-C varias veces para cancelar la ejecución

-Creamos un dominio virtual en Apache para RT y el puerto 8081. Seguramente tu dominio e ip serán diferentes, haz el cambio para tu equipo

sudo vi /etc/apache2/sites-available/rt.conf
<VirtualHost *:8081>
        ServerAdmin webmaster@drivemeca.com
        ServerName 192.168.5.64:8081

        AddDefaultCharset UTF-8
        DocumentRoot /opt/rt4/share/html
        Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
        ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/
        <Location />
                Require all granted
        </Location>

        LogLevel info

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

-Agregamos el puerto 8081 a los que escucha Apache2

sudo vi /etc/apache2/ports.conf
Listen 8081

-Activamos módulos de Apache2

sudo a2enmod fcgid
sudo a2ensite rt

-Reiniciamos y verificamos el servicio Apache2

sudo systemctl restart apache2
sudo systemctl status apache2
* apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           `-apache2-systemd.conf
   Active: active (running) since Fri 2017-10-27 23:41:31 UTC; 21s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 17401 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 17424 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           |-17439 /usr/sbin/apache2 -k start
           |-17442 /usr/sbin/apache2 -k start
           |-17443 /usr/sbin/apache2 -k start
           `-17444 /usr/sbin/apache2 -k start

Oct 27 23:41:29 rt systemd[1]: Starting LSB: Apache2 web server...
Oct 27 23:41:30 rt apache2[17424]:  * Starting Apache httpd web server apache2
Oct 27 23:41:30 rt apache2[17424]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Oct 27 23:41:31 rt apache2[17424]:  *
Oct 27 23:41:31 rt systemd[1]: Started LSB: Apache2 web server.

-Activamos los servicios de Apache2 y MariaDB (si, no me equivoque, aunque el servicio se llama mysql es mariadb) para que se inicien cada vez que haga boot el servidor opensource

sudo systemctl enable apache2
sudo systemctl enable mysql

-Modificamos para RT, el nombre, dominio y puerto

sudo vi /opt/rt4/etc/RT_SiteConfig.pm
Set( $rtname, 'drivemeca.com');
Set($WebDomain, '192.168.5.64');
Set($WebPort, 8081);

-Cambiamos permisos para que Apache2 pueda leer y modificar

sudo chown www-data:www-data -R /opt/rt4/var/mason_data/

-Reiniciamos el servicio y verificamos su ejecución

sudo systemctl restart apache2
sudo systemctl status apache2
* apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           `-apache2-systemd.conf
   Active: active (running) since Fri 2017-10-27 23:48:47 UTC; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 17603 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 17625 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           |-17640 /usr/sbin/apache2 -k start
           |-17643 /usr/sbin/apache2 -k start
           |-17644 /usr/sbin/apache2 -k start
           `-17645 /usr/sbin/apache2 -k start

Oct 27 23:48:46 rt systemd[1]: Starting LSB: Apache2 web server...
Oct 27 23:48:46 rt apache2[17625]:  * Starting Apache httpd web server apache2
Oct 27 23:48:46 rt apache2[17625]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Oct 27 23:48:47 rt apache2[17625]:  *
Oct 27 23:48:47 rt systemd[1]: Started LSB: Apache2 web server.

-Descomprimimos el archivo de RTIR y entramos a su directorio

cd
tar xzvf RT-IR-4.0.0.tar.gz
cd RT-IR-4.0.0

-Nos preparamos para compilar. Se verifican dependencias perl

perl Makefile.PL 
Cannot determine author info from lib/RT/IR.pm
Cannot determine license info from lib/RT/IR.pm
Using RT configuration from /opt/rt4/lib/RT.pm:
bin        => /opt/rt4/local/plugins/RT-IR/bin
etc        => /opt/rt4/local/plugins/RT-IR/etc
html       => /opt/rt4/local/plugins/RT-IR/html
lib        => /opt/rt4/local/plugins/RT-IR/lib
po         => /opt/rt4/local/plugins/RT-IR/po
static     => /opt/rt4/local/plugins/RT-IR/static
For first-time installation, type 'make initdb'.
To upgrade from a previous version of this extension, use 'make upgrade-database'
*** Module::AutoInstall version 1.16
*** Checking for Perl dependencies...
[Core Features]
- Test::More          ...loaded. (1.001014)
- File::Find          ...loaded. (1.29)
- File::Temp          ...loaded. (0.2304)
- DBIx::SearchBuilder ...loaded. (1.66 >= 1.61)
- Regexp::Common      ...loaded. (2016020301)
- Parse::BooleanLogic ...loaded. (0.09)
*** Module::AutoInstall configuration finished.
Open input '/root/RT-IR-4.0.0/etc/upgrade/rtir-2.4-upgrade.pl.in' file for substitution
Open output '/root/RT-IR-4.0.0/etc/upgrade/rtir-2.4-upgrade.pl' file for substitution
Open input '/root/RT-IR-4.0.0/etc/add_constituency.in' file for substitution
Open output '/root/RT-IR-4.0.0/etc/add_constituency' file for substitution
Open input '/root/RT-IR-4.0.0/bin/add_constituency.in' file for substitution
Open output '/root/RT-IR-4.0.0/bin/add_constituency' file for substitution
Open input '/root/RT-IR-4.0.0/lib/RT/IR/Test.pm.in' file for substitution
Open output '/root/RT-IR-4.0.0/lib/RT/IR/Test.pm' file for substitution
Open input '/root/RT-IR-4.0.0/etc/upgrade/2.5.1/update_saved_searches.pl.in' file for substitution
Open output '/root/RT-IR-4.0.0/etc/upgrade/2.5.1/update_saved_searches.pl' file for substitution
Generating a Unix-style Makefile
Writing Makefile for RT::IR
Writing MYMETA.yml and MYMETA.json

-Compilamos e instalamos

make
sudo make install

-Activamos para RTIR

sudo vi /opt/rt4/etc/RT_SiteConfig.pm
Set(@Plugins, 'RT::IR');

-Inicializamos base de datos. Los defaults son perfectos y la contraseña esta en blanco por lo que presionamos Enter sin escribir nada cuando nos pida password

sudo make initdb
/usr/bin/perl -Ilib -I/opt/rt4/local/lib -I/opt/rt4/lib /opt/rt4/sbin/rt-setup-database --action insert --datadir etc --datafile etc/initialdata --dba root --prompt-for-dba-password  --package RT::IR --ext-version 4.0.0
In order to create or update your RT database, this script needs to connect to your  mysql instance on localhost (port '') as root
Please specify that user's database password below. If the user has no database
password, just press return.

Password: 
Working with:
Type: mysql
Host: localhost
Port:
Name: rt4
User: rt_user
DBA: root
Now inserting data.
[21148] [Sat Oct 28 00:05:49 2017] [info]: Creating 'Templates' Article class. (etc/initialdata:622)
[21148] [Sat Oct 28 00:05:49 2017] [info]: Creating 'Response' Article custom field. (etc/initialdata:647)
Done inserting data.
Done.

-Reiniciamos y verificamos el servicio de Apache2

sudo systemctl restart apache2
sudo systemctl status apache2
* apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           `-apache2-systemd.conf
   Active: active (running) since Sat 2017-10-28 00:06:54 UTC; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 21152 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 21174 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           |-21189 /usr/sbin/apache2 -k start
           |-21192 /usr/sbin/apache2 -k start
           |-21193 /usr/sbin/apache2 -k start
           `-21194 /usr/sbin/apache2 -k start

Oct 28 00:06:53 rt systemd[1]: Starting LSB: Apache2 web server...
Oct 28 00:06:53 rt apache2[21174]:  * Starting Apache httpd web server apache2
Oct 28 00:06:53 rt apache2[21174]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Oct 28 00:06:54 rt apache2[21174]:  *
Oct 28 00:06:54 rt systemd[1]: Started LSB: Apache2 web server.

-Abrimos un browser en otro equipo y navegamos a http://IP-Server-RT:8081 Ingresamos con usuario root y contraseña password
Navegamos a la pagina de RT

-Apenas ingresamos es recomendable cambiar la contraseña. Damos click al menu Logged in as root - Settings - About me
Navegamos al menu About me para cambio de contraseña

-Ademas de nueva contraseña, modificamos los datos para personalizar la cuenta para nosotros. Damos click al botón Save preferences
Guardamos cambios de nuestra cuenta

-Se realizan los cambios
Se activan los cambios en RT

-Al hacer el cambio de idioma ya podremos ver el dashboard de inicio totalmente traducido
Ya nos aparece el dashboard en español

-Si damos click al menu RTIR pasaremos a sus funcionalidades
Dando click al menu RTIR nos activara sus funciones

Ahora que ya tenemos instalados y configurados RT y RTIR es tiempo de que organices tus procesos.
Ya conocías RT, lo haz usado, que tal te ha parecido?

Artículos recomendadosComo instalar OTRS en Linux Centos 7 paso a paso
                                            Como instalar Support Incident Tracker
                                            SOLUCION: perl: warning: Setting locale failed en Linux
                                            Como instalar Perl en Linux Centos 7 paso a paso

Pretendo vivir del blog, de enseñar opensource, pero esto no sera posible sin tu apoyo

Satisfech@ con el articulo? Bien, hazme un favor, compártelo en tus redes sociales (compartir es sexy). Escríbeme en los comentarios aquí debajo y pasa la voz compartiendo el tweet.
Sígueme en twitter google+facebook o email y podrás estar enterado de todas mis publicaciones.
Disfrútenlo.


Share/Bookmark