Tutorial OCSserwer 2.6 on Debian 10
apt update
apt dist-upgrade
apt update
apt install libxml-simple-perl libperl5.28 libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl libarchive-zip-perl make build-essential apache2 mariadb-client php-pclzip make build-essential libdbd-mysql-perl libnet-ip-perl libxml-simple-perl php php-mbstring php-soap php-mysql php-curl php-xml php-zip php-gd mariadb-server mc
cpan install XML::Entities
perl -MCPAN -e 'install Apache2::SOAP'
perl -MCPAN -e 'install XML::Entities'
perl -MCPAN -e 'install Net::IP'
perl -MCPAN -e 'install Apache::DBI'
perl -MCPAN -e 'install Mojolicious::Lite'
perl -MCPAN -e 'install Switch'
perl -MCPAN -e 'install Plack::Handler'
wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.6/OCSNG_UNIX_SERVER_2.6.tar.gz
tar xfvz OCSNG_UNIX_SERVER_2.6.tar.gz
cd OCSNG_UNIX_SERVER_2.6
sh setup.sh
a2enconf ocsinventory-reports
a2enconf z-ocsinventory-server
chown -R www-data:www-data /var/lib/ocsinventory-reports/
service apache2 restart
Using WEB browser (a this point, depending of your database choice you may have a problem with login to database because MariaDB has a blank password default root for Mysql shell)
http://your_server_IP/ocsreports
Configure Mysql
User -root
Pasword-(password defined due to Mysql instalation)
Name of datbase-ocsweb
DatabaseHost-localhost
rm /usr/share/ocsinventory-reports/ocsreports/install.php
mysql -u root -p
SET PASSWORD FOR 'ocs'@'localhost' = PASSWORD('user_defined_pass_for_ocs_to_connect_database');
SET PASSWORD FOR 'ocs'@'%' = PASSWORD('user_defined_pass_for_ocs_to_connect_database');
exit
****
mcedit /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
{
define("PSWD_BASE","user_defined_pass_for_ocs_to_connect_database");
}
mcedit /etc/apache2/conf-available/z-ocsinventory-server.conf
{
PerlSetVar OCS_DB_PWD user_defined_pass_for_ocs_to_connect_database
In <Location /ocsplugins> Comment lines :
Require local
SetHandler perl-script
Connecting Agents
Agents must be installed with version < or = OCSserver version, for example for XAMPP on Windows OCSserver2.2 must use Agent 2.1.1.1
For presented in this Tutorial Linux OCSserver 2.6 must use Agent 2.4.0.0(is highest aviable at the moment) or below.
Installation of Agents on windows in this configuration I use default settings, just uncheck field Validate certificates, Of course if choose it to be checked must generate certificate on OCSserwer and place it to a Agent config Folder (on windows 10 it is C:\ProgramData\OCS Inventory NG)
User and Password on Agent not need to be used for simple HTTP connection, just ensure you entered right IP Your_server_IP:80(standard port for http)
Thank for reading This Tutorial and in case of any problem or errors i scripts please let me know.