{"id":198,"date":"2010-02-02T10:01:40","date_gmt":"2010-02-02T10:01:40","guid":{"rendered":"http:\/\/otioti.com\/?p=198"},"modified":"2013-03-05T18:25:24","modified_gmt":"2013-03-05T18:25:24","slug":"integracion-ocs-inventory-glpi","status":"publish","type":"post","link":"https:\/\/www.otioti.com\/?p=198","title":{"rendered":"Integraci\u00f3n OCS Inventory &amp; GLPI"},"content":{"rendered":"<div><!--     Root decorator: all decisions about how a page is to be decorated via the                     inline decoration begins here. --> <!--     Switch based upon the context. However, for now, just delegate to a decorator     identified directly by the context. --> <!--[if gte IE 5.5000]&gt; &lt;!  function correctPNG() \/\/ correctly handle PNG transparency in Win IE 5.5 or higher.    {    for(var i=0; i&lt;document.images.length; i++)       { \t  var img = document.images[i] \t  var imgName = img.src.toUpperCase() \t  if (imgName.substring(imgName.length-3, imgName.length) == &quot;PNG&quot;) \t     { \t\t var imgID = (img.id) ? &quot;id=&#039;&quot; + img.id + &quot;&#039; &quot; : &quot;&quot; \t\t var imgClass = (img.className) ? &quot;class=&#039;&quot; + img.className + &quot;&#039; &quot; : &quot;&quot; \t\t var imgTitle = (img.title) ? &quot;title=&#039;&quot; + img.title + &quot;&#039; &quot; : &quot;title=&#039;&quot; + img.alt + &quot;&#039; &quot; \t\t var imgStyle = &quot;display:inline-block;&quot; + img.style.cssText \t\t if (img.align == &quot;left&quot;) imgStyle = &quot;float:left;&quot; + imgStyle \t\t if (img.align == &quot;right&quot;) imgStyle = &quot;float:right;&quot; + imgStyle \t\t if (img.parentElement.href) imgStyle = &quot;cursor:hand;&quot; + imgStyle \t\t var strNewHTML = &quot;&quot; \t\t img.outerHTML = strNewHTML \t\t i = i-1 \t     }       }    } window.attachEvent(&quot;onload&quot;, correctPNG); \/\/ --> <!--[endif]--> <!--     .imageLink{         margin:2px;         vertical-align: bottom;         float:left;     }          \/*Overwritten styles in the main.css*\/         .greybox {             border: 0px;             border-top: 1px solid #ddd;             border-bottom: 1px solid #ddd;             background-color: #F0F0F0; \t        padding: 3px; \t        margin: 0;         } --><\/p>\n<div><!-- wiki content -->Por facilidad del despliegue, se realiza la instalaci\u00f3n  en una Fedora Core 12<\/p>\n<p>Dependencias comunes:<\/p>\n<ul>\n<li>Apache version 1.3.33 or higher \/ Apache version 2.0.46 or higher.\n<ul>\n<li>Mod_perl version 1.29 or higher.<\/li>\n<li>Mod_php version 4.3.2 or higher.<\/li>\n<\/ul>\n<\/li>\n<li>PHP 4.3.2 or higher, with ZIP and GD support enabled.<\/li>\n<li>PERL 5.6 or higher.\n<ul>\n<li>Perl module XML::Simple version 2.12 or higher.<\/li>\n<li>Perl module Compress::Zlib version 1.33 or higher.<\/li>\n<li>Perl module DBI version 1.40 or higher.<\/li>\n<li>Perl module DBD::Mysql version 2.9004 or higher.<\/li>\n<li>Perl module Apache::DBI version 0.93 or higher.<\/li>\n<li>Perl module Net::IP version 1.21 or higher.<\/li>\n<li>Perl module SOAP::Lite version 0.66 or higher (optional)<\/li>\n<\/ul>\n<\/li>\n<li>MySQL version 4.1.0 or higher with InnoDB engine active.<\/li>\n<li>Make utility such as GNU make.<\/li>\n<\/ul>\n<p>Accedemos al sistema, y actualizamos el mismo:<\/p>\n<div>\n<div>\n<pre>yum update<\/pre>\n<\/div>\n<\/div>\n<h3><a name=\"Integraci\u00f3nOCSInventory&amp;GLPI-Instalamosyconfiguramoslamysql:\"><\/a>Instalamos  y configuramos la mysql:<\/h3>\n<div>\n<div>\n<pre>yum install mysql\nservice mysqld start\nchkconfig mysqld on<\/pre>\n<\/div>\n<\/div>\n<p>Ejecutamos:<\/p>\n<div>\n<div>\n<pre>mysql_secure_installation<\/pre>\n<\/div>\n<\/div>\n<p>configuramos la contrase\u00f1a de root y deshabilitamos el acceso an\u00f3nimo.<\/p>\n<h3><a name=\"Integraci\u00f3nOCSInventory&amp;GLPI-InstalamosOCSInventory:\"><\/a>Instalamos  OCS Inventory:<\/h3>\n<div>\n<div>\n<pre>yum install ocsinventory\nservice httpd restart\nchkconfig httpd on<\/pre>\n<\/div>\n<\/div>\n<p>Accedemos a la siguiente url: http:\/\/ourserver.com\/ocsreports\/install.php<\/p>\n<p>Introducimos las credenciales del usuario root que hemos configurado  anteriormente.<\/p>\n<p>Pulsamos en Send. A continuaci\u00f3n comprobar\u00e1 la viabilidad de  configurar OCS Inventory en el sistema. Si nos devuelve alg\u00fan error,  deberemos revisarlo y solventarlo.<\/p>\n<p>Si no existe ning\u00fan error, procederemos a pulsar en el bot\u00f3n Send. A  continuaci\u00f3n se generar\u00e1 el usuario admin con contrase\u00f1a por defecto  admin.<\/p>\n<p>Accederemos al sistema introduciendo dichas credenciales por defecto.<\/p>\n<p>Realizaremos las siguientes configuraciones: pulsar en el icono de la  llave inglesa \/ Configuraci\u00f3n y luego en la pesta\u00f1a de Servidores:<\/p>\n<ul>\n<li>LOGLEVEL = On<\/li>\n<li>PROLOG_FREQ = 24<\/li>\n<li>AUTO_DUPLICATE_LVL = Model +\u00a0 Serial + Mac Address.<\/li>\n<li>TRACE_DELETED = On (required by GLPI).<\/li>\n<li>SESSION_VALIDITY_TIME = 600 (session duration, the empty value  provided is not valid).<\/li>\n<\/ul>\n<p>Modificamos el usuario de la base de datos que conecta OCS\u00a0 con la  DB ocsweb:<\/p>\n<div>\n<div>\n<pre># mysql -uroot -prootsecret\nmysql&gt; UPDATE mysql.user SET Password = PASSWORD('ocssecret') WHERE User = 'ocs';\nmysql&gt; FLUSH PRIVILEGES;\nmysql&gt; exit<\/pre>\n<\/div>\n<\/div>\n<p>Modificamos el fichero <strong>\/etc\/httpd\/conf.d\/ocsinventory-server.conf:<\/strong><\/p>\n<div>\n<div>\n<pre>PerlSetVar OCS_DB_PWD ocssecret<\/pre>\n<\/div>\n<\/div>\n<p>el fichero <strong>\/etc\/ocsinventory\/ocsinventory-reports\/dbconfig.inc.php:<\/strong><\/p>\n<div>\n<div>\n<pre>$_SESSION[\"PSWD_BASE\"]=\"ocssecret\"<\/pre>\n<\/div>\n<\/div>\n<p>Ejecutamos:<\/p>\n<div>\n<div>\n<pre>service httpd reload<\/pre>\n<\/div>\n<\/div>\n<h3><a name=\"Integraci\u00f3nOCSInventory&amp;GLPI-&amp;nbsp;InstalamosOCSInventoryagentenGentoo:\"><\/a> Instalamos  OCSInventory-agent en Gentoo:<\/h3>\n<p>Se adjunta el ebuild necesario para construir el agente de  OCSInventory para Gentoo. Para el resto de sistemas, se puede descargar  de la web oficial.<\/p>\n<p>Descargamos el adjunto y se coloca en  \/usr\/local\/app-admin\/ocsinventory-agent\/.<\/p>\n<p>Luego se emerge el paquete:<\/p>\n<div>\n<div>\n<pre>\u00a0\nemerge -q ocsinventory-agent<\/pre>\n<\/div>\n<\/div>\n<p>Es recomendable tener instalado smartmontools:<\/p>\n<div>\n<div>\n<pre>emerge -q smartmontools<\/pre>\n<\/div>\n<\/div>\n<p>Modificamos el fichero \/etc\/ocsinventory-agent\/ocsinventory-agent.cfg y  seteamos:<\/p>\n<div>\n<div>\n<pre>server=ourserver.com<\/pre>\n<\/div>\n<\/div>\n<h3><a name=\"Integraci\u00f3nOCSInventory&amp;GLPI-Instalaci\u00f3nyconfiguraci\u00f3ndeGLPI\"><\/a>Instalaci\u00f3n  y configuraci\u00f3n de GLPI<\/h3>\n<p>Se generar\u00e1n dos usuarios MySQL, el primero llamado glpi para el  usado de la aplicaci\u00f3n GLPI, y un segundo, synchro, que ser\u00e1 usado para  el proceso de sincronizaci\u00f3n OCS&lt;-&gt;GLPI<\/p>\n<p>Accederemos como root en MySQL y ejecutaremos los siguientes  comandos:<\/p>\n<div>\n<div>\n<pre># mysql -uroot -p\nmysql&gt; CREATE USER 'glpi'@'%' IDENTIFIED BY 'glpisecret';\nmysql&gt; GRANT USAGE ON *.* TO 'glpi'@'%' IDENTIFIED BY 'glpisecret';\nmysql&gt; CREATE DATABASE IF NOT EXISTS `glpi` ;\nmysql&gt; GRANT ALL PRIVILEGES ON `glpi`.* TO 'glpi'@'%';\nmysql&gt; CREATE USER 'synchro'@'%' IDENTIFIED BY 'syncsecret';\nmysql&gt; GRANT USAGE ON *.* TO 'synchro'@'%' IDENTIFIED BY 'syncsecret';\nmysql&gt; GRANT SELECT ON `ocsweb`.* TO 'synchro'@'%';\nmysql&gt; GRANT DELETE ON `ocsweb`.`deleted_equiv` TO 'synchro'@'%';\nmysql&gt; GRANT UPDATE (`CHECKSUM`) ON `ocsweb`.`hardware` TO 'synchro'@'%';\nmysql&gt; FLUSH PRIVILEGES;\nmysql&gt; exit<\/pre>\n<\/div>\n<\/div>\n<p>Instalaremos glpi con yum y reiniciamos el servicio httpd:<\/p>\n<div>\n<div>\n<pre># yum install glpi\n# service httpd reload<\/pre>\n<\/div>\n<\/div>\n<p>Por \u00faltimo, se realiza la creaci\u00f3n del schema de la DB y la  configuraci\u00f3n de la aplicaci\u00f3n:<\/p>\n<p>Accederemos a la url http:\/\/outserver.com\/glpi y seguimos los  siguientes pasos:<\/p>\n<ol>\n<li>Seleccionamos el idioma: Espa\u00f1ol (es_ES)<\/li>\n<li>Aceptamos la licencia GPL<\/li>\n<li>Iniciamos la instalaci\u00f3n<\/li>\n<li>Comprobamos que los prerequisitos se cumplen.<\/li>\n<li>Introducimos los par\u00e1metros de la conexi\u00f3n a la mysql:\n<ol>\n<li>Direcci\u00f3n a la base de datos<\/li>\n<li>Usuario: glpi<\/li>\n<li>Contrase\u00f1a: glpisecret (o la que hayamos introducido)<\/li>\n<\/ol>\n<\/li>\n<li>Seleccionamos la base de datos glpi<\/li>\n<li>Tomamos nota de los usuarios creados:<\/li>\n<li>Los logins y claves predeterminados son:\n<ol>\n<li>glpi\/glpi para la cuenta administrador<\/li>\n<li>tech\/tech para la cuenta de t\u00e9cnico<\/li>\n<li>normal para la cuenta normal<\/li>\n<li>post-only\/post-only para la cuenta postonly<\/li>\n<\/ol>\n<\/li>\n<li>Accedemos con el usuario glpi<\/li>\n<\/ol>\n<h3><a name=\"Integraci\u00f3nOCSInventory&amp;GLPI-Activaci\u00f3nyconfiguraci\u00f3ndelmodoOCSNG:\"><\/a>Activaci\u00f3n  y configuraci\u00f3n del modo OCSNG:<\/h3>\n<p>Una vez identificados dentro de GLPI como administrador, procederemos  a configurar la sincronizaci\u00f3n de OCS-&gt;GLPI.<\/p>\n<p>Dentro del Men\u00fa, pulsaremos en Setup-&gt;General, a continuaci\u00f3n  pulsaremos en la pesta\u00f1a Restricciones, y activamos el modo OCSNG,  pulsamos en enviar.<\/p>\n<p>Configuramos el servidor:<\/p>\n<ul>\n<li>Pulsamos Menu-&gt;Configuraci\u00f3n-&gt;OCSNG mode<\/li>\n<li>Seleccionamos el servidor creado durante la instalaci\u00f3n: localhost<\/li>\n<li>Configuramos el nombre<\/li>\n<li>El nombre de la base de datos: ocsweb<\/li>\n<li>El usuario de la base de datos: synchro<\/li>\n<li>La contrase\u00f1a del usuario: synchrosecret<\/li>\n<li>Pulsamos en enviar.<\/li>\n<\/ul>\n<p>Deber\u00e1 devolver un mensaje que indique se ha creado la conexi\u00f3n  satisfactoriamente.<\/p>\n<p>A continuaci\u00f3n, configuraremos la informaci\u00f3n que ser\u00e1 importada de  OCS a GLPI:<\/p>\n<ul>\n<li><strong>Monitores<\/strong> : Importaci\u00f3n \u00fanica basada en el serial number<\/li>\n<li><strong>Perif\u00e9ricos: Importanci\u00f3n \u00fanica<\/strong><\/li>\n<li>Impresoras: Importaci\u00f3n \u00fanica<\/li>\n<li>Software: Importaci\u00f3n \u00fanica<\/li>\n<li>Vol\u00famenes: S\u00ed<\/li>\n<li>Utilizar el diccionario de software de OCS: No<\/li>\n<li>Registro de Windows: Si<\/li>\n<li>N\u00famero de elementos a sincronizar usando cron: 0 (usaremos otra  soluci\u00f3n)<\/li>\n<li><strong>Pulsaremos en enviar.<\/strong><\/li>\n<\/ul>\n<p>Comprobamos en :<\/p>\n<ul>\n<li>Menu-&gt;Utilidades-&gt;<strong>OCSNG<\/strong><\/li>\n<li>Pulsaremos en el enlace &#8220;Importaci\u00f3n de ordenadores nuevos&#8221;<\/li>\n<\/ul>\n<p>En la lista que aparezca, deberemos poder ver aquellos servidores los  cuales tengan instalado y configurado correctamente el agente de OCS.  NO los importe, ya que lo realizaremos mediante un modo autom\u00e1tico.<\/p>\n<h3><a name=\"Integraci\u00f3nOCSInventory&amp;GLPI-Sistemaautom\u00e1ticodesincronizaci\u00f3nOCSNG:\"><\/a>Sistema  autom\u00e1tico de sincronizaci\u00f3n OCSNG:<\/h3>\n<p>Instalaremos el siguiente plugin: Mass import from OCSNG<\/p>\n<p>Nos desconectamos de GLPI e instalamos el plugin:yum install  glpi-mass-ocs-import<\/p>\n<p>Conectamos de nuevo a GLPI, y configuramos al plugin.<\/p>\n<p>Clicamos en Configuraci\u00f3n-&gt;Plugins. Pulsamos en el enlace  Instalar. Pulsamos Activar y al final pulsamos en el enlace &#8220;Importaci\u00f3n  masiva desde OCS*&#8221;.*<\/p>\n<p>En la siguiente pantalla, seleccionamos el servidor localhost,  pulsamos en aceptar y luego habilitamos la sincronizaci\u00f3n.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Por facilidad del despliegue, se realiza la instalaci\u00f3n en una Fedora Core 12 Dependencias comunes: Apache version 1.3.33 or higher \/ Apache version 2.0.46 or higher. Mod_perl version 1.29 or higher. Mod_php version 4.3.2 or higher. PHP 4.3.2 or higher, with ZIP and GD support enabled. PERL 5.6 or higher. Perl module XML::Simple version 2.12 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[22,26,25],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-linux","tag-installation","tag-linkedin","tag-ocs"],"_links":{"self":[{"href":"https:\/\/www.otioti.com\/index.php?rest_route=\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.otioti.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.otioti.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.otioti.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.otioti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=198"}],"version-history":[{"count":1,"href":"https:\/\/www.otioti.com\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions"}],"predecessor-version":[{"id":264,"href":"https:\/\/www.otioti.com\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions\/264"}],"wp:attachment":[{"href":"https:\/\/www.otioti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.otioti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.otioti.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}