Usando Linux para muchas cosas y disfrutando de videojuegos, en dispositivos moviles, consolas y pc. Using Linux for many things and enjoying video games, mobile devices, consoles and pc

Mostrando entradas con la etiqueta inventario pc. Mostrar todas las entradas
Mostrando entradas con la etiqueta inventario pc. Mostrar todas las entradas

Como instalar OCSInventory 2.1 paso a paso

DriveMeca ocsinventory logo
Somos fanáticos de la tecnología y por ende cada día tenemos mas y mas equipos lo cual nos lleva a buscar una forma de tener un listado o inventario que nos facilite la administración; ese inventario lo tendremos leyendo este articulo donde muestro como instalar OCSInventory 2.1 paso a paso en un servidor Centos 6.4.

NOTA: Articulo mas actualizado a la fecha en este URL sobre OCSInventory


Requerimientos:
Servidor Centos 6.4 actualizado
puerto 80 libre de firewall

-Instalamos dependencias
yum install httpd mod_perl php php-gd php-pear php-devel  php-mysql php-mbstring perl mysql-server mysql make perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Net-IP perl-SOAP-Lite perl-Digest-SHA1 lynx gcc zlib-devel pcre pcre-devel mod_perl-devel

-Configuramos perl. Si no sabes como hacerlo, aquí tengo un articulo donde explico como.

-Instalamos Apache::DBI y YAML en perl.

-Agregamos a php
pecl channel-update pecl.php.net
pecl install zip

-Iniciamos MySQL, le colocamos contraseña al usuario root propio y activamos su ejecución cada vez que iniciemos el servidor.
service mysqld start

/usr/bin/mysqladmin -u root password 'new-password'

chkconfig mysqld on

-Descargamos modulo perl Apache2-SOAP y lo compilamos e instalamos
cd /tmp
wget -c http://search.cpan.org/CPAN/authors/id/R/RK/RKOBES/Apache2-SOAP-0.73.tar.gz
tar xzvf Apache2-SOAP-0.73.tar.gz
cd Apache2-SOAP-0.73

perl Makefile.PL
Argument "6.55_02" isn't numeric in numeric ge (>=) at Makefile.PL line 22.
[   info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for Apache2::SOAP

make
cp lib/SOAP/Transport/HTTP2.pm blib/lib/SOAP/Transport/HTTP2.pm
cp lib/Apache2/SOAP.pm blib/lib/Apache2/SOAP.pm
Manifying blib/man3/Apache2::SOAP.3pm

-Probamos haya quedado bien. Respondemos con ENTER a todas las preguntas.
make test

-Instalamos el modulo
make install
Installing /usr/local/share/perl5/Apache2/SOAP.pm
Installing /usr/local/share/perl5/SOAP/Transport/HTTP2.pm
Installing /usr/local/share/man/man3/Apache2::SOAP.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod

-Descargamos el ocsinventory-server
cd /root
wget -c https://launchpad.net/ocsinventory-server/stable-2.1/2.1rc1/+download/OCSNG_UNIX_SERVER-2.1rc1.tar.gz

-Descomprimimos
tar xzvf OCSNG_UNIX_SERVER-2.1rc1.tar.gz
cd OCSNG_UNIX_SERVER-2.1rc1

-Iniciamos apache y lo activamos para su ejecucion cada vez que iniciemos el servidor
service httpd start
chkconfig httpd on

-Configuramos ocsinventory-server. Por lo general la respuesta por default es el valor correcto y con nosotros presionar ENTER es suficiente.
sh setup.sh

+----------------------------------------------------------+
|    
| Welcome to OCS Inventory NG Management server setup !
|                                      
+----------------------------------------------------------+

Trying to determine whitch OS or Linux distribution you use
+----------------------------------------------------------+
| Checking for Apache web server binaries !  
+----------------------------------------------------------+

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)?y

Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.

Starting OCS Inventory NG Management server setup from folder /root/OCSNG_UNIX_SERVER-2.1rc1
Storing log in file /root/OCSNG_UNIX_SERVER-2.1rc1/ocs_server_setup.log

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

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

Which host is running database server [localhost] ?

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

On which port is running database server [3306] ?

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

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

Where is Apache daemon binary [/usr/sbin/httpd] ?

OK, using Apache daemon /usr/sbin/httpd ;-)

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

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

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

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

Which user account is running Apache web server [apache] ?

OK, Apache is running under user account apache ;-)

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

Which user group is running Apache web server [apache] ?

OK, Apache is running under users group apache ;-)

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

Setup found Apache Include configuration directory in
/etc/httpd/conf.d/.
Setup will put OCS Inventory NG Apache configuration in this directory.
Where is Apache Include configuration directory [/etc/httpd/conf.d/] ?

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

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

Found PERL Intrepreter at </usr/bin/perl> ;-)
Where is PERL Intrepreter binary [/usr/bin/perl] ?

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

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

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

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

+----------------------------------------------------------+
| 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] ?

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 Apache2::SOAP PERL module...
*** Warning: PERL module Apache2::SOAP is not installed !
This module is only required by OCS Inventory NG SOAP Web Service.
Do you wish to continue ([y]/n] ?y

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] ?y

+----------------------------------------------------------+
| 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.
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) ?y

OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file
Removing old communication server configuration to file /etc/httpd/conf.d//ocsinventory.conf
Writing communication server configuration to file /etc/httpd/conf.d//z-ocsinventory-server.conf

+----------------------------------------------------------+
| OK, Communication server setup sucessfully finished ;-)
|                                                    
| Please, review /etc/httpd/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)?y

+----------------------------------------------------------+
| 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)?

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] ?

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

Where to create writable/cache directories for deployement packages,
administration console logs, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ?

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.
Creating snmp mibs directory /var/lib/ocsinventory-reports/snmp.
Fixing permissions on directory /var/lib/ocsinventory-reports/snmp.
Creating Administration server log files directory /var/lib/ocsinventory-reports/logs.
Fixing permissions on directory /var/lib/ocsinventory-reports/logs.
Creating Administration server scripts log files directory /var/lib/ocsinventory-reports/scripts.
Fixing permissions on directory /var/lib/ocsinventory-reports/scripts.
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
Writing Administration server configuration to file /etc/httpd/conf.d//ocsinventory-reports.conf

+----------------------------------------------------------+
| OK, Administration server installation finished ;-) 
|                                        
| Please, review /etc/httpd/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 /root/OCSNG_UNIX_SERVER-2.1rc1/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 ;-)

-Modificamos en php.ini
vi /etc/php.ini y salimos guardando
post_max_size = 40M
upload_max_filesize = 100M

-Modificamos y colocamos la info del usuario root de MySQL
vi /etc/httpd/conf.d/z-ocsinventory-server.conf
# User allowed to connect to database
PerlSetEnv OCS_DB_USER root
# Password for user
PerlSetVar OCS_DB_PWD new-password

-Reiniciamos apache para que tome los cambios
service httpd restart

-Cambiamos la contraseña del usuario ocs en MySQL

-Abrimos un browser y nos vamos a la ip del servidor, en este ejemplo, http://192.168.1.45/ocsreports y colocamos los datos que nos pide. Damos click al botón Send.
DriveMeca instalando OCSInventory 2.1 paso a paso

-El script creara la db activando algunos valores. Escribimos el TAG o comentario que saldrá por default al ingresar un equipo al inventario, damos click al botón Submit.
DriveMeca instalando OCSInventory 2.1 paso a paso

-Se crea el TAG y ya esta instalado ocsinventory, entramos por primera vez dando click en Click here to enter OCS-NG GUI.
DriveMeca instalando OCSInventory 2.1 paso a paso

-Entramos con el usuario admin y contraseña admin. Damos click al botón Send.
DriveMeca instalando OCSInventory 2.1 paso a paso

-Eliminamos el script de instalación.
rm /usr/share/ocsinventory-reports/ocsreports/install.php

-Cambiamos la contraseña de admin dando click al botón de usuarios, en este ejemplo lo encerré en un circulo rojo.
DriveMeca instalando OCSInventory 2.1 paso a paso

-Cambiamos la contraseña de admin dándole click al botón del lápiz.
DriveMeca instalando OCSInventory 2.1 paso a paso

-Escribimos la contraseña en Password y damos click al botón verde.
DriveMeca instalando OCSInventory 2.1 paso a paso

-Ya cambiada la contraseña, desaparece el aviso rojo y ya estamos listos para agregar equipos pero eso lo veremos pronto en otro articulo.
DriveMeca instalando OCSInventory 2.1 paso a paso

Sígueme en twitter google+facebook o email y podrás estar enterado de todas mis publicaciones.
Disfrútenlo.

Share/Bookmark