Installation and Configuration of OCS Inventory Server

OCS Inventory Server

In this post, we are going to configure and install OCS inventory serve. Here we have used same server for installation which we used to install GLPI.

If you want to keep OCS and GLPI server separate, you can also do that.

Let’s start with the installation and configuration process of ocs server.

Before start with installation we need to install require packages for ocs server.

Run below commands to install packages or dependencies.

$ apt-get install libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libarchive-zip-perl libsoap-lite-perl libnet-ip-perl libapache-dbi-perl libdatetime-perl libdbi-perl libdbd-mysql-perl libclass-autouse-perl libmd5-perl libdigest-sha1-perl libhtml-template-perl libimage-size-perl libmime-lite-perl libmime-perl libcompress-zlib-perl libnet-dns-perl liburi-perl libhtml-tagset-perl libhtml-parser-perl libwww-perl libwww-perl libgd-gd2-perl libmailtools-perl libunicode-maputf8-perl libxml-simple-perl libio-stringy-perl  libcaptcha-recaptcha-perl libdigest-hmac-perl

$ cpan install XML::Simple

$ cpan install Compress::Zlib

$ cpan install DBI

$ cpan install DBD::Mysql

$ cpan install Apache::DBI

$ cpan install Net::IP

$ cpan install SOAP::Lite

$ cpan install Apache2::SOAP

Note : if you don't have cpan command install it on your server.
  • Download the OCS Server and extract it under the /opt directory.
  • Follow below steps for installations.
$ cd /opt/
$ wget

$ tar -xvf OCSNG_UNIX_SERVER-2.1.2.tar.gz
$ cd /opt/OCSNG_UNIX_SERVER-2.1.2

After extracting the files, go to the directory and run the file. 

It will asked some questions for setting up OCS Server so answer the questions as per your server requirement

After completion of setup, it will created two configuration file under the apache directory.

follow below steps:

$ cd /etc/apache2/sites-enabled/
$ ln -s /etc/apache2/sites-available/z-ocsinventory-server.conf
$ ln -s /etc/apache2/sites-available/ocsinventory-reports.conf
$ /etc/init.d/apache2 reload

Once everything is done remove the file from docroot because of security reasons

To run the OCS Server panel on browser hit below link :

  • http://localhost/ocsreports

After running above url it will prompt you to set mysql details and then proceed.

Refer below screenshot


On the next page it will shows you the installation process completed and the all dependencies are fulfilled.

Just click on submit button without filling anything under the empty box.

After submitting next page will provide you OCS login credentials copy it somewhere and then click on “Click here to OCS NG GUI”

Use provided credentials for login. [admin/admin]

First page shows you some security warnings. 

  • Remove install.php file from /usr/share/ocsinventory-reports/ocsreports/
  • change the default mysql login password if you want to or keep it same not issue.
  • Third is change default credentials ocsng-gui for this go to “user->add new user” create new user and provide super admin privileges then remove the default admin user.

Now important part is configuration of ocs.

After login go to the “Config” then keep all the settings as it is just change below some parameters which are important for communication with GLPI. 

Under Server Tab,


Click “Update”

Under Deployment Tab,


Click “Update”

Under Inventory Files,


Click “update”

Installation & Configuration has been done for OCS Server.


Now login to GLPI-GUI panel and go to the “Tools->OCS Inventory NG”and click on setup.

Then click on under configuration “OCSNG Server.

After this you will see the “+” sign which allows you to add ocsng server configuration details.

Refere below screenshot to fill server details.

Here we are using ocs server database details and change Active from No to Yes.


Click on Add then our configuration of OCS Server is done.

Now go back to the “Tools->OCS Inventory NG” and you will see options to import new computers etc.  


That’s it our installation and configuration process completed successfully.

Now the last step for integration of GLPI with OCS server is to install the OCS Inventory Agent on a system which helps to fetch system information and provide it to GLPI automatically.

Check below post for installation of OCS Inventory Agent on Windows and Linux systems.

I hope you will understand the complete post if you have any doubt on any of above steps comment down your queries under comment box.

Thank You 🙂

Latest Comments
  1. harry December 14, 2016

Leave a Reply

Your email address will not be published. Required fields are marked *