OCS Inventory en Debian Lenny (SERVER)

Posted by Unknown | Posted on 13:17

Ocs Inventory es una aplicación que se encarga de realizar inventario de hardware y software de lo equipos en una red.
En este caso instalaremos el servidor, que se encarga de recolectar toda la información de los equipos de la red.

Lo primero que debemos realizar es bajar la aplicación de la pagina de ocsinventory http://www.ocsinventory-ng.org.

Descargamos la aplicación, el ultimo lanzamiento hasta la fecha es la 1.3.2.
 #wget -c http://launchpad.net/ocsinventory-server/stable-1.3/1.3.2/+download/OCSNG_UNIX_SERVER-1.3.2.tar.gz

Luego instalamos los paquetes necesarios para que funcione correctamente la aplicación.
 #aptitude install php5 apache2 mysql-server-5.0 perl build-essential libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl libphp-pclzip php5-gd libapache2-mod-perl2 php5-mysql

Ahora descomprimimos el archivo que descargamos anteriormente.
 #tar xvzf OCSNG_UNIX_SERVER-1.3.2.tar.gz

Ingresamos a la carpeta de OCSNG_UNIX_SERVER-1.3.2
 #cd OCSNG_UNIX_SERVER-1.3.2

Ejecutamos el script de setup que se encargara de realizar unas preguntas para completar la instalación.
 #./setup.sh

Ahora Responderemos las siguientes Preguntas.
+----------------------------------------------------------+
|                                                          |
| Welcome to OCS Inventory NG Management server setup !    |
|                                                          |
+----------------------------------------------------------+

CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and
previous, please remove any Apache configuration for Communication Server!

Do you wish to continue ([y]/n)?colocamos y
Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.

Starting OCS Inventory NG Management server setup from folder /usr/src/OCSNG_UNIX_SERVER-1.3.2
Storing log in file /usr/src/OCSNG_UNIX_SERVER-1.3.2/ocs_server_setup.log

+----------------------------------------------------------+
| Checking for database server properties...               |
+----------------------------------------------------------+

Your MySQL client seems to be part of MySQL version 5.0.
Your computer seems to be running MySQL 4.1 or higher, good ;-)

Which host is running database server [localhost] ?presionamos enter
OK, database server is running on host localhost ;-)

On which port is running database server [3306] ?presionamos enter
 OK, database server is running on port 3306 ;-)

+----------------------------------------------------------+
| Checking for Apache web server daemon...                 |
+----------------------------------------------------------+

Where is Apache daemon binary [/usr/sbin/apache2] ?presionamos enter
OK, using Apache daemon /usr/sbin/apache2 ;-)

+----------------------------------------------------------+
| Checking for Apache main configuration file...           |
+----------------------------------------------------------+

Where is Apache main configuration file [/etc/apache2/apache2.conf] ?presionamos enter
OK, using Apache main configuration file /etc/apache2/apache2.conf ;-)


+----------------------------------------------------------+
| Checking for Apache user account...                      |
+----------------------------------------------------------+

Which user account is running Apache web server [www-data] ?presionamos enter
OK, Apache is running under user account www-data ;-)


+----------------------------------------------------------+
| Checking for Apache group...                             |
+----------------------------------------------------------+

Which user group is running Apache web server [www-data] ?presionamos enter
OK, Apache is running under users group www-data ;-)


+----------------------------------------------------------+
| Checking for Apache Include configuration directory...   |
+----------------------------------------------------------+

Setup found Apache Include configuration directory in
//etc/apache2/conf.d/.
Setup will put OCS Inventory NG Apache configuration in this directory.
Where is Apache Include configuration directory [//etc/apache2/conf.d/] ?colocamos de forma correcta la ruta /etc/apache2/conf.d/
OK, Apache Include configuration directory /etc/apache2/conf.d/ found ;-)


+----------------------------------------------------------+
| Checking for PERL Interpreter...                         |
+----------------------------------------------------------+

Found PERL Intrepreter at ;-)
Where is PERL Intrepreter binary [/usr/bin/perl] ?presionamos enter
OK, using PERL Intrepreter /usr/bin/perl ;-)


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


+----------------------------------------------------------+
| Checking for Make utility...                             |
+----------------------------------------------------------+

OK, Make utility found at ;-)

+----------------------------------------------------------+
| Checking for Apache mod_perl version...                  |
+----------------------------------------------------------+

Checking for Apache mod_perl version 1.99_22 or higher
Found that mod_perl version 1.99_22 or higher is available.
OK, Apache is using mod_perl version 1.99_22 or higher ;-)

+----------------------------------------------------------+
| Checking for Communication server log directory...       |
+----------------------------------------------------------+

Communication server can create detailled logs. This logs can be enabled
by setting interger value of LOGLEVEL to 1 in Administration console
menu Configuration.
Where to put Communication server log directory [/var/log/ocsinventory-server] ?presionamos enter
OK, Communication server will put logs into directory /var/log/ocsinventory-server ;-)


+----------------------------------------------------------+
| Checking for required Perl Modules...                    |
+----------------------------------------------------------+

Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for Apache::DBI PERL module...
Found that PERL module Apache::DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for Compress::Zlib PERL module...
Found that PERL module Compress::Zlib is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.

+----------------------------------------------------------+
| Checking for optional Perl Modules...                    |
+----------------------------------------------------------+

Checking for SOAP::Lite PERL module...
Found that PERL module SOAP::Lite is available.
Checking for XML::Entities PERL module...
*** Warning: PERL module XML::Entities is not installed !
This module is only required by OCS Inventory NG SOAP Web Service.
Do you wish to continue ([y]/n] ?presionamos enter
+----------------------------------------------------------+
| OK, looks good ;-)                                       |
|                                                          |
| Configuring Communication server Perl modules...         |
+----------------------------------------------------------+

Checking if your kit is complete...
Looks good
Writing Makefile for Apache::Ocsinventory

+----------------------------------------------------------+
| OK, looks good ;-)                                       |
|                                                          |
| Preparing Communication server Perl modules...           |
+----------------------------------------------------------+


+----------------------------------------------------------+
| OK, prepare finshed ;-)                                  |
|                                                          |
| Installing Communication server Perl modules...          |
+----------------------------------------------------------+


+----------------------------------------------------------+
| OK, Communication server Perl modules install finished;-)|
|                                                          |
| Creating Communication server log directory...           |
+----------------------------------------------------------+

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

Fixing Communication server log directory files permissions.
Configuring logrotate for Communication server.
/usr/src/OCSNG_UNIX_SERVER-1.3.2
Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG
Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-server


+----------------------------------------------------------+
| OK, Communication server log directory created ;-)       |
|                                                          |
| Now configuring Apache web server...                     |
+----------------------------------------------------------+

To ensure Apache loads mod_perl before OCS Inventory NG Communication Server,
Setup can name Communication Server Apache configuration file
'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'.
Do you allow Setup renaming Communication Server Apache configuration file
to 'z-ocsinventory-server.conf' ([y]/n) ?presionamos enter
OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file
Removing old communication server configuration to file /etc/apache2/conf.d//ocsinventory.conf
Writing communication server configuration to file /etc/apache2/conf.d//z-ocsinventory-server.conf

+----------------------------------------------------------+
| OK, Communication server setup sucessfully finished ;-)  |
|                                                          |
| Please, review /etc/apache2/conf.d//z-ocsinventory-server.conf
| to ensure all is good. Then restart Apache daemon.       |
+----------------------------------------------------------+


Do you wish to setup Administration Server (Web Administration Console)
on this computer ([y]/n)?presionamos enter

+----------------------------------------------------------+
| Checking for Administration Server directories...        |
+----------------------------------------------------------+

CAUTION: Setup now install files in accordance with Filesystem Hierarchy
Standard. So, no file is installed under Apache root document directory
(Refer to Apache configuration files to locate it).
If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU
MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache
root document directory.
If you choose to move directory, YOU MUST MOVE 'download' directory to
Administration Server writable/cache directory (by default
/var/lib/ocsinventory-reports), especialy if you use deployement feature.

Do you wish to continue ([y]/n)?presionamos enter
Assuming directories 'ocsreports' and 'download' removed from
Apache root document directory.

Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports] ?presionamos enter
OK, using directory /usr/share/ocsinventory-reports to install static files ;-)
Where to create writable/cache directories for deployement packages and
IPDiscover [/var/lib/ocsinventory-reports] ?presionamos enter
OK, writable/cache directory is /var/lib/ocsinventory-reports ;-)


+----------------------------------------------------------+
| Checking for required Perl Modules...                    |
+----------------------------------------------------------+

Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.

+----------------------------------------------------------+
| Installing files for Administration server...            |
+----------------------------------------------------------+

Creating PHP directory /usr/share/ocsinventory-reports/ocsreports.
Copying PHP files to /usr/share/ocsinventory-reports/ocsreports.
Fixing permissions on directory /usr/share/ocsinventory-reports/ocsreports.
Creating database configuration file /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php.
Creating IPDiscover directory /var/lib/ocsinventory-reports/ipd.
Fixing permissions on directory /var/lib/ocsinventory-reports/ipd.
Creating packages directory /var/lib/ocsinventory-reports/download.
Fixing permissions on directory /var/lib/ocsinventory-reports/download.
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
Writing Administration server configuration to file /etc/apache2/conf.d//ocsinventory-reports.conf

+----------------------------------------------------------+
| OK, Administration server installation finished ;-)      |
|                                                          |
| Please, review /etc/apache2/conf.d//ocsinventory-reports.conf
| to ensure all is good and restart Apache daemon.         |
|                                                          |
| Then, point your browser to http://server//ocsreports
| to configure database server and create/update schema.   |
+----------------------------------------------------------+


Setup has created a log file /usr/src/OCSNG_UNIX_SERVER-1.3.2/ocs_server_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Management server,
we can ask you to show us his content !

DON'T FORGET TO RESTART APACHE DAEMON !

Enjoy OCS Inventory NG ;-)

Reiniciamos el servidor apache
#/etc/init.d/apache2 restart

Listo ya tenemos el servidor instalado ahora solo falta crear las tablas de la aplicacion en la base de datos.
Abrimos un navegador web i nos vamos a la siguiente ruta. http://direccion_ip_del_servidor_ocs/ocsreports/install.php
Observaremos una pantalla como esta.



Aqui colocaremos los datos de nuestro servidor de base de datos, el usuario, la contraseña y la direccion ip donde se encuentra nuestro servidor mysql.
Presionamos SEND para que empiece a crear las tablas en la base de datos.
Observaremos una pantalla como esta.


Luego presionamos Enviar Consulta y observaremos una pantalla como esta.

 Luego presionamos Click here to enter OCS-NG GUI  para entrar a la pagina principal de la aplicación




El usuario por defecto es admin y la contraseña es admin.
Ya podemos entrar a la aplicacion, ahora solo falta desplegar el agente en los equipos de la red para comenzar a realizar nuestro inventario.

Comments (4)

Victor, muy buen aporte sabes que tengo un problema se me queda al momento de instalar en CHECKING FOR APACHE Include configuration directory... y no avanza la instalación. Puedes ayudarme?

Saludos Marco, hace bastante tiempo que instale Ocs Inventory, instalaste el paquete de apache anteriormente, puedes ser un poco mas especifico en el error a ver si te puedo ayudar

Estimado Marco.

Tengo el mismo problema. Pudiste dar con la solucion.?

debes ser un poco mas especifico, con el error

Publicar un comentario