OCS Inventory

Installation

Serveur

Paquets

apt-get install apache2 mysql-server  php5 libapache2-mod-php5 php5-mysql php5-curl php5-json php5-gd php5-mcrypt \
php5-msgpack  php5-memcached php5-intl php5-sqlite php5-gmp php5-geoip php-soap libphp-pclzip make perl libxml-simple-perl \
libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl libxml-perl libapache2-mod-perl2 libio-compress-perl

Module PERL

cpan -f Archive::Zip
cpan -f YAML
mkdir /usr/include/apache2
cpan -f Apache2::SOAP
cpan -f XML::Entities

Base de données

  • avec option -pMotdePasse Coller
mysql -u root -pMotdePasse
CREATE DATABASE ocs;
CREATE USER 'ocs'@'localhost';
UPDATE mysql.user SET password=PASSWORD('MotdePasseBDOCS') WHERE user='ocs';
GRANT ALL PRIVILEGES ON ocs . * TO 'ocs'@'localhost';
FLUSH PRIVILEGES;

# et mettre à jour le connecteur à la database.. attention dans EON, il y a 6 fichier à vérifier dont 4 dans /etc/httpd/conf.d/[z]... nano ./ocsinventory-reports-2.2/ocsreports/dbconfig.inc.php nano /etc/httpd/conf.d/ocsinventory-server.conf nano /srv/eyesofnetwork/ocsinventory-reports-2.2/ocsreports/ipdiscover-util.pl wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.3.1/OCSNG_UNIX_SERVER-2.3.1.tar.gz cd OCSNG_UNIX_SERVER-2.3.1/ ./setup.sh

Modifier les mots de passe

nano /etc/apache2/conf-enabled/z-ocsinventory-server.conf
nano /usr/share/ocsinventory-reports/ocsreports/ipdiscover-util.pl
nano /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

Apaches

cat >> /etc/apache2/sites-enabled/000-default.conf << EOF
Alias / "/usr/share/ocsinventory-reports/ocsreports/"
   <Directory "/usr/share/ocsinventory-reports/ocsreports/">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride None
       Order allow,deny
       Allow from all
   </Directory>
EOF
a2enconf z-ocsinventory-server.conf
/etc/init.d/apache2 restart

php

  • Modifier le fichier php.ini

nano /etc/php5/apache2/php.ini

  • régler les variables :
post_max_size
upload_max_filesize

Client

Debian

  • Agent
wget https://github.com/OCSInventory-NG/UnixAgent/releases/download/2.4/Ocsinventory-Unix-Agent-2.4.2.tar.gz



mkdir /var/log/ocs/
tar xvf Ocsinventory-Unix-Agent-2.4.2.tar.gz
cd Ocsinventory-Unix-Agent-2.4.2/

apt install libmodule-install-perl dmidecode libxml-simple-perl libnet-ip-perl libwww-perl libdigest-md5-perl libdata-uuid-perl
apt install libcrypt-ssleay-perl libnet-snmp-perl libproc-pid-file-perl libproc-daemon-perl net-tools libsys-syslog-perl pciutils smartmontools read-edid nmap libnet-netmask-perl
perl Makefile.PL
make
make install

  • Agent Deployment (?)
https://github.com/OCSInventory-NG/Packager-for-Windows/releases/download/2.3/OCSNG-Windows-Packager-2.3.zip

Windows

https://github.com/OCSInventory-NG/Agent-Deployment-Tool/releases/download/2.3/OCSNG-Agent-Deploy-Tool-2.3.zip