Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.8 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Tutorial OCS 2.4 on Ubuntu 16.04

Tutorial OCSserwer 2.4 on Ubuntu 16.04

sudo apt update

sudo apt dist-upgrade

sudo apt install php-curl apache2-dev gcc perl-modules-5.22 make apache2 mysql-server php perl libapache2-mod-perl2 libapache2-mod-php libio-compress-perl libxml-simple-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl libsoap-lite-perl libnet-ip-perl php-mysql php-gd php7.0-dev php-mbstring php-soap php-xml php-pclzip libarchive-zip-perl php7.0-zip

sudo perl -MCPAN -e 'install Apache2::SOAP'

sudo perl -MCPAN -e 'install XML::Entities'

sudo perl -MCPAN -e 'install Net::IP'

sudo perl -MCPAN -e 'install Apache::DBI'

sudo wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.4/OCSNG_UNIX_SERVER_2.4.tar.gz

sudo tar xfvz OCSNG_UNIX_SERVER_2.4.tar.gz

sudo cd OCSNG_UNIX_SERVER_2.4

sudo sh setup.sh

sudo a2enconf ocsinventory-reports

sudo a2enconf z-ocsinventory-server

sudo chown -R www-data:www-data /var/lib/ocsinventory-reports/

sudo service apache2 restart

Using WEB browser 

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

 sudo 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

    

****

vim /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

        {

        define("PSWD_BASE","user_defined_pass_for_ocs_to_connect_database");

        }

    vim /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

****For lazy people or new on Linux I suggest installing mc instead if vim for editing files, it is also good file manager

sudo apt-get install mc 

Change Options>Config>UseInternalEditor>save 

sudo mc (find file and use F4 for edit, F2 for save file) }

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.4 must use Agent 2.3.1.1(is highest aviable at the moment) or below.

Installation of Agents on windows 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)

in OCS Inventory NG server for Unix by (2.3k points)
edited by

4 Answers

0 votes

I followed all the instructions as described, but when running the agent in Windows 7 it does not work. I put:

http://192.168.1.11:80/ocsinventory and http://192.168.1.11:/ocsinventory

no certificates

noproxi

immediately launch inventory (=/NOW)

by (180 points)
reshown by
0 votes

Hi, 

Please check tis adress in web browser in agent, if doesn't work try to change network location, in Network and sharing center under your network Name shoud be written privet else local network can be locked.

Easiest way to solve problem is:

Go to Network and sharing center, then left down> Home group >Change location (on Windows 7 must select else than public, Windows 10 just ask You for confirmation in Notification area on right side, then just ckick Yes)

If it does't work you'll have to check is Agent allowed to connect througth firewall.

Plase Write if it solve the problem.

Regards

Seweryn

by (2.3k points)
0 votes

When running the sudo setup.sh command, a message was displayed that "Molicious :: Lite, Switch, Plack :: Handler" is not installed, so I did:

    sudo perl -MCPAN -e 'install Mojolicious :: Lite'
    sudo perl -MCPAN -e 'install Switch'
    sudo perl -MCPAN -e 'install Plack :: Handler'

and OCS works

I wanted to install the plugin (plugin winusers) and the following message:
"The communication server encountered the following error on install"

I do not know what I did wrong because I did everything right after installing the ubuntu.

Please HELP ME.

by (140 points)
0 votes

Hi,

I also had a problem due installing plugins . My problem was that Installation in ocsserver did'n create folder and pleace there unziped files. For example TeamViewer:

Have to create manually /etc/ocsinventory-server/perl/Apache/Ocsinventory/Plugins/Teamviewer/

And unzip from plugin.zip(I used mc) two files:

/etc/ocsinventory-server/perl/Apache/Ocsinventory/Plugins/Teamviewer/Map.pm

/etc/ocsinventory-server/plugins/Teamviewer.conf

Plugins in zip should be still in /usr/share/ocsinventory-reports/ocsreports/download 

Next must change permitions:

sudo chown -R www-data:www-data /etc/ocsinventory-server/perl/Apache/Ocsinventory/Plugins/Teamviewer/Map.pm

and:
sudo chown -R www-data:www-data /etc/ocsinventory-server/plugins/Teamviewer.conf

sudo systemctl reload apache2

Regards 

Seweryn

by (2.3k points)
edited by
 
Powered by Question2Answer
...