Instalar OCS Inventory Paso a paso

Por:ivancp, enviado 21 oct 2011

Pasos de la instalación

Paso 1: Instalar dependencias:

Seguramente en nuestro servidor ya tenemos instalado y configurado los servicios web con Apache y bases de datos con MySQL, pero necesitaremos algunos paquetes adicionales para poder continuar, pueden ejecutar el siguiente comando todo estará listo como por arte de magia:
Code: Seleccionar todo
  1. sudo apt-get install libapache2-mod-perl2 libapache-dbi-perl libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libnet-ip-perl php5-gd php5-mysql



Adicionalmente necesitaremos unos paquetes para Perl:

Code: Seleccionar todo
  1. #Abrimos el shell de Perl en como super usuario

  2. ubuntu-server$ sudo perl -MCPAN -e shell

  3. #Una vez iniciado (tal vez dure unos minutos), instalamos el paquete SOAP::Lite:

  4. CPAN> install SOAP::Lite

  5. #...

  6. #Despues de cientos de lineas de mensajes instalamos el paquete XML::Entities

  7. CPAN> install XML::Entities

  8. #suficiente con eso


Paso 2: Descomprimir e instalar

Una vez descargado el archivo de la web de OCS Inventory, tenemos que descomprimirlo en algún directorio temporal y ejecutar el archivo setup.sh:

Code: Seleccionar todo
  1. #descomprimiendo el archivo

  2. ubuntu-server$ tar zxf OCSNG_UNIX_SERVER-2.0.x.tar.gz

  3.  

  4. #ejecutando la instalación

  5. ubuntu-server$ cd OCSNG_UNIX_SERVER-2.0.x

  6. ubuntu-server$ sudo sh setup.sh



Si todo anda bien, solo será necesario presionar ENTER varias veces hasta que termine la instalación, a menos que deseen cambiar los valores por defecto. El resultado de la instalación es mas o menos así:
Code: Seleccionar todo
  1. +----------------------------------------------------------+

  2. |                                                          |

  3. | Welcome to OCS Inventory NG Management server setup !    |

  4. |                                                          |

  5. +----------------------------------------------------------+

  6.  

  7. Trying to determine whitch OS or Linux distribution you use

  8. +----------------------------------------------------------+

  9. | Checking for Apache web server binaries !                |

  10. +----------------------------------------------------------+

  11.  

  12. CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and

  13. previous, please remove any Apache configuration for Communication Server!

  14.  

  15. Do you wish to continue ([y]/n)?

  16. Assuming Communication server 1.0 RC2 or previous is not installed

  17. on this computer.

  18.  

  19. Starting OCS Inventory NG Management server setup from folder /opt/ocsserver

  20. Storing log in file /opt/ocsserver/ocs_server_setup.log

  21.  

  22. +----------------------------------------------------------+

  23. | Checking for database server properties...               |

  24. +----------------------------------------------------------+

  25.  

  26. Your MySQL client seems to be part of MySQL version 5.1.

  27. Your computer seems to be running MySQL 4.1 or higher, good ;-)

  28.  

  29. Which host is running database server [localhost] ?

  30. OK, database server is running on host localhost ;-)

  31.  

  32. On which port is running database server [3306] ?

  33. OK, database server is running on port 3306 ;-)

  34.  

  35.  

  36. +----------------------------------------------------------+

  37. | Checking for Apache web server daemon...                 |

  38. +----------------------------------------------------------+

  39.  

  40. Where is Apache daemon binary [/usr/sbin/apache2] ?

  41. OK, using Apache daemon /usr/sbin/apache2 ;-)

  42.  

  43.  

  44. +----------------------------------------------------------+

  45. | Checking for Apache main configuration file...           |

  46. +----------------------------------------------------------+

  47.  

  48. Where is Apache main configuration file [/etc/apache2/apache2.conf] ?

  49. OK, using Apache main configuration file /etc/apache2/apache2.conf ;-)

  50.  

  51.  

  52. +----------------------------------------------------------+

  53. | Checking for Apache user account...                      |

  54. +----------------------------------------------------------+

  55.  

  56. Which user account is running Apache web server [www-data] ?

  57. OK, Apache is running under user account www-data ;-)

  58.  

  59.  

  60. +----------------------------------------------------------+

  61. | Checking for Apache group...                             |

  62. +----------------------------------------------------------+

  63.  

  64. Which user group is running Apache web server [www-data] ?

  65. OK, Apache is running under users group www-data ;-)

  66.  

  67.  

  68. +----------------------------------------------------------+

  69. | Checking for Apache Include configuration directory...   |

  70. +----------------------------------------------------------+

  71.  

  72. Setup found Apache Include configuration directory in

  73. //etc/apache2/conf.d/.

  74. Setup will put OCS Inventory NG Apache configuration in this directory.

  75. Where is Apache Include configuration directory [//etc/apache2/conf.d/] ?

  76. OK, Apache Include configuration directory //etc/apache2/conf.d/ found ;-)

  77.  

  78.  

  79. +----------------------------------------------------------+

  80. | Checking for PERL Interpreter...                         |

  81. +----------------------------------------------------------+

  82.  

  83. Found PERL Intrepreter at </usr/bin/perl> ;-)

  84. Where is PERL Intrepreter binary [/usr/bin/perl] ?

  85. OK, using PERL Intrepreter /usr/bin/perl ;-)

  86.  

  87.  

  88. Do you wish to setup Communication server on this computer ([y]/n)?

  89.  

  90.  

  91. +----------------------------------------------------------+

  92. | Checking for Make utility...                             |

  93. +----------------------------------------------------------+

  94.  

  95. OK, Make utility found at </usr/bin/make> ;-)

  96.  

  97. +----------------------------------------------------------+

  98. | Checking for Apache mod_perl version...                  |

  99. +----------------------------------------------------------+

  100.  

  101. Checking for Apache mod_perl version 1.99_22 or higher

  102. Found that mod_perl version 1.99_22 or higher is available.

  103. OK, Apache is using mod_perl version 1.99_22 or higher ;-)

  104.  

  105. +----------------------------------------------------------+

  106. | Checking for Communication server log directory...       |

  107. +----------------------------------------------------------+

  108.  

  109. Communication server can create detailled logs. This logs can be enabled

  110. by setting interger value of LOGLEVEL to 1 in Administration console

  111. menu Configuration.

  112. Where to put Communication server log directory [/var/log/ocsinventory-server] ?

  113. OK, Communication server will put logs into directory /var/log/ocsinventory-server ;-)

  114.  

  115.  

  116. +----------------------------------------------------------+

  117. | Checking for required Perl Modules...                    |

  118. +----------------------------------------------------------+

  119.  

  120. Checking for DBI PERL module...

  121. Found that PERL module DBI is available.

  122. Checking for Apache::DBI PERL module...

  123. Found that PERL module Apache::DBI is available.

  124. Checking for DBD::mysql PERL module...

  125. Found that PERL module DBD::mysql is available.

  126. Checking for Compress::Zlib PERL module...

  127. Found that PERL module Compress::Zlib is available.

  128. Checking for XML::Simple PERL module...

  129. Found that PERL module XML::Simple is available.

  130. Checking for Net::IP PERL module...

  131. Found that PERL module Net::IP is available.

  132.  

  133. +----------------------------------------------------------+

  134. | Checking for optional Perl Modules...                    |

  135. +----------------------------------------------------------+

  136.  

  137. Checking for SOAP::Lite PERL module...

  138. Found that PERL module SOAP::Lite is available.

  139. Checking for XML::Entities PERL module...

  140. Found that PERL module XML::Entities is available.

  141.  

  142.  

  143. +----------------------------------------------------------+

  144. | OK, looks good ;-)                                       |

  145. |                                                          |

  146. | Configuring Communication server Perl modules...         |

  147. +----------------------------------------------------------+

  148.  

  149. Checking if your kit is complete...

  150. Looks good

  151. Writing Makefile for Apache::Ocsinventory

  152.  

  153. +----------------------------------------------------------+

  154. | OK, looks good ;-)                                       |

  155. |                                                          |

  156. | Preparing Communication server Perl modules...           |

  157. +----------------------------------------------------------+

  158.  

  159.  

  160. +----------------------------------------------------------+

  161. | OK, prepare finshed ;-)                                  |

  162. |                                                          |

  163. | Installing Communication server Perl modules...          |

  164. +----------------------------------------------------------+

  165.  

  166.  

  167. +----------------------------------------------------------+

  168. | OK, Communication server Perl modules install finished;-)|

  169. |                                                          |

  170. | Creating Communication server log directory...           |

  171. +----------------------------------------------------------+

  172.  

  173. Creating Communication server log directory /var/log/ocsinventory-server.

  174.  

  175. Fixing Communication server log directory files permissions.

  176. Configuring logrotate for Communication server.

  177. Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG

  178. Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-server

  179.  

  180.  

  181. +----------------------------------------------------------+

  182. | OK, Communication server log directory created ;-)       |

  183. |                                                          |

  184. | Now configuring Apache web server...                     |

  185. +----------------------------------------------------------+

  186.  

  187. To ensure Apache loads mod_perl before OCS Inventory NG Communication Server,

  188. Setup can name Communication Server Apache configuration file

  189. 'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'.

  190. Do you allow Setup renaming Communication Server Apache configuration file

  191. to 'z-ocsinventory-server.conf' ([y]/n) ?

  192. OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file

  193. Removing old communication server configuration to file //etc/apache2/conf.d//ocsinventory.conf

  194. Writing communication server configuration to file //etc/apache2/conf.d//z-ocsinventory-server.conf

  195.  

  196. +----------------------------------------------------------+

  197. | OK, Communication server setup sucessfully finished ;-)  |

  198. |                                                          |

  199. | Please, review //etc/apache2/conf.d//z-ocsinventory-server.conf

  200. | to ensure all is good. Then restart Apache daemon.       |

  201. +----------------------------------------------------------+

  202.  

  203.  

  204. Do you wish to setup Administration Server (Web Administration Console)

  205. on this computer ([y]/n)?

  206.  

  207. +----------------------------------------------------------+

  208. | Checking for Administration Server directories...        |

  209. +----------------------------------------------------------+

  210.  

  211. CAUTION: Setup now install files in accordance with Filesystem Hierarchy

  212. Standard. So, no file is installed under Apache root document directory

  213. (Refer to Apache configuration files to locate it).

  214. If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU

  215. MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache

  216. root document directory.

  217. If you choose to move directory, YOU MUST MOVE 'download' directory to

  218. Administration Server writable/cache directory (by default

  219. /var/lib/ocsinventory-reports), especialy if you use deployement feature.

  220.  

  221. Do you wish to continue ([y]/n)?

  222. Assuming directories 'ocsreports' and 'download' removed from

  223. Apache root document directory.

  224.  

  225. Where to copy Administration Server static files for PHP Web Console

  226. [/usr/share/ocsinventory-reports] ?

  227. OK, using directory /usr/share/ocsinventory-reports to install static files ;-)

  228. Where to create writable/cache directories for deployement packages,

  229. IPDiscover and SNMP [/var/lib/ocsinventory-reports] ?

  230. OK, writable/cache directory is /var/lib/ocsinventory-reports ;-)

  231.  

  232.  

  233. +----------------------------------------------------------+

  234. | Checking for required Perl Modules...                    |

  235. +----------------------------------------------------------+

  236.  

  237. Checking for DBI PERL module...

  238. Found that PERL module DBI is available.

  239. Checking for DBD::mysql PERL module...

  240. Found that PERL module DBD::mysql is available.

  241. Checking for XML::Simple PERL module...

  242. Found that PERL module XML::Simple is available.

  243. Checking for Net::IP PERL module...

  244. Found that PERL module Net::IP is available.

  245.  

  246. +----------------------------------------------------------+

  247. | Installing files for Administration server...            |

  248. +----------------------------------------------------------+

  249.  

  250. Creating PHP directory /usr/share/ocsinventory-reports/ocsreports.

  251. Copying PHP files to /usr/share/ocsinventory-reports/ocsreports.

  252. Fixing permissions on directory /usr/share/ocsinventory-reports/ocsreports.

  253. Creating database configuration file /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php.

  254. Creating IPDiscover directory /var/lib/ocsinventory-reports/ipd.

  255. Fixing permissions on directory /var/lib/ocsinventory-reports/ipd.

  256. Creating packages directory /var/lib/ocsinventory-reports/download.

  257. Fixing permissions on directory /var/lib/ocsinventory-reports/download.

  258. Creating packages directory /var/lib/ocsinventory-reports/snmp.

  259. Fixing permissions on directory /var/lib/ocsinventory-reports/snmp.

  260. Configuring snmp_com.txt file

  261. Configuring IPDISCOVER-UTIL Perl script.

  262. Installing IPDISCOVER-UTIL Perl script.

  263. Fixing permissions on IPDISCOVER-UTIL Perl script.

  264. Writing Administration server configuration to file //etc/apache2/conf.d//ocsinventory-reports.conf

  265.  

  266. +----------------------------------------------------------+

  267. | OK, Administration server installation finished ;-)      |

  268. |                                                          |

  269. | Please, review //etc/apache2/conf.d//ocsinventory-reports.conf

  270. | to ensure all is good and restart Apache daemon.         |

  271. |                                                          |

  272. | Then, point your browser to <!-- m --><a class="postlink" href="http://server//ocsreports">http://server//ocsreports</a><!-- m -->

  273. | to configure database server and create/update schema.   |

  274. +----------------------------------------------------------+

  275.  

  276.  

  277. Setup has created a log file /opt/ocsserver/ocs_server_setup.log. Please, save this file.

  278. If you encounter error while running OCS Inventory NG Management server,

  279. we can ask you to show us his content !

  280.  

  281. DON'T FORGET TO RESTART APACHE DAEMON !

  282.  

  283. Enjoy OCS Inventory NG ;-)

  284.  



Luego de esta instalación debemos reiniciar apache:

Code: Seleccionar todo
  1. ubuntu-server$ sudo service apache2 restart



Otros Artículos en esta sección

  • Cadenas de conexión
    Éste es un compendio de cadenas de conexión para diferentes gestores de bases de datos mediante ODBC, OLEDB, .NET, etc
    Por: ivancp, 2011-10-28
  • Decimal a Binario
    Deseas saber como convertir un numero decimal a binario? esta es una implementacion en varios lenguajes de programación. PHP, C++, VB.NET, C#, JAVA, DELPHI, TCL, ASP.NET, etc
    Por: Blag, 2005-01-12
  • Migrar de MySQL a PostgresQL
    Aquí mostramos como migrar, convertir, pasar bases de datos MySQL a PostgreSQL en 4 pasos.
    Por: ivancp, 2011-09-18
¿Alguna duda? Sientete libre de hacer tus pruntas en nuestro:
foro de Programación »