OCS Inventory en Centos Linux | Instalación y configuración

OCS Inventory en Centos Linux | Instalación y configuración

OCS Inventory en Centos Linux | Instalación y configuración
5 (100%) 1 vote
Siempre es bueno o necesario tener control de tus activos de software y hardware en tu LAN. Para eso hoy te mostrare en este tutorial en español como instalar y configurar OCS Inventory en Centos Linux paso a paso de forma detallada.

Instalaremos módulos perl, PHP 7.2 (un stack LAMP con módulos perl) y demás dependencias de OCS Inventory en nuestro servidor Linux

Que es OCS Inventory?


OCS Inventory es un software opensource que mediante un agente instalado en los equipos clientes nos presenta un inventario en su consola web del software y hardware.

Este servidor OCS también permite hacer despliegue de aplicaciones en los equipos clientes. Los agentes (clientes) pueden ser equipos Linux, Windows, Mac’s, Sun, BSD y Android.

Requerimientos de instalación OCS Inventory en Centos Linux

OCS Inventory en Centos Linux | Instalación y configuración

-Comenzamos deshabilitando SElinux y reiniciamos el equipo. Todos los comandos los ejecutaremos desde la cuenta root de Linux Centos

vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

Quieres ver como deshabilitar SELinux en vídeo? Aquí debajo te lo muestro, ah, y no olvides suscribirte a mi canal

-Instalamos dependencias que nos servirán para OCS

yum install gcc make mariadb-server httpd wget perl-CPAN which unzip

Instalamos y configuramos PHP 7.2 en Linux Centos


-Para instalar PHP 7.2, que no es el default de Centos Linux, usaremos los repositorios epel y remi

yum install epel-release yum-utils
yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

-Activamos la configuracion a PHP 7.2. A partir de este momento las referencias a sus módulos serán descargados en versión 7.2

yum-config-manager --enable remi-php72

Complementos cargados:fastestmirror
======= repo: remi-php72 =========

[remi-php72]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php72
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = True
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php72/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php72/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php72/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist = http://cdn.remirepo.net/enterprise/7/php72/mirror
mirrorlist_expire = 86400
name = Remi's PHP 7.2 RPM repository for Enterprise Linux 7 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php72
pkgdir = /var/cache/yum/x86_64/7/remi-php72/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = remi-php72
ui_repoid_vars = releasever,
basearch
username =

-Instalamos módulos PHP necesarios

yum install php php-mysql php-gd php-xml

-Verificamos la versión de PHP instalada

php -v
PHP 7.2.9 (cli) (built: Aug 15 2018 09:19:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Instalación de Perl para OCS

-OCS Inventory usa bastantes módulos perl, por lo que es MUY importante que todos los que se necesitan queden correctamente instalados (o no funcionara bien)

No conoces mucho de Perl y prefieres verlo en vídeo? aquí debajo te muestro. Ah, y no olvides suscribirte a mi canal

Algunos no se encuentran en los repositorios default de Linux Centos, por lo que usaremos el repositorio epel

yum --enablerepo=epel install mod_perl perl-XML-Simple mod_perl-devel php-pclzip php-mbstring php-soap perl-Net-IP perl-Archive-Zip perl-XML-Entities

-Agregamos mas paquetes de perl requeridos

yum -y install "perl(SOAP::Lite)"
yum -y install "perl(Digest::SHA1)"
yum -y install "perl(Mojolicious::Lite)"
yum -y install "perl(Switch)"
yum -y install "perl(Plack::Handler)"
yum -y install "perl(XML::LibXML)"
yum -y install "perl(Encode::Detect)"

-Algunos módulos perl debemos instalarlos via cli de perl. No sabes como?, en este otro articulo te explico como instalar perl en linux centos
Los módulos a instalar son:
Apache::DBI
Apache2::SOAP
Archive::Zip

Activamos y configuramos MariaDB para OCS Inventory

-Activamos el servicio MariaDB, lo iniciamos y verificamos este ejecutándose

systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since vie 2018-08-24 16:06:25 -05; 18s ago
Process: 7743 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 7664 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 7742 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─7742 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─7904 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin

-Aseguramos su configuracion con contraseña en la cuenta root y eliminando características no necesitadas

/usr/bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current
password for the root user. If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): Presionamos Enter, aun no tiene contraseña por lo cual no escribimos nada
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n]
New password: #Aceptamos colocarle una contraseña a la cuenta root de MariaDB y la escribimos (no se mostrara en pantalla)
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] #Eliminamos usuarios anonimos
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] #No permitimos conexiones externas al servidor
… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] #Eliminamos la db test
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] #Cargamos nuevamente las tablas de privilegios
… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

-Probamos a conectarnos con la nueva contraseña activa en el anterior paso, creamos la db ocsweb y creamos el usuario ocs con permisos totales a la db para OCS Inventory en Centos

mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.60-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> create database ocsweb;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on ocsweb.* to ocs@localhost identified by 'contraseña';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit;
Bye

Activamos y ejecutamos Apache para OCS Inventory

-Activamos el servicio, lo ejecutamos y verificamos que Apache se haya cargado correctamente

systemctl enable httpd
systemctl start httpd
systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since vie 2018-08-24 16:09:55 -05; 13s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 8032 (/usr/sbin/httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─8032 /usr/sbin/httpd -DFOREGROUND
├─8033 /usr/sbin/httpd -DFOREGROUND
├─8034 /usr/sbin/httpd -DFOREGROUND
├─8035 /usr/sbin/httpd -DFOREGROUND
├─8036 /usr/sbin/httpd -DFOREGROUND
└─8037 /usr/sbin/httpd -DFOREGROUND

Instalamos OCS Inventory en Centos Linux

-Descargamos la ultima versión de OCS Inventory (la 2.5 en este momento)

wget -c https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.5/OCSNG_UNIX_SERVER_2.5.tar.gz

-Descomprimimos el paquete y entramos a su directorio

tar xzvf OCSNG_UNIX_SERVER_2.5.tar.gz
cd OCSNG_UNIX_SERVER_2.5

-La instalación con el script normalmente es sencilla y casi de aceptar todos los defaults siempre y cuando hayamos cumplido con todos los requerimientos anteriores en este articulo (no intentes instalar directo o SEGURAMENTE no te funcionara)

./setup.sh

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

Trying to determine which 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)? Aceptamos continuar la instalación
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.5
Storing log in file /root/OCSNG_UNIX_SERVER_2.5/ocs_server_setup.log los logs de instalacion quedaran almacenados en este archivo

+———————————————————-+
| Checking for database server properties… |
+———————————————————-+

Your MySQL client seems to be part of MySQL version 5.5.
Your computer seems to be running MySQL 4.1 or higher, good 😉

Which host is running database server [localhost] ? Buscara conectarse a mysql (mariadb) en el servidor local
OK, database server is running on host localhost 😉

On which port is running database server [3306] ? Usaremos el puerto default 3306
OK, database server is running on port 3306 😉

+———————————————————-+
| Checking for Apache web server daemon… |
+———————————————————-+

Where is Apache daemon binary [/usr/sbin/httpd] ? path del binario 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] ? path del archivo de configuracion de apache
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] ? Usuario del servicio apache
OK, Apache is running under user account apache 😉

+———————————————————-+
| Checking for Apache group… |
+———————————————————-+

Which user group is running Apache web server [apache] ? Grupo del servicio 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] ? Directorio donde se crearan los archivos de configuracion de OCS para apache
OK, Apache Include configuration directory /etc/httpd/conf.d found 😉

+———————————————————-+
| Checking for PERL Interpreter… |
+———————————————————-+

Found PERL interpreter at </usr/bin/perl> 😉
Where is PERL interpreter binary [/usr/bin/perl] ? Path del binario de perl
OK, using PERL interpreter /usr/bin/perl 😉

Do you wish to setup Communication server on this computer ([y]/n)? Activamos el servidor de comunicaciones de OCS en el server local

+———————————————————-+
| 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 detailed logs. This logs can be enabled
by setting integer value of LOGLEVEL to 1 in Administration console
menu Configuration.
Where to put Communication server log directory [/var/log/ocsinventory-server] ? Path donde se crearan los logs de OCS
OK, Communication server will put logs into directory /var/log/ocsinventory-server 😉

+—————————————————————————-+
| Checking for Communication server plugins configuration directory… |
+—————————————————————————-+

Communication server need a directory for plugins configuration files.
Where to put Communication server plugins configuration files [/etc/ocsinventory-server/plugins] ? Path donde se almacenaran los plugins
OK, Communication server will put plugins configuration files into directory /etc/ocsinventory-server/plugins 😉

+——————————————————————-+
| Checking for Communication server plugins perl directory… |
+——————————————————————-+

Communication server need a directory for plugins Perl modules files.
Where to put Communication server plugins Perl modules files [/etc/ocsinventory-server/perl] ? Path de plugins en perl
OK, Communication server will put plugins Perl modules files into directory /etc/ocsinventory-server/perl 😉

+———————————————————-+
| 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 SOAP::Lite Perl module...
Found that PERL module SOAP::Lite is available.
Checking for Archive::Zip Perl module...
Found that PERL module Archive::Zip is available.

+———————————————————-+
| Checking for optional Perl Modules… |
+———————————————————-+

Checking for Apache2::SOAP PERL module...
Found that PERL module SOAP::Apache2 is available.
Checking for XML::Entities PERL module...
Found that PERL module XML::Entities is available.

Do you wish to setup Rest API server on this computer ([y]/n)? Activamos el Rest API

+———————————————————-+
| Checking for REST API Dependencies … |
+———————————————————-+

Found that PERL module Mojolicious::Lite is available.
Found that PERL module Switch is available.
Found that PERL module Plack::Handler is available.

+———————————————————-+
| Configuring REST API Server files … |
+———————————————————-+

Where do you want the API code to be store [/usr/lib64/perl5/vendor_perl] ? Path de la API
Copying files to /usr/lib64/perl5/vendor_perl

+———————————————————-+
| Configuring REST API Server configuration files … |
+———————————————————-+

+———————————————————-+
| OK, looks good 😉 |
| |
| Configuring Communication server Perl modules… |
+———————————————————-+

Checking if your kit is complete…
Looks good
Writing Makefile for Apache::Ocsinventory
Writing MYMETA.yml and MYMETA.json

+———————————————————-+
| 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 😉 |
| |
| Creating Communication server plugins configuration directory… |
+———————————————————————-+

Creating Communication server plugins configuration directory /etc/ocsinventory-server/plugins.

+———————————————————————-+
| OK, Communication server plugins configuration directory created 😉 |
| |
| Creating Communication server plugins Perl directory… |
+———————————————————————-+

Creating Communication server plugins Perl directory /etc/ocsinventory-server/perl.

+———————————————————————-+
| OK, Communication server plugins Perl 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) ? Aceptamos renombrar el .conf de ocs para que cargue después de mod_perl
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 successfully 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)? Aceptamos configurar la consola o dashboard web de administración de OCS

+———————————————————-+
| 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), especially if you use deployment 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] ? Path de los archivos de la consola web
OK, using directory /usr/share/ocsinventory-reports to install static files 😉

Where to create writable/cache directories for deployment packages,
administration console logs, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ? Path del directorio para logs, cache y sitio de despliegue de paquetes
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.5/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 el archivo z-ocsinventory-server.conf y cuidamos de colocar el usuario ocs y la contraseña que colocamos al crear la db en MariaDB y darle permisos al usuario ocs

vi /etc/httpd/conf.d/z-ocsinventory-server.conf
PerlSetEnv OCS_DB_HOST localhost
PerlSetEnv OCS_DB_PORT 3306
PerlSetEnv OCS_DB_NAME ocsweb
PerlSetEnv OCS_DB_LOCAL ocsweb
PerlSetEnv OCS_DB_USER ocs
PerlSetVar OCS_DB_PWD contraseña

Modificamos permisos e incrementamos valores para OCS Inventory en Centos

-Cambiamos parámetros de PHP para OCS

vi /etc/php.ini
post_max_size = 1024M
upload_max_filesize = 1024M

-Cambiamos dueño y grupo (owner / group)

chown -R apache.apache /usr/share/ocsinventory-reports/
chown -R apache.apache /var/lib/ocsinventory-reports

-Reiniciamos el servicio de apache para que tome los cambios

systemctl restart httpd

-Es posible que aparezca un error y Apache no inicie (no siempre, en algunas instalaciones no me ha pasado y en otras si, no logro aun saber porque). Si ejecutamos el siguiente comando veremos estos errores:

journalctl -xe
Can't locate Apache/Ocsinventory/Plugins/Apache.pm
Can't load Perl module Apache::Ocsinventory::Plugins::Apache

-La solución es copiar unos archivos que el instalador no copia por alguna razón y reiniciamos el servicio para ingresar a OCS Inventory en Centos

Esta vez si debe ejecutarse correctamente

cp /root/OCSNG_UNIX_SERVER_2.5/Apache/Ocsinventory.pm /usr/local/share/perl5/Apache/
cp -R /root/OCSNG_UNIX_SERVER_2.5/Apache/Ocsinventory/ /usr/local/share/perl5/Apache/
systemctl restart httpd

-Abrimos los puertos http y https (80 y 443) en nuestro firewall Centos Linux. Seguidamente reiniciamos el servicio

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl restart firewalld

Configuramos e ingresamos a la interfaz web de OCS Inventory en Centos

-Abrimos un browser en otro equipo en nuestra LAN (que tenga conexión a nuestro ocs inventory en centos) y navegamos a su URL http://IP-servidor-centos-linux/ocsreports (haz el cambio a la ip de tu linux centos)

Recomiendo usar Google Chrome o Firefox Mozilla

Se nos pedirán los siguientes datos:

  • MySQL login: ocs
  • MySQL password: contraseña de la cuenta ocs
  • Name of Database: ocsweb
  • MySQL Hostname: localhost (servidor local)
Configuramos la conexión db de OCS Inventory en Centos
Configuramos la conexión db de OCS Inventory en Centos

-Se crean las tablas en la db ocsweb

Damos click al link Click here to enter OCS-NG GUI

Se realiza la conexión al servidor local mariadb y se crea la db
Se realiza la conexión al servidor local mariadb y se crea la db

-El script actualizara los campos de nuestra db

Damos click al botón Perform the update

Actualizamos los campos de nuestra db OCS
Actualizamos los campos de nuestra db OCS

-Damos click al terminar la actualización al link Click here to enter OCS-NG GUI

Terminada la actualización de OCS Inventory en Centos
Terminada la actualización de OCS Inventory en Centos

-Cambiamos el idioma en el inicio de sesión a Español. Seguidamente nos logeamos como admin con contraseña admin

Cambiamos el idioma y nos logeamos como admin
Cambiamos el idioma y nos logeamos como admin

-OCS Inventory nos mostrara una alerta. Debemos eliminar el archivo install.php (ya no lo necesitamos porque ya terminamos de instalar OCS Inventory en Centos)

Regresamos a la consola de Centos y ejecutamos el siguiente comando para eliminarlo

rm /usr/share/ocsinventory-reports/ocsreports/install.php

OCS nos pide eliminar el install.php
OCS nos pide eliminar el install.php

Cambiar contraseña de admin en OCS Inventory

-Esta es una tarea muy importante por lo cual no lo debemos pasar por alto

Damos click a la rueda dentada de la esquina superior derecha de la consola web de OCS y seguidamente damos click a My account

Ingresamos al perfil de admin a cambiar la contraseña
Ingresamos al perfil de admin a cambiar la contraseña

-En esta pagina cambiaremos el nombre y apellidos del admin, su email y su contraseña

Damos click al botón Ok al finalizar para guardar los cambios

Cambiamos los datos del usuario admin
Cambiamos los datos del usuario admin

-Ya tenemos listo para poner en producción nuestro OCS Inventory en Centos Linux 7 como podemos ver en el menú en Server information

Nuestro servidor OCS Inventory en Centos ya listo
Nuestro servidor OCS Inventory en Centos ya listo

En cualquier organización (hasta en tu casa) es bueno tener el control de  software y hardware disponible en la LAN por lo que tener un servidor OCS Inventory en Centos sera casi que imprescindible

Ya lo usas, tienes otro software que hace esta tarea, que te pareció este ocs inventory manual español, te espero en los comentarios aquí debajo

Satisfech@ con el articulo, hazme una donación, no importa la cantidad, la intención es lo que vale, dale click a este botón

Comparte este articulo opensource en tus redes sociales (compartir es sexy) por medio de los botones de redes sociales para que otros lo conozcan y apoyes mi blog.

Ademas, no olvides escribirme en los comentarios aquí debajo y pasa la voz compartiendo el tweet.

Evangelizador del opensource. Ataco el stress con un videojuego o viajando en mi motocicleta.

Escribe tu comentario

Please Login to comment
  Suscribete  
Notificación de