Instalar OCS Inventory Agent en CentOS 8/RHEL8

Published:

Siguiendo con las publicaciones de OCS Inventory, vamos a ver como hacer la instalación del Agente para la distribución de CentOS 8 o RHEL.

Solo vamos a necesitar que el equipo tenga conexión a internet y acceso root o un usuario con permisos para hacer instalación de algunos paquetes.

Paso 1: Asegurarse de tener instalado wget tar

yum install -y wget tar

Paso 2: Instalar dependencias necesarias

yum install -y gcc nmap pciutils perl-CPAN perl-ExtUtils-MakeMaker perl-Digest-MD5 perl-LWP-Protocol-https perl-XML-Simple

Y después de instalar y compilar algunos de los módulos con cpan.

cpan -i Net::IP Net::Netmask Net::SNMP Proc::Daemon Proc::PID::File

Si es la primera vez que lo instalamos le damos que si a la pregunta y vamos a tomar un café porque lleva su tiempo.

Paso 3: Descargamos el agente

Recordá que podes ver la lista completa en su sitio de github.

cd /opt

wget https://github.com/OCSInventory-NG/UnixAgent/releases/download/v2.8.1/Ocsinventory-Unix-Agent-2.8.1.tar.gz

tar xf Ocsinventory-Unix-Agent-2.8.1.tar.gz

cd Ocsinventory-Unix-Agent-2.8.1

Y comenzamos la compilación e instalación:

perl Makefile.PL

make

make install
Donde comenzaremos a ver una serie de preguntas. La primera que es configurar el agente le damos a Y.
Después la mayoría quedan por defecto pero algunas es necesario configurarlas, dejo en negrita las que contesté al resto le di enter para que tome por defecto:
Do you want to configure the agent
Please enter 'y' or 'n'?> [y] y
Where do you want to write the configuration file?
0 -> /etc/ocsinventory
1 -> /usr/local/etc/ocsinventory
2 -> /etc/ocsinventory-agent
?> 0
Do you want to create the directory /etc/ocsinventory?
Please enter 'y' or 'n'?> [y]
Should the old unix_agent settings be imported ?
Please enter 'y' or 'n'?> [y]
[info] The config file will be written in /etc/ocsinventory/ocsinventory-agent.cfg,
What is the address of your ocs server?> 172.16.0.200
Do you need credential for the server? (You probably don't)
Please enter 'y' or 'n'?> [n]
Do you want to apply an administrative tag on this machine
Please enter 'y' or 'n'?> [y]
tag?> red local
Do yo want to install the cron task in /etc/cron.d
Please enter 'y' or 'n'?> [y]
Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/lib/ocsinventory-agent]
Do you want to create the /var/lib/ocsinventory-agent directory?

Please enter 'y' or 'n'?> [y]
Should I remove the old unix_agent
Please enter 'y' or 'n'?> [n]
Do you want to activate debug configuration option ?
Please enter 'y' or 'n'?> [y]
Do you want to use OCS Inventory NG UNix Unified agent log file ?
Please enter 'y' or 'n'?> [y]
Specify log file path you want to use?> /var/log/ocsinventory-agent.log
Do you want disable SSL CA verification configuration option (not recommended) ?
Please enter 'y' or 'n'?> [n] y
Do you want to set CA certificates file path ?
Please enter 'y' or 'n'?> [y] n
Do you want to use OCS-Inventory software deployment feature?
Please enter 'y' or 'n'?> [y]
Do you want to use OCS-Inventory SNMP scans feature?
Please enter 'y' or 'n'?> [y]
Do you want to send an inventory of this machine?
Please enter 'y' or 'n'?> [y]

Solo resta ir a nuestro servidor de OCS Inventory para ver el equipo nuevo con todo detalle.

- Advertisement -
Jorge
Jorgehttps://nksistemas.com
Soy Jorge, Sr Sysadmin Linux/DevOps/SRE y creador de NKSistemas.com Trabajo con plataformas: Linux, Windows, AWS, GCP, VMware, Helm, kubernetes, Docker, etc.

Related articles