Tabla de Contenidos

OCS Inventory

Descripción

OCS inventory es la herramienta de activos tecnologicos de software libre 

Requerimientos

Server Linux

- MySQL - MariaDB version 4.1 or higher
- PERL 5.6 or higher (5.8 or higher recommended)
- Apache version 1.3.33 or higher / Apache version 2.0.X or higher
- Apache Mod_perl version 1.29 or higher
- PHP 4.3.2 or higher, with ZIP support enabled.
- Apache Mod_php version 4.3.2 or higher
- Perl module XML::Simple version 2.12 or higher
- Perl module Compress::Zlib version 1.33 or higher
- Perl module DBI version 1.40 or higher
- Perl module DBD::MySQL - MariaDB version 2.9004 or higher
- Perl module Apache::DBI version 0.93 or higher
- Perl module Net::IP version 1.21 or higher
- Perl module SOAP::Lite version 0.66 or higher, not required, used only with
  SOAP web service
- Perl module XML::Entities version 0.02 or higher, not required, used only with
  SOAP web service

Agente Linux

  These modules are needed:
    Digest::MD5
    XML::Simple
    Net::IP
    Proc::Daemon (optional, only for Daemon mode)
    LWP
    Compress::Zlib: needed for OCS server prior 1.02
  On Linux and *BSD (i386, amd64, ia64) dmidecode is required to read the BIOS s
  On Linux and *BSD lspci (from the pciutils package) is required to list PCI de
  To get the serial number of the screen you will need one of these tools:
   - monitor-edid from Mandriva is needed to fetch the monitor
     information http://wiki.mandriva.com/en/Tools/monitor-edid
   - get-edid from the read-edid package
 

A. Instalacion

1. Server Linux a mano

A. Descarge OCS

Por ejemplo            wget http://ufpr.dl.sourceforge.net/sourceforge/ocsinventory/OCSNG_UNIX_SERVER_1.02_RC2.tar.gz

B. Descomprima

tar xvzf OCSNG_UNIX_SERVER_1.02_RC2.tar.gz

C. Inicie setup

sh setup.sh

y siga las instrucciones. Son bastante directas y sin mucho cuento.

Las comunicaciones son una m… porque no hay los paquetes de perl necesarios .. y es un camello que suban bien 

2. Agente Linux

apt-get install ocsinventory-agent

Y basta con decirle cual es el servidor
 

3. Agente Windows

 https://wiki.ocsinventory-ng.org/03.Basic-documentation/Setting-up-the-Windows-Agent-2.x-on-client-computers/

4. Agente PFSense

Nos toca usar realmente todos los paquetes de freebsd pero ahi vamos usando FreeBSD 12 (PfSense 2.5.2)

- Requisitos

$> curl https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/p5-XML-Simple-2.25.txz -o p5-XML-Simple-2.25.txz
$> curl https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/p5-libwww-6.55.txz -o p5-libwww-6.55.txz
$> curl https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/p5-Net-HTTP-6.21.txz -o p5-Net-HTTP-6.21.txz
$> curl https://pkg.freebsd.org/FreeBSD:12:aarch64/quarterly/All/p5-Try-Tiny-0.30.txz -o p5-Try-Tiny-0.30.txz
$> curl https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/p5-Net-SNMP-6.0.1_1.txz -o p5-Net-SNMP-6.0.1_1.txz


pkg install ./p5-XML-Simple-2.25.txz ./p5-libwww-6.55.txz ./p5-Net-HTTP-6.21.txz ./p5-Try-Tiny-0.30.txz ./p5-Net-SNMP-6.0.1_1.txz

pkg install p5-IO-Socket-SSL p5-HTTP-Message-6.32



- Descargue
$> curl https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/ocsinventory-agent-2.8.1,1.txz -o ocsinventory-agent-2.8.1,1.txz

- Instale
$>  pkg install ocsinventory-agent-2.8.1,1.txz

- Configure
$> /usr/local/lib/perl5/site_perl/Ocsinventory/Unix/postinst.pl


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
?>  1
Do you want to create the directory /usr/local/etc/ocsinventory?
Please enter 'y' or 'n'?> [y] y
Should the old unix_agent settings be imported ?
Please enter 'y' or 'n'?> [y]
[info] The config file will be written in /usr/local/etc/ocsinventory/ocsinventory-agent.cfg,
What is the address of your ocs server?>  192.168.8.236
Do you need credential for the server? (You probably don't)
Please enter 'y' or 'n'?> [n] n
Do you want to apply an administrative tag on this machine
Please enter 'y' or 'n'?> [y] n
Do yo want to install the cron task in current user crontab ?
Please enter 'y' or 'n'?> [y] y
Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/db/ocsinventory-agent]
Do you want to create the /var/db/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] n
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] n
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]
Setting OCS Inventory NG server address…
Looking for OCS Invetory NG Unix Unified agent installation…
ocsinventory agent presents: /usr/local/bin/ocsinventory-agent
Creating /var/db/ocsinventory-agent directory…
Creating /usr/local/etc/ocsinventory directory…
Writing OCS Inventory NG Unix Unified agent configuration
Creating /var/db/ocsinventory-agent/http:__192.168.8.236_ocsinventory directory…
Activating modules if needed…
Launching OCS Inventory NG Unix Unified agent…


Y puede probar corriendo ocsinventory-agent
 

4. Agente FreeNAS / TrueNAS

Esto tambien es un FreeBSD, pero hay que instalarlo con Jails: como una micro-virtualizacion (creo).

- Cree un Jail llamado osinventory-agent   (https://www.ixsystems.com/documentation/freenas/11.2/jails.html#jail-software)
- Cambiese al nuevo sistema con
$> iocage console ocsinventory-agent
- Instale
$> pgk install ocsinventoy-agent

- Configure
$> /usr/local/lib/perl5/site_perl/Ocsinventory/Unix/postinst.pl

 

B. Configuración

1. Server Linux

Corra http://localhost/ocsresports/install.php  y use la contraseña de root de MySQL - MariaDB

OJO que aqui no se coloca la contraseña del server. Esta debe ir en el archivo ocsinventory.conf que va en perl y se incluye dentro de Apache

sed -i -e “s/PerlSetEnv OCS_DB_USER.*/PerlSetEnv OCS_DB_USER glpi/g” -e “s/PerlSetVar OCS_DB_PWD.*/PerlSetVar OCS_DB_PWD CheiC6Ah-Lehae8gi/g” /etc/ocsinventory/ocsinventory.conf

 

2. Deployment de windows automatico


https://untuxsuelto.blogspot.com/2016/04/instalar-ocs-inventory-ubuntu-linux-14.04.html

 

 

Problemas

1. Si el instale_mrtg.sh no le funciona

-

 

FIN

 


Advertencia

Este documento es privado y es de uso exclusivo de sus autores y de SKINA TECH. Cualquier uso sin una autorización escrita es contra le ley de derechos de autor y de propiedad intelectual, y será motivo de una acción legal.