OCS-NG 2.2 server complete install guide on Debian Jessie 8.4

 

New and updated version for Debian Stretch and OCS Inventory NG server 2.5 can be found here!

 

In our previous part we have successfully installed an RC version of OCS-NG server. Now it’s time to install a stable version of 2.2. There isn’t much many differences between installation of the RC1 and Stable, thus this guide will be much shorter

Table of contents:

  1. Requirements for this tutorial
  2. Installation
  3. Install OCS Windows Agent and collect some data
  4. Finish!

 1. Requirements for this tutorial

Software

In this tutorial we will need following peaces of software:

I strongly recommend running this install inside of virtual machine since wiping it, reformatting or restarting is much faster than on standalone server:)

I performed all steps few times inside virutal environment (Vsphere 5.5 hypervisor aka esxi) but this should apply for any other environment.

Hardware/vm requirements

Our machine should have at least:

  • 1 (v)CPU with 2 cores
  • 2Gigs of RAM
  • 1 Gigabit Ethernet
  • 16GB of storage

Once again, I assume installing it in virtual environment so things like vm-tools will not be necessary to install on standalone servers. I will not cover how to install ESXi or VMWare Player since it’s a material (especially ESXi) for complete series of guides:)

2. Installation

To be honest installation is quite simple since all packages are available for Debian 8.x (Jessie). We don’t need to compile anything from sources and manually register or install dependencies. That saves us quite a bit of work. I know that on some other Linux distros installation might go more straightforward but I’m used to Debian and feel quite comfortable in this environment.

Installation consists of three main steps:

  1. Installation of Debian OS
  2. Installation of required packages
  3. Installation of OCS-NG

Installation of Debian OS

  1. Burn Debian ISO to disk or mount is as cd/dvd in VM
  2. Boot from above
  3. Select to install Debian in 64bit version with minimum options: SSH Server, system utilities. Do not install WWW, DB or other services.
  4. Rest of the options like language or partitioning leave with their default settings.
  5. Reboot and login to shell
  6. Now, we need to install required packages in order to be able to perform rest of the steps. Of course all installs must be performed with root privileges.
  7. Lets type some commands, at last!:

Installation of required packages

Update repositories:

Install Open VM Tools – they simply work better than original VM-tools from VMWARE.

After above it’s good to restart the VM. Good old Windows school 🙂

Be sure to execute the following commands as root

Install Apache2:

Now, packages for it:

Restart Apache with the following command:

Now, we have a running instance of apache:

Continue with installation of packages:

Configure CPAN:

press “yes” to autoconfigure cpan, then install

Install Zip package for perl:

Now, install MySQL:

After typing above command you will have to specify root and admin password for MySQL server. Note them somewhere.
As addition to MySQL I like to have visual representation of databases so lets install phpMyAdmin:

Select apache2 as www deamon:

Provide a password for MySQL database root, then password for phpmy admin and press ok:

one more thing is to create a symlink to phpmyadmin and restart apache2:

Now, you should be able to access your new server at:

  • http://localhost – default apache landing page
  • http://localhost/phpmyadmin – MySQL phpMyAdmin management suite

Installation of OCS-NG Server

Installation of server itself is quite simple. OCS team provided us a nice install script that does pretty much of everything for us. If all required packages are available and running user has root privileges all should go hassle free.

First of all we need to download latest build:

Then extract it somewhere. Might be your current dir if you are in for example in /home/ or /tmp/:

Enter new directory and execute:

Now install script should configure pretty much for you. At one point you will have to answer non default way:

  • When script will ask about main apache conf file. If you didn’t change anything paste this:/etc/apache2/apache2.conf*
  • When script checks: Checking for Apache Include configuration directory…, paste this: /etc/apache2/sites-enabled*
  • Script will ask if you want to use SOAP extensions and more likely report that libraries are missing. Just continue.

*this might be found in info.php results 🙂

Script should finish with a message that apache service needs to be restarted. We will do it in few moments.

Now it’s good time to fix some permissions:

Now, restart apache:

After this there is OCS server is almost ready.
Navigate to:
http://localhost/ocsreports
You should get install screen for OCS like this:

Type in:

  • root user for mySql
  • root pass for mySql
  • name of database: I use default: ocsweb
  • hostname of mySql: localhost (since it all runs on one server)

Now you will get screen, that DB needs to updated:

Press Perform the update. After upgrade you will be presented with a screen:

Now, you are able to login to OCS server by typing admin as user and password:

and Volia!

Ok, back to command line. Installer sets default user and pass for ocsweb DB as ocs/ocs. It’s ok for test environment, but in production we need to change it.

  1. Login to phpMyAdmin with DB root login and pass
  2. Find users TAB in main windows
  3. Note, that there will be two ocs users, click on ocs@localhost (or whatever the host is)
  4. Click Edit Permissions
  5. Click Change password
  6. Change password and submit changes.

Now, OCS will stop working. It’s ok. Now we need to change password in OCS config:

Now, we need to edit z-ocsinventory-service.conf as well:

Find line:

replace “ocs” with DB password you have set and restart apache2 deamon

If something is wrong, check you logs with command:

tail /var/log/apache2/error.log

tail /var/log/apache2/access.log

Now OCS reports should be running again.
Now, just delete install script by typing following command:

Base OCS is now installed and running:)

3. 
Install OCS Windows Agent and collect some data

Recently there was an update to the Windows agent. New version is numbered as 2.1.1.3 which is compatible with our server. I assume that new version of agent, numbered 2.2 will be available soon:)

Agent can be downloaded here:

Launch setup and check following options:

Since we didn’t enable SSL nor we have generated any certificates do not enable this option during installation.

Moreover if you do not have a valid DNS service in your local network, enter IP of the management server instead of FQDN or NetBios name.

Most certainly we do not need to specify any proxy server to access ocsinventory server:

Finally, select to perform immediate inventory after installation, press “next” two times and wait till finish.

After few minutes you can see that computer is listed in our ocs inventory server:

And

4. Finish!

That’s all, It is a bit simpler comparing to OCS2.2RC1 and 2.1 to install it. Enjoy new look and feel. New agent works pretty much the same as old one. I will try to enable SSL and LDAP next, so stay tuned. As always, I encourage you to leave a replay on how it went on your server:)

[/fusion_text]

 

[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

By |2018-11-02T14:47:59+00:00April 22nd, 2016|How-To's, OCS Inventory NG|52 Comments

About the Author:

I am passionate about Systems Administration. I like to face new challenges and test new environments.Windows and Linux Debian boxes (both physical and virtual) are my favourites. I like solving problems related to Windows Server roles and services as well as Linux but some distributions in particular. I'm not considering myself as Linux master but surely, I always do my best to fit the needs. On the other hand I consider myself as a Windows Server Professional and in terms of WS and Windows Desktops I always follow best practices, good advices and opinions from other admins.

52 Comments

  1. James Dover April 27, 2016 at 00:20 - Reply

    Thanks dude this is awesome!

    • Miłosz Engel April 27, 2016 at 08:13 - Reply

      You’re welcome, there will be more regarding OCS 2.2 soon

  2. Elias April 28, 2016 at 10:50 - Reply

    I am currently struggling with allowing users from multiple subdomains to log in to OCS. Your previous posts have helped me a lot so I’m wondering if you have any advice for me.

    Basically the layout is like this:
    domain.local
    otherdomain.domain.local
    otherdomain2.domain.local

    We want users from all of those to be able to log in with their account by prefixing so for example a user in domain.local would just log in with his username: user1

    Another user in otherdomain.domain.local would log in with the prefix of that domain and his username so for example:
    other\user2

    Do you know of a way to achieve this?

  3. Tom May 6, 2016 at 00:50 - Reply

    I’ve been working on trying to setup OCS for a couple of weeks now on a Ubuntu 14.04 server and I believe I’ve got it almost all figured out – thanks to this great (and recent) guide! When I first go to do the initial web set at localhost/ocsreports, after successfully setting up MSQL database, I’m getting a yellow bar that warns me: Document root should be writable: /var/www/html.

    To help illustrate with a picture, I’m pointing at your screenshot just before the db update request. It’s strange that it’s advising me for that to be writable when I’ve actually even tried giving the /var/www/html 777….it still tells me https://ip_address/download is forbidden

    • Miłosz Engel May 6, 2016 at 08:14 - Reply

      Ok, so this seems to me that user running apache deamon is not allowed to write to /var/www/html. In most cases that would be www-data user and group. In my config I always run apache as www-data user who belongs to www-data group. Also I have changed owner for /var/www/html to www-data. Permissions for ocsreports directory are 0755, for /download directory are:0775.
      To be able to browse /download folder you would need to add /download location in apache2 config:
      Alias /download /var/lib/ocsinventory-reports/download

      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all

      This needs to be put either in http or https site .conf file. Ususally in /etc/apache2/sites-enabled directory
      I will update this guide to cover enabling download&deployment capability in ocs 2.2 soon 🙂

      • Tom May 6, 2016 at 17:17 - Reply

        Thank you very much for all your help! All the suggestions you made were either already setup that way or I changed them based on your input – with the exception of one thing…which may have been it all along =)
        In the conf file under section…

        Alias /download /var/lib/ocsinventory-reports/download

        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all

        …in Apache 2.4 the syntax for the last 2 lines did not work. However when I replaced those 2 lines with “Require all granted” it resolved the issue and am now able to view the directories within /download.

        Thanks for all your help!!

        • Miłosz Engel May 7, 2016 at 00:02 - Reply

          Thank you for your feedback! I will keep that in mind when creating guide about download and deployment functionality, Thanks!

  4. Andrea May 19, 2016 at 15:20 - Reply

    Thanks a lot for this guide!

    The setup of a Linux system with all those packages and dependencies was a daunting task for a mostly-Windows IT like me.

    We run OCS inventory server on a Linux virtual machine, and indeed it is a great value for my company.

    • Miłosz Engel May 19, 2016 at 15:25 - Reply

      I know how you feel since I’m mostly Windows Admin as well. Glad it helped you!

  5. Eddy D May 20, 2016 at 12:06 - Reply

    Hey!

    First of all: awesome tutorial !

    But i’m having Trouble with my Clients.
    I created a Little .bat to Launch silencly the Client installer in a Computer.
    It works, my Client is install. But i can’t see anything in the serveur (when i’m doing a graphical the Computer Show up), and i can find this is the log installer :

    [/NOW] used, so launching “C:\Program Files (x86)\OCS Inventory Agent\ocsinventory.exe”…Result: 4

    What is this result : 4 ? I know it’s wrong but i don’t know what it is.

    if you have any ideas… I’ll be so glad to listen to you !

    Here is my bat :

    @echo off
    Start OCS-NG-Windows-Agent-Setup.exe /S /INSTALL /SERVEUR=192.168.225.104 /NP /NOW

    • Miłosz Engel May 20, 2016 at 12:58 - Reply

      I think the /Server switch should be /Server and followed by either HTTP:// or HTTPS:// and with ocsinventory postfix depending on your configuration.
      In your case I would use (non-SSL):
      Start OCS-NG-Windows-Agent-Setup.exe /S /NP /NOW /NOSPLASH /SERVER=http://192.168.225.104/ocsinventory
      If you use /S switch for silent, you probably do not want splash screen, so /NOSPLASH. Depending on your preference you may or may not want to display tray icon, so /NO_SYSTRAY switch can be used as well. This might be helpful: https://miloszengel.com/how-to-update-ocs-ng-inventory-agent-for-windows-to-2-1-1-3/
      Apart from the above there is a OCSNG-Windows-Packager-2.1.1.zip available for download wich can be used to build a one-file installer and deploy it. I used it to initially deploy OCS to around 180 computers no problem.

      • Eddy D May 20, 2016 at 13:24 - Reply

        Hey again
        Thanks for your answer really fast !

        I’ve already tried /Server=http://192.168.125.104/ocsinventory but the result is the same.
        I got the same error with the packager so… :/

        • Miłosz Engel May 20, 2016 at 13:34 - Reply

          change debug option in c:\ProgramData\OCS Inventory NG\Agent\ocsinventory.ini to level 2 or even 3. and post logs from running ocsinventory.exe from program files. Keep in mind, that you have to stop ocsinventory service on client and edit it as an Administrator.
          Also, please post logs from apache2 error.log, located usually in /var/logs/apache2 on linux server.

          • Eddy D May 20, 2016 at 13:54

            Thanks again for your help

            Here it’s the log file :

            ==============================================================================
            Starting OCS Inventory NG Agent on Friday, May 20, 2016 13:51:32.
            AGENT => Running OCS Inventory NG Agent Version 2.1.1.3
            AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.3
            AGENT => Loading plug-in(s)
            DLL PLUGIN => Searching for Plug-in DLL(s) in folder
            DLL PLUGIN => 0 DLL Plug-in(s) successfully loaded on 0 DLL(s) found
            AGENT => Using network connection with Communication Server
            COM PROVIDER => Loading Communication Provider
            AGENT => Using Communication Provider Version
            AGENT => Sending getLabel request
            COM SERVER => Initializing cURL library for getFile
            COM SERVER => Using cURL without server authentication
            COM SERVER => Disabling cURL proxy support
            COM SERVER => Enabling cURL SSL server validation support using CA Bundle
            COM SERVER => Sending fileGet request to URL
            WARNING *** COM SERVER => Failed to send HTTP Get request
            COM SERVER => Cleaning cURL library
            AGENT => Failed to retrieve Label
            AGENT => Sending Prolog
            DID_CHECK => Read DeviceID and MACs in file
            COM SERVER => Initializing cURL library for sendRequest
            COM SERVER => Using cURL without server authentication
            COM SERVER => Disabling cURL proxy support
            COM SERVER => Enabling cURL SSL server validation support using CA Bundle
            COM SERVER => Sending HTTP Post request to URL
            WARNING *** COM SERVER => Failed to send HTTP Post request
            COM SERVER => Cleaning cURL library
            ================= TRACE START ===============

            ================= TRACE STOP ===============
            ERROR *** AGENT => Failed to send Prolog
            AGENT => Unloading communication provider
            AGENT => Unloading plug-in(s)
            AGENT => Execution duration: 00:00:05.

            I can’t find the error.log file on my Debian Server but i don’t think the Probleme come from him ^^

          • Miłosz Engel May 20, 2016 at 14:07

            Seems to me that you have SSL = 1 in ocsinventory.ini but address is http:// etc.
            Also, do you have valid SSL certificate installed in apache and .pem file in programdata on client? If not, set ssl=0 and check if setting is server=http://ip/ocsinventory

            apache logs are located in /var/log/apache2/ if standard configuration. Files are access.log and error.log

  6. Eddy D May 20, 2016 at 14:33 - Reply

    OKAY I HATE MYSELF.

    I just wrote “Serveur” as a frenchy way :'(

    I’m so sorry to disturbed you for nothing :/

    Thank you soooo much for this time you spend for me.

    • Miłosz Engel May 20, 2016 at 14:50 - Reply

      Yup, that’s why I wrote, that the switch should be /SERVER 🙂
      You’re welcome Eddy

  7. Matheus Campos May 23, 2016 at 14:19 - Reply

    Hello all i got this error

    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) ?y
    OK, using ‘z-ocsinventory-server.conf’ as Communication Server Apache configuration file
    Removing old communication server configuration to file /etc/apache2/sites-enabled*/ocsinventory.conf
    Writing communication server configuration to file /etc/apache2/sites-enabled*/z-ocsinventory-server.conf
    *** ERROR: Unable to write /etc/apache2/sites-enabled*/z-ocsinventory-server.conf, please look at error in /tmp/OCSNG_UNIX_SERVER-2.2/ocs_server_setup.log and fix !

    • Miłosz Engel May 23, 2016 at 14:24 - Reply

      You run it as root, are you?
      Yes, I allow to rename ocsinvnentory.conf to z-ocsinventory.conf
      What the error says at
      /tmp/OCSNG_UNIX_SERVER-2.2/ocs_server_setup.log
      ?

  8. Matheus May 24, 2016 at 18:19 - Reply

    Its working here,

    Other question can i recive automatic reports from OCS ? Ex. Space in disk from server ?

  9. jpart June 10, 2016 at 18:04 - Reply

    Thanks! I’ve been struggling with OCS 2.2 for two weeks but now I finally got it working:)

    btw. you cannot use default setup.sh with ubuntu 16.06 or debian 8.5, this should work (https://github.com/OCSInventory-NG/OCSInventory-Server/blob/master/setup.sh) I used this also with this guide, without this I got Config Variable errors.

    • Miłosz Engel June 10, 2016 at 18:12 - Reply

      Thanks for letting us know! I haven’t tested this with debian 8.5 but I’m glad it helped you with your installation, regards, Milosz

  10. James Dover June 22, 2016 at 16:25 - Reply

    OCS Inventory Server is now available in 2.2.1 version. As of June 21, 2016.

  11. James Dover June 22, 2016 at 16:26 - Reply

    Interface

    Fix UI glitch
    Fix links problems
    Fix display table problems on ocsreports
    Cosmetic fix on computer interface
    Upgrade library
    Fix compatibility problems with php 5.3
    Better compatibility with php 7
    Server

    Improve plugin engine handling
    Improve perl compatibility
    Some fix on communication engine
    Bugs / Enhancements on ocsreports

    #43 #44 #47 #48 #60 #61 #64 #68 #84 #87 #96 #98

  12. James Dover June 22, 2016 at 18:17 - Reply

    I have confirmed update 2.2.1 works with Debian 8.50 here is the link to the iso.

    http://cdimage.debian.org/debian-cd/8.5.0/amd64/iso-cd/

    Download this version:
    debian-8.5.0-amd64-netinst.iso 2016-06-04 17:34 247M

    • Miłosz Engel June 22, 2016 at 18:26 - Reply

      Thank you James for all your input! Have you tried steps in this tut for installing 2.2.1 on 8.5 as well or just upgraded to 2.2.1 from 2.2?

  13. zgoneq July 18, 2016 at 14:14 - Reply

    Hi,
    I have big trouble witch virtual catalog /ocsinventory (deb 8.5) ocs 2.2

    agent cannot communicate with server. Any idea?
    Installation is fresh on virtualbox

    • Raul August 18, 2016 at 19:02 - Reply

      Hi Zgoneq!

      We have the same problem. Try diferents ways to resolv it and no have luky. we had to return to the previous version. Maybe the new architecture of new apache 2.4 doesn´t support the new version of ocs.

      Let us know if anyone could do work.

      Thanks!

      • Miłosz Engel August 23, 2016 at 14:22 - Reply

        I need to check that since I’m a little behind with the new version 🙂

  14. Harshal August 23, 2016 at 09:11 - Reply

    I am getting error

    Forbidden
    You don’t have permission to access /ocsreports/ on this server.

    OS Ubuntu 14.04

    • Miłosz Engel August 23, 2016 at 14:21 - Reply

      please specify full path. If it’s related to /download than make sure you have correct filesystem permissions.

  15. Akhil August 31, 2016 at 09:20 - Reply

    I trying to install OCS Inventory Server V 2.2.1 in windows.It installed successfully but it shows Ver. 2.1.2.

    Download link: http://www.ocsinventory-ng.org/en/en-ocs-inventory-ng-2-2-1/

  16. David COLLANGE October 6, 2016 at 13:26 - Reply

    Hello,

    Thanks and great job.
    However I’ve a problem with the end of install. I get this message:

    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) ?y
    OK, using ‘z-ocsinventory-server.conf’ as Communication Server Apache configuration file
    Removing old communication server configuration to file /etc/apache2/sites-enabled*/ocsinventory.conf
    Writing communication server configuration to file /etc/apache2/sites-enabled*/z-ocsinventory-server.conf
    *** ERROR: Unable to write /etc/apache2/sites-enabled*/z-ocsinventory-server.conf, please look at error in /tmp/OCSNG_UNIX_SERVER-2.2/ocs_server_setup.log and fix !

    And then I can’t reach localhost/ocsreport

    I’m not so pro and I need a help.
    Thank you for your help.

    Athreyu

    • Miłosz Engel October 7, 2016 at 21:13 - Reply

      I’m not a pro as well 🙂
      please post error message from /tmp/OCSNG_UNIX_SERVER-2.2/ocs_server_setup.log as ERROR says.
      Also, make sure you are running install script as root, not standard user.
      Thanks for your comment!

  17. David October 19, 2016 at 13:20 - Reply

    Starting OCS Inventory NG Management server setup on 2016-10-06-11-16-03
    from folder /tmp/OCSNG_UNIX_SERVER-2.2
    Storing log in file /tmp/OCSNG_UNIX_SERVER-2.2/ocs_server_setup.log

    ============================================================
    Checking OCS Inventory NG Management Server requirements…
    ============================================================
    Checking for database server properties
    MySQL client distribution version 5.5.
    Computer seems to be running MySQL 4.1 or higher
    Database server is running on host localhost
    Database server is running on port 3306
    Checking for Apache web server daemon
    Found Apache daemon /usr/sbin/apache2
    Using Apache daemon /usr/sbin/apache2
    Checking for Apache main configuration file
    Found Apache HTTPD_ROOT
    Found Apache SERVER_CONFIG_FILE
    Found Apache main configuration file
    Using Apache main configuration file /etc/apache2/apache2.conf*
    Checking for Apache user account
    Found Apache user account www-data
    Using Apache user account www-data
    Checking for Apache group
    Found Apache user group www-data
    Using Apache user group www-data
    Checking for Apache Include configuration directory
    Found Apache Include configuration directory
    Using Apache Include configuration directory /etc/apache2/sites-enabled*
    Checking for PERL Interpreter
    Found PERL Intrepreter at
    Using PERL Intrepreter /usr/bin/perl

    ============================================================
    Installing Communication server
    ============================================================
    Checking for Make utility
    Make utility found at
    Checking for Apache mod_perl version 1.99_22 or higher
    mod_perl 1.99_22 or higher is available
    Using mod_perl version 1.99_22 or higher
    Checking for Communication server log directory
    Using /var/log/ocsinventory-server as Communication server log directory
    Checking for Communication server plugins configuration directory
    Using /etc/ocsinventory-server/plugins as Communication server plugins configuration directory
    Checking for Communication server perl directory
    Using /etc/ocsinventory-server/perl as Communication server plugins perl directory
    Entering Apache sub directory
    Checking for DBI PERL module
    PERL module DBI is available
    Checking for Apache::DBI PERL module
    PERL module Apache::DBI is available
    Checking for DBD::mysql PERL module
    PERL module DBD::mysql is available
    Checking for Compress::Zlib PERL module
    PERL module Compress::Zlib is available
    Checking for XML::Simple PERL module
    PERL module XML::Simple is available
    Checking for Net::IP PERL module
    PERL module Net::IP is available
    Checking for SOAP::Lite Perl module
    PERL module SOAP::Lite is available
    Checking for Archive::Zip Perl module
    PERL module Archive::Zip is available
    Checking for Apache2::SOAP PERL module
    Can’t locate Apache2/SOAP.pm in @INC (you may need to install the Apache2::SOAP module) (@INC contains: /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/i386-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/i386-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .).
    BEGIN failed–compilation aborted.
    User choose to continue setup without PERL module SOAP::Apache2
    Checking for XML::Entities PERL module
    PERL module XML::Entities is available
    Configuring Communication server (perl Makefile.PL)
    Preparing Communication server Perl modules (make)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Snmp/Inventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Registry.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Plugins.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Database.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/SOAP.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Updates.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Plugins/Modules.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/History.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Ipdiscover.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Snmp.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Snmp/Data.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Example.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Datafilter.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Snmp.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Download.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Config.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Download/Inventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Notify.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Extensions.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Inventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Plugins/Apache.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Map.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Filter.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Update.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Internals.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Ipdiscover.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Constants.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Data.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Update/AccountInfos.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Modperl2.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Export.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/System/Config.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Groups.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Communication/Session.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Update/Hardware.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Cache.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Filter.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Capacities.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Communication.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Update.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Useragent.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/System.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Modperl1.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Duplicate.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory.pm (unchanged)
    Installing Communication server Perl modules (make install)
    Appending installation info to /usr/local/lib/i386-linux-gnu/perl/5.20.2/perllocal.pod
    Creating Communication server log directory /var/log/ocsinventory-server
    Fixing Communication server log directory permissions
    Configuring logrotate (ed logrotate.ocsinventory-NG)
    ******** Begin updated logrotate.ocsinventory-server.local ***********
    # Rotate OCS Inventory NG Communication server logs daily
    # Save 7 days old logs in compressed mode
    /var/log/ocsinventory-server/*.log {
    daily
    rotate 7
    compress
    missingok
    }
    ******** End updated logrotate.COM_SERVER_LOGROTATE_CONF_FILE.local ***********
    Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG
    Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-server
    Creating Communication server plugins configuration directory /etc/ocsinventory-server/plugins
    Creating Communication server plugins Perl directory /etc/ocsinventory-server/perl
    OK, using ‘z-ocsinventory-server.conf’ as Communication Server Apache configuration file
    Configuring Apache web server (file ocsinventory-server.conf)
    ******** Begin updated ocsinventory-server.conf.local ***********
    ################################################################################
    #
    # OCS Inventory NG Communication Server Perl Module Setup
    #
    # Copyleft 2006 Pascal DANEK
    # Web: http://www.ocsinventory-ng.org
    #
    # This code is open source and may be copied and modified as long as the source
    # code is always made freely available.
    # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
    ################################################################################

    # Which version of mod_perl we are using
    # For mod_perl 1.999_21, replace 2 by 2
    PerlSetEnv OCS_MODPERL_VERSION 2

    # Master Database settings
    # Replace localhost by hostname or ip of MySQL server for WRITE
    PerlSetEnv OCS_DB_HOST localhost
    # Replace 3306 by port where running MySQL server, generally 3306
    PerlSetEnv OCS_DB_PORT 3306
    # Name of database
    PerlSetEnv OCS_DB_NAME ocsweb
    PerlSetEnv OCS_DB_LOCAL ocsweb
    # User allowed to connect to database
    PerlSetEnv OCS_DB_USER ocs
    # Password for user
    PerlSetVar OCS_DB_PWD ocs

    # Slave Database settings
    # Replace localhost by hostname or ip of MySQL server for READ
    # Useful if you handle mysql slave databases
    # PerlSetEnv OCS_DB_SL_HOST localhost
    # Replace 3306 by port where running MySQL server, generally 3306
    # PerlSetEnv OCS_DB_SL_PORT_SLAVE 3306
    # User allowed to connect to database
    # PerlSetEnv OCS_DB_SL_USER ocs
    # Name of the database
    # PerlSetEnv OCS_DB_SL_NAME ocsweb
    # Password for user
    # PerlSetVar OCS_DB_SL_PWD ocs

    # Path to log directory (must be writeable)
    PerlSetEnv OCS_OPT_LOGPATH “/var/log/ocsinventory-server”

    # If you need to specify a mysql socket that the client’s built-in
    #PerlSetEnv OCS_OPT_DBI_MYSQL_SOCKET “path/to/mysql/unix/socket”
    # DBI verbosity
    PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 0

    # Unicode support
    PerlSetEnv OCS_OPT_UNICODE_SUPPORT 1

    # If you are using a multi server architecture,
    # Put the ip addresses of the slaves on the master
    # (This is read as perl regular expressions)
    PerlAddVar OCS_OPT_TRUSTED_IP 127.0.0.1
    #PerlAddVar OCS_OPT_TRUSTED_IP XXX.XXX.XXX.XXX

    # ===== WEB SERVICE (SOAP) SETTINGS =====

    PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 0
    PerlSetEnv OCS_OPT_WEB_SERVICE_RESULTS_LIMIT 100
    # PerlSetEnv OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF “WEBSERV_PRIV_MOD_CONF_FILE”

    # Be careful: you must restart apache to make settings taking effects

    # Configure engine to use the settings from this file
    PerlSetEnv OCS_OPT_OPTIONS_NOT_OVERLOADED 0

    # Try to use other compress algorithm than raw zlib
    # GUNZIP and clear XML are supported
    PerlSetEnv OCS_OPT_COMPRESS_TRY_OTHERS 1

    ##############################################################
    # ===== OPTIONS BELOW ARE OVERLOADED IF YOU USE OCS GUI =====#
    ##############################################################

    # NOTE: IF YOU WANT TO USE THIS CONFIG FILE INSTEAD, set OCS_OPT_OPTIONS_NOT_OVERLOADED to ‘1’

    # ===== MAIN SETTINGS =====

    # Enable engine logs (see LOGPATH setting)
    PerlSetEnv OCS_OPT_LOGLEVEL 0
    # Specify agent’s prolog frequency
    PerlSetEnv OCS_OPT_PROLOG_FREQ 12
    # Configure the duplicates detection system
    PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 15
    # Futur security improvements
    PerlSetEnv OCS_OPT_SECURITY_LEVEL 0
    # Validity of a computer’s lock
    PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 600
    # Enable the history tracking system (useful for external data synchronisation
    PerlSetEnv OCS_OPT_TRACE_DELETED 0

    # ===== INVENTORY SETTINGS =====

    # Specify the validity of inventory data
    PerlSetEnv OCS_OPT_FREQUENCY 0
    # Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load)
    PerlSetEnv OCS_OPT_INVENTORY_DIFF 1
    # Make engine consider an inventory as a transaction (lower concurency, better disk usage)
    PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1
    # Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load
    PerlSetEnv OCS_OPT_INVENTORY_WRITE_DIFF 1
    # Enable some stuff to improve DB queries, especially for GUI multicriteria searching system
    PerlSetEnv OCS_OPT_INVENTORY_CACHE_ENABLED 1
    # Specify when the engine will clean the inventory cache structures
    PerlSetEnv OCS_OPT_INVENTORY_CACHE_REVALIDATE 7
    # Enable you to keep trace of every elements encountered in db life
    PerlSetEnv OCS_OPT_INVENTORY_CACHE_KEEP 1

    # ===== SOFTWARES DEPLOYMENT SETTINGS =====

    # Enable this feature
    PerlSetEnv OCS_OPT_DOWNLOAD 0
    # Package which have a priority superior than this value will not be downloaded
    PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LENGTH 10
    # Time between two download cycles (bandwidth control)
    PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 60
    # Time between two fragment downloads (bandwidth control)
    PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 60
    # Specify if you want to track packages affected to a group on computer’s level
    PerlSetEnv OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS 1
    # Time between two download periods (bandwidth control)
    PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 60
    # Agents will send ERR_TIMEOUT event and clean the package it is older than this setting
    PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 7
    # Agents will send an error event and clean the package if package command does not respond during this setting
    PerlSetEnv OCS_OPT_DOWNLOAD_EXECUTION_TIMEOUT 120

    # Enable ocs engine to deliver agent’s files (deprecated)
    PerlSetEnv OCS_OPT_DEPLOY 0
    # Enable the softwares deployment capacity (bandwidth control)

    # ===== GROUPS SETTINGS =====

    # Enable the computer\s groups feature
    PerlSetEnv OCS_OPT_ENABLE_GROUPS 1
    # Random number computed in the defined range. Designed to avoid computing many groups in the same process
    PerlSetEnv OCS_OPT_GROUPS_CACHE_OFFSET 43200
    # Specify the validity of computer’s groups (default: compute it once a day – see offset)
    PerlSetEnv OCS_OPT_GROUPS_CACHE_REVALIDATE 43200

    # ===== IPDISCOVER SETTINGS =====

    # Specify how much agent per LAN will discovered connected peripherals (0 to disable)
    PerlSetEnv OCS_OPT_IPDISCOVER 2
    # Specify the minimal difference to replace an ipdiscover agent
    PerlSetEnv OCS_OPT_IPDISCOVER_BETTER_THRESHOLD 1
    # Time between 2 arp requests (mini: 10 ms)
    PerlSetEnv OCS_OPT_IPDISCOVER_LATENCY 100
    # Specify when to remove a computer when it has not come until this period
    PerlSetEnv OCS_OPT_IPDISCOVER_MAX_ALIVE 14
    # Disable the time before a first election (not recommended)
    PerlSetEnv OCS_OPT_IPDISCOVER_NO_POSTPONE 0
    # Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents)
    PerlSetEnv OCS_OPT_IPDISCOVER_USE_GROUPS 1

    # ===== INVENTORY FILES MAPPING SETTINGS =====

    # Use with ocsinventory-injector, enable the multi entities feature
    PerlSetEnv OCS_OPT_GENERATE_OCS_FILES 0
    # Generate either compressed file or clear XML text
    PerlSetEnv OCS_OPT_OCS_FILES_FORMAT OCS
    # Specify if you want to keep trace of all inventory between to synchronisation with the higher level server
    PerlSetEnv OCS_OPT_OCS_FILES_OVERWRITE 0
    # Path to ocs files directory (must be writeable)
    PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp

    # ===== FILTER SETTINGS =====

    # Enable prolog filter stack
    PerlSetEnv OCS_OPT_PROLOG_FILTER_ON 0
    # Enable core filter system to modify some things “on the fly”
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_ENABLED 0
    # Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP 0
    # Period definition for INVENTORY_FILTER_FLOOD_IP
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 300
    # Enable inventory filter stack
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON 0

    # ===== DATA FILTER =====

    #Enable the dat filtering capacity
    PerlSetEnv OCS_OPT_DATA_FILTER 0

    # Set the table names and the field associated you want to filter
    #PerlAddVar OCS_OPT_DATA_TO_FILTER HARDWARE
    #PerlAddVar OCS_OPT_DATA_TO_FILTER USERID

    # ===== REGISTRY SETTINGS =====

    # Enable the registry capacity
    PerlSetEnv OCS_OPT_REGISTRY 1

    # ===== SNMP SETTINGS =====

    # Enable the SNMP capacity
    PerlSetEnv OCS_OPT_SNMP 0
    # Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load)
    PerlSetEnv OCS_OPT_SNMP_INVENTORY_DIFF 1
    # Display error message about agent https communication in logfile
    PerlSetEnv OCS_OPT_SNMP_PRINT_HTTPS_ERROR 1

    # ===== SESSION SETTINGS =====
    # Not yet in GUI

    # Validity of a session (prolog=>postinventory)
    PerlSetEnv OCS_OPT_SESSION_VALIDITY_TIME 600
    # Consider a session obsolete if it is older thant this value
    PerlSetEnv OCS_OPT_SESSION_CLEAN_TIME 86400
    # Accept an inventory only if required by server
    #( Refuse “forced” inventory)
    PerlSetEnv OCS_OPT_INVENTORY_SESSION_ONLY 0

    # ===== TAG =====

    # The default behavior of the server is to ignore TAG changes from the
    # agent.
    PerlSetEnv OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT 0

    # ===== EXTERNAL USERAGENTS =====

    #Path for external useragents reference file
    #!! WARNING !! : external agents may not be supported by OCS NG Community !
    #PerlSetEnv OCS_OPT_EXT_USERAGENTS_FILE_PATH /tmp/yourfile.txt

    # ===== PLUGINS =====

    PerlSetEnv OCS_PLUGINS_PERL_DIR “/etc/ocsinventory-server/perl”
    PerlSetEnv OCS_PLUGINS_CONF_DIR “/etc/ocsinventory-server/plugins”

    # ===== DEPRECATED =====

    # Set the proxy cache validity in http headers when sending a file
    PerlSetEnv OCS_OPT_PROXY_REVALIDATE_DELAY 3600
    # Deprecated
    PerlSetEnv OCS_OPT_UPDATE 0

    ############ DO NOT MODIFY BELOW ! #######################

    # External modules
    PerlModule Apache::DBI
    PerlModule Compress::Zlib
    PerlModule XML::Simple

    # Ocs plugins
    PerlModule Apache::Ocsinventory::Plugins::Apache
    PerlModule Apache::Ocsinventory::Plugins

    # Ocs
    PerlModule Apache::Ocsinventory
    PerlModule Apache::Ocsinventory::Server::Constants
    PerlModule Apache::Ocsinventory::Server::System
    PerlModule Apache::Ocsinventory::Server::Communication
    PerlModule Apache::Ocsinventory::Server::Inventory
    PerlModule Apache::Ocsinventory::Server::Duplicate

    # Capacities
    PerlModule Apache::Ocsinventory::Server::Capacities::Registry
    PerlModule Apache::Ocsinventory::Server::Capacities::Update
    PerlModule Apache::Ocsinventory::Server::Capacities::Ipdiscover
    PerlModule Apache::Ocsinventory::Server::Capacities::Download
    PerlModule Apache::Ocsinventory::Server::Capacities::Notify
    PerlModule Apache::Ocsinventory::Server::Capacities::Snmp
    # This module guides you through the module creation
    # PerlModule Apache::Ocsinventory::Server::Capacities::Example
    # This module adds some rules to filter some request sent to ocs server in the prolog and inventory stages
    # PerlModule Apache::Ocsinventory::Server::Capacities::Filter
    # This module add availibity to filter data from HARDWARE section (data filtered won’t be stored in database)
    # PerlModule Apache::Ocsinventory::Server::Capacities::Datafilter

    # PerlTaintCheck On

    # SSL apache settings
    #SSLEngine “SSL_ENABLE”
    #SSLCertificateFile “SSL_CERTIFICATE_FILE”
    #SSLCertificateKeyFile “SSL_CERTIFICATE_KEY_FILE”
    #SSLCACertificateFile “SSL_CERTIFICATE_FILE”
    #SSLCACertificatePath “SSL_CERTIFICATE_PATH”
    #SSLVerifyClient “SSL_VALIDATE_CLIENT”

    # Engine apache settings
    # “Virtual” directory for handling OCS Inventory NG agents communications
    # Be careful, do not create such directory into your web server root document !

    # Apache 2.4
    Require all granted

    # Apache 2.2
    order deny,allow
    allow from all

    # If you protect this area you have to deal with http_auth_* agent’s parameters
    # AuthType Basic
    # AuthName “OCS Inventory agent area”
    # AuthUserFile “APACHE_AUTH_USER_FILE”
    # require valid-user
    SetHandler perl-script
    PerlHandler Apache::Ocsinventory

    #Web Service for plugin engine

    # Apache 2.4
    Require local

    # Apache 2.2
    order deny,allow
    allow from 127.0.0.1

    SetHandler perl-script
    PerlHandler Apache::Ocsinventory::Plugins::Apache

    # Web service apache settings
    PerlModule Apache::Ocsinventory::SOAP

    SetHandler perl-script
    PerlHandler “Apache::Ocsinventory::SOAP”

    # By default, you can query web service from everywhere with a valid user

    # Apache 2.4
    Require all granted

    Order deny,allow
    Allow from all

    AuthType Basic
    AuthName “OCS Inventory SOAP Area”
    # Use htpasswd to create/update soap-user (or another granted user)
    AuthUserFile “APACHE_AUTH_USER_FILE”

    # Apache 2.4
    Require user “SOAP_USER”

    require “SOAP_USER”

    ******** End updated ocsinventory-server.conf.local ***********
    Removing old communication server configuration to file /etc/apache2/sites-enabled*/ocsinventory.conf
    Writing communication server configuration to file /etc/apache2/sites-enabled*/z-ocsinventory-server.conf
    cp: cannot create regular file ‘/etc/apache2/sites-enabled*/z-ocsinventory-server.conf’: No such file or directory

    • Miłosz Engel October 22, 2016 at 00:27 - Reply

      Seemns that setup script didn’t found apache2 conf dir. You should enter a valid path when script asks for apache conf dir at the beginning and run it with root privileges. Did you?

    • Miłosz Engel October 22, 2016 at 00:27 - Reply

      Also, thanks for checking max comment size:)

  18. David COLLANGE October 19, 2016 at 13:36 - Reply

    Starting OCS Inventory NG Management server setup on 2016-10-06-11-16-03
    from folder /tmp/OCSNG_UNIX_SERVER-2.2
    Storing log in file /tmp/OCSNG_UNIX_SERVER-2.2/ocs_server_setup.log

    ============================================================
    Checking OCS Inventory NG Management Server requirements…
    ============================================================
    Checking for database server properties
    MySQL client distribution version 5.5.
    Computer seems to be running MySQL 4.1 or higher
    Database server is running on host localhost
    Database server is running on port 3306
    Checking for Apache web server daemon
    Found Apache daemon /usr/sbin/apache2
    Using Apache daemon /usr/sbin/apache2
    Checking for Apache main configuration file
    Found Apache HTTPD_ROOT
    Found Apache SERVER_CONFIG_FILE
    Found Apache main configuration file
    Using Apache main configuration file /etc/apache2/apache2.conf*
    Checking for Apache user account
    Found Apache user account www-data
    Using Apache user account www-data
    Checking for Apache group
    Found Apache user group www-data
    Using Apache user group www-data
    Checking for Apache Include configuration directory
    Found Apache Include configuration directory
    Using Apache Include configuration directory /etc/apache2/sites-enabled*
    Checking for PERL Interpreter
    Found PERL Intrepreter at
    Using PERL Intrepreter /usr/bin/perl

    ============================================================
    Installing Communication server
    ============================================================
    Checking for Make utility
    Make utility found at
    Checking for Apache mod_perl version 1.99_22 or higher
    mod_perl 1.99_22 or higher is available
    Using mod_perl version 1.99_22 or higher
    Checking for Communication server log directory
    Using /var/log/ocsinventory-server as Communication server log directory
    Checking for Communication server plugins configuration directory
    Using /etc/ocsinventory-server/plugins as Communication server plugins configuration directory
    Checking for Communication server perl directory
    Using /etc/ocsinventory-server/perl as Communication server plugins perl directory
    Entering Apache sub directory
    Checking for DBI PERL module
    PERL module DBI is available
    Checking for Apache::DBI PERL module
    PERL module Apache::DBI is available
    Checking for DBD::mysql PERL module
    PERL module DBD::mysql is available
    Checking for Compress::Zlib PERL module
    PERL module Compress::Zlib is available
    Checking for XML::Simple PERL module
    PERL module XML::Simple is available
    Checking for Net::IP PERL module
    PERL module Net::IP is available
    Checking for SOAP::Lite Perl module
    PERL module SOAP::Lite is available
    Checking for Archive::Zip Perl module
    PERL module Archive::Zip is available
    Checking for Apache2::SOAP PERL module
    Can’t locate Apache2/SOAP.pm in @INC (you may need to install the Apache2::SOAP module) (@INC contains: /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/i386-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/i386-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .).
    BEGIN failed–compilation aborted.
    User choose to continue setup without PERL module SOAP::Apache2
    Checking for XML::Entities PERL module
    PERL module XML::Entities is available
    Configuring Communication server (perl Makefile.PL)
    Preparing Communication server Perl modules (make)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Snmp/Inventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Registry.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Plugins.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Database.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/SOAP.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Updates.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Plugins/Modules.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/History.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Ipdiscover.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Snmp.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Snmp/Data.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Example.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Datafilter.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Snmp.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Download.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Config.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Download/Inventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Notify.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Extensions.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Inventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Plugins/Apache.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Map.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Filter.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Update.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Interface/Internals.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Capacities/Ipdiscover.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Constants.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Data.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Update/AccountInfos.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Modperl2.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Export.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/System/Config.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Groups.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Communication/Session.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Update/Hardware.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Cache.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Filter.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Capacities.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Communication.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory/Update.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Useragent.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/System.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Modperl1.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Duplicate.pm (unchanged)
    Skip blib/lib/Apache/Ocsinventory/Server/Inventory.pm (unchanged)
    Installing Communication server Perl modules (make install)
    Appending installation info to /usr/local/lib/i386-linux-gnu/perl/5.20.2/perllocal.pod
    Creating Communication server log directory /var/log/ocsinventory-server
    Fixing Communication server log directory permissions
    Configuring logrotate (ed logrotate.ocsinventory-NG)
    ******** Begin updated logrotate.ocsinventory-server.local ***********
    # Rotate OCS Inventory NG Communication server logs daily
    # Save 7 days old logs in compressed mode
    /var/log/ocsinventory-server/*.log {
    daily
    rotate 7
    compress
    missingok
    }
    ******** End updated logrotate.COM_SERVER_LOGROTATE_CONF_FILE.local ***********
    Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG
    Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-server
    Creating Communication server plugins configuration directory /etc/ocsinventory-server/plugins
    Creating Communication server plugins Perl directory /etc/ocsinventory-server/perl
    OK, using ‘z-ocsinventory-server.conf’ as Communication Server Apache configuration file
    Configuring Apache web server (file ocsinventory-server.conf)
    ******** Begin updated ocsinventory-server.conf.local ***********
    ################################################################################
    #
    # OCS Inventory NG Communication Server Perl Module Setup
    #
    # Copyleft 2006 Pascal DANEK
    # Web: http://www.ocsinventory-ng.org
    #
    # This code is open source and may be copied and modified as long as the source
    # code is always made freely available.
    # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
    ################################################################################

    # Which version of mod_perl we are using
    # For mod_perl 1.999_21, replace 2 by 2
    PerlSetEnv OCS_MODPERL_VERSION 2

    # Master Database settings
    # Replace localhost by hostname or ip of MySQL server for WRITE
    PerlSetEnv OCS_DB_HOST localhost
    # Replace 3306 by port where running MySQL server, generally 3306
    PerlSetEnv OCS_DB_PORT 3306
    # Name of database
    PerlSetEnv OCS_DB_NAME ocsweb
    PerlSetEnv OCS_DB_LOCAL ocsweb
    # User allowed to connect to database
    PerlSetEnv OCS_DB_USER ocs
    # Password for user
    PerlSetVar OCS_DB_PWD ocs

    # Slave Database settings
    # Replace localhost by hostname or ip of MySQL server for READ
    # Useful if you handle mysql slave databases
    # PerlSetEnv OCS_DB_SL_HOST localhost
    # Replace 3306 by port where running MySQL server, generally 3306
    # PerlSetEnv OCS_DB_SL_PORT_SLAVE 3306
    # User allowed to connect to database
    # PerlSetEnv OCS_DB_SL_USER ocs
    # Name of the database
    # PerlSetEnv OCS_DB_SL_NAME ocsweb
    # Password for user
    # PerlSetVar OCS_DB_SL_PWD ocs

    # Path to log directory (must be writeable)
    PerlSetEnv OCS_OPT_LOGPATH “/var/log/ocsinventory-server”

    # If you need to specify a mysql socket that the client’s built-in
    #PerlSetEnv OCS_OPT_DBI_MYSQL_SOCKET “path/to/mysql/unix/socket”
    # DBI verbosity
    PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 0

    # Unicode support
    PerlSetEnv OCS_OPT_UNICODE_SUPPORT 1

    # If you are using a multi server architecture,
    # Put the ip addresses of the slaves on the master
    # (This is read as perl regular expressions)
    PerlAddVar OCS_OPT_TRUSTED_IP 127.0.0.1
    #PerlAddVar OCS_OPT_TRUSTED_IP XXX.XXX.XXX.XXX

    # ===== WEB SERVICE (SOAP) SETTINGS =====

    PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 0
    PerlSetEnv OCS_OPT_WEB_SERVICE_RESULTS_LIMIT 100
    # PerlSetEnv OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF “WEBSERV_PRIV_MOD_CONF_FILE”

    # Be careful: you must restart apache to make settings taking effects

    # Configure engine to use the settings from this file
    PerlSetEnv OCS_OPT_OPTIONS_NOT_OVERLOADED 0

    # Try to use other compress algorithm than raw zlib
    # GUNZIP and clear XML are supported
    PerlSetEnv OCS_OPT_COMPRESS_TRY_OTHERS 1

    ##############################################################
    # ===== OPTIONS BELOW ARE OVERLOADED IF YOU USE OCS GUI =====#
    ##############################################################

    # NOTE: IF YOU WANT TO USE THIS CONFIG FILE INSTEAD, set OCS_OPT_OPTIONS_NOT_OVERLOADED to ‘1’

    # ===== MAIN SETTINGS =====

    # Enable engine logs (see LOGPATH setting)
    PerlSetEnv OCS_OPT_LOGLEVEL 0
    # Specify agent’s prolog frequency
    PerlSetEnv OCS_OPT_PROLOG_FREQ 12
    # Configure the duplicates detection system
    PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 15
    # Futur security improvements
    PerlSetEnv OCS_OPT_SECURITY_LEVEL 0
    # Validity of a computer’s lock
    PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 600
    # Enable the history tracking system (useful for external data synchronisation
    PerlSetEnv OCS_OPT_TRACE_DELETED 0

    # ===== INVENTORY SETTINGS =====

    # Specify the validity of inventory data
    PerlSetEnv OCS_OPT_FREQUENCY 0
    # Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load)
    PerlSetEnv OCS_OPT_INVENTORY_DIFF 1
    # Make engine consider an inventory as a transaction (lower concurency, better disk usage)
    PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1
    # Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load
    PerlSetEnv OCS_OPT_INVENTORY_WRITE_DIFF 1
    # Enable some stuff to improve DB queries, especially for GUI multicriteria searching system
    PerlSetEnv OCS_OPT_INVENTORY_CACHE_ENABLED 1
    # Specify when the engine will clean the inventory cache structures
    PerlSetEnv OCS_OPT_INVENTORY_CACHE_REVALIDATE 7
    # Enable you to keep trace of every elements encountered in db life
    PerlSetEnv OCS_OPT_INVENTORY_CACHE_KEEP 1

    # ===== SOFTWARES DEPLOYMENT SETTINGS =====

    # Enable this feature
    PerlSetEnv OCS_OPT_DOWNLOAD 0
    # Package which have a priority superior than this value will not be downloaded
    PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LENGTH 10
    # Time between two download cycles (bandwidth control)
    PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 60
    # Time between two fragment downloads (bandwidth control)
    PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 60
    # Specify if you want to track packages affected to a group on computer’s level
    PerlSetEnv OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS 1
    # Time between two download periods (bandwidth control)
    PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 60
    # Agents will send ERR_TIMEOUT event and clean the package it is older than this setting
    PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 7
    # Agents will send an error event and clean the package if package command does not respond during this setting
    PerlSetEnv OCS_OPT_DOWNLOAD_EXECUTION_TIMEOUT 120

    # Enable ocs engine to deliver agent’s files (deprecated)
    PerlSetEnv OCS_OPT_DEPLOY 0
    # Enable the softwares deployment capacity (bandwidth control)

    # ===== GROUPS SETTINGS =====

    # Enable the computer\s groups feature
    PerlSetEnv OCS_OPT_ENABLE_GROUPS 1
    # Random number computed in the defined range. Designed to avoid computing many groups in the same process
    PerlSetEnv OCS_OPT_GROUPS_CACHE_OFFSET 43200
    # Specify the validity of computer’s groups (default: compute it once a day – see offset)
    PerlSetEnv OCS_OPT_GROUPS_CACHE_REVALIDATE 43200

    # ===== IPDISCOVER SETTINGS =====

    # Specify how much agent per LAN will discovered connected peripherals (0 to disable)
    PerlSetEnv OCS_OPT_IPDISCOVER 2
    # Specify the minimal difference to replace an ipdiscover agent
    PerlSetEnv OCS_OPT_IPDISCOVER_BETTER_THRESHOLD 1
    # Time between 2 arp requests (mini: 10 ms)
    PerlSetEnv OCS_OPT_IPDISCOVER_LATENCY 100
    # Specify when to remove a computer when it has not come until this period
    PerlSetEnv OCS_OPT_IPDISCOVER_MAX_ALIVE 14
    # Disable the time before a first election (not recommended)
    PerlSetEnv OCS_OPT_IPDISCOVER_NO_POSTPONE 0
    # Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents)
    PerlSetEnv OCS_OPT_IPDISCOVER_USE_GROUPS 1

    # ===== INVENTORY FILES MAPPING SETTINGS =====

    # Use with ocsinventory-injector, enable the multi entities feature
    PerlSetEnv OCS_OPT_GENERATE_OCS_FILES 0
    # Generate either compressed file or clear XML text
    PerlSetEnv OCS_OPT_OCS_FILES_FORMAT OCS
    # Specify if you want to keep trace of all inventory between to synchronisation with the higher level server
    PerlSetEnv OCS_OPT_OCS_FILES_OVERWRITE 0
    # Path to ocs files directory (must be writeable)
    PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp

    # ===== FILTER SETTINGS =====

    # Enable prolog filter stack
    PerlSetEnv OCS_OPT_PROLOG_FILTER_ON 0
    # Enable core filter system to modify some things “on the fly”
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_ENABLED 0
    # Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP 0
    # Period definition for INVENTORY_FILTER_FLOOD_IP
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 300
    # Enable inventory filter stack
    PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON 0

    # ===== DATA FILTER =====

    #Enable the dat filtering capacity
    PerlSetEnv OCS_OPT_DATA_FILTER 0

    # Set the table names and the field associated you want to filter
    #PerlAddVar OCS_OPT_DATA_TO_FILTER HARDWARE
    #PerlAddVar OCS_OPT_DATA_TO_FILTER USERID

    # ===== REGISTRY SETTINGS =====

    # Enable the registry capacity
    PerlSetEnv OCS_OPT_REGISTRY 1

    # ===== SNMP SETTINGS =====

    # Enable the SNMP capacity
    PerlSetEnv OCS_OPT_SNMP 0
    # Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load)
    PerlSetEnv OCS_OPT_SNMP_INVENTORY_DIFF 1
    # Display error message about agent https communication in logfile
    PerlSetEnv OCS_OPT_SNMP_PRINT_HTTPS_ERROR 1

    # ===== SESSION SETTINGS =====
    # Not yet in GUI

    # Validity of a session (prolog=>postinventory)
    PerlSetEnv OCS_OPT_SESSION_VALIDITY_TIME 600
    # Consider a session obsolete if it is older thant this value
    PerlSetEnv OCS_OPT_SESSION_CLEAN_TIME 86400
    # Accept an inventory only if required by server
    #( Refuse “forced” inventory)
    PerlSetEnv OCS_OPT_INVENTORY_SESSION_ONLY 0

    # ===== TAG =====

    # The default behavior of the server is to ignore TAG changes from the
    # agent.
    PerlSetEnv OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT 0

    # ===== EXTERNAL USERAGENTS =====

    #Path for external useragents reference file
    #!! WARNING !! : external agents may not be supported by OCS NG Community !
    #PerlSetEnv OCS_OPT_EXT_USERAGENTS_FILE_PATH /tmp/yourfile.txt

    # ===== PLUGINS =====

    PerlSetEnv OCS_PLUGINS_PERL_DIR “/etc/ocsinventory-server/perl”
    PerlSetEnv OCS_PLUGINS_CONF_DIR “/etc/ocsinventory-server/plugins”

    # ===== DEPRECATED =====

    # Set the proxy cache validity in http headers when sending a file
    PerlSetEnv OCS_OPT_PROXY_REVALIDATE_DELAY 3600
    # Deprecated
    PerlSetEnv OCS_OPT_UPDATE 0

    ############ DO NOT MODIFY BELOW ! #######################

    # External modules
    PerlModule Apache::DBI
    PerlModule Compress::Zlib
    PerlModule XML::Simple

    # Ocs plugins
    PerlModule Apache::Ocsinventory::Plugins::Apache
    PerlModule Apache::Ocsinventory::Plugins

    # Ocs
    PerlModule Apache::Ocsinventory
    PerlModule Apache::Ocsinventory::Server::Constants
    PerlModule Apache::Ocsinventory::Server::System
    PerlModule Apache::Ocsinventory::Server::Communication
    PerlModule Apache::Ocsinventory::Server::Inventory
    PerlModule Apache::Ocsinventory::Server::Duplicate

    # Capacities
    PerlModule Apache::Ocsinventory::Server::Capacities::Registry
    PerlModule Apache::Ocsinventory::Server::Capacities::Update
    PerlModule Apache::Ocsinventory::Server::Capacities::Ipdiscover
    PerlModule Apache::Ocsinventory::Server::Capacities::Download
    PerlModule Apache::Ocsinventory::Server::Capacities::Notify
    PerlModule Apache::Ocsinventory::Server::Capacities::Snmp
    # This module guides you through the module creation
    # PerlModule Apache::Ocsinventory::Server::Capacities::Example
    # This module adds some rules to filter some request sent to ocs server in the prolog and inventory stages
    # PerlModule Apache::Ocsinventory::Server::Capacities::Filter
    # This module add availibity to filter data from HARDWARE section (data filtered won’t be stored in database)
    # PerlModule Apache::Ocsinventory::Server::Capacities::Datafilter

    # PerlTaintCheck On

    # SSL apache settings
    #SSLEngine “SSL_ENABLE”
    #SSLCertificateFile “SSL_CERTIFICATE_FILE”
    #SSLCertificateKeyFile “SSL_CERTIFICATE_KEY_FILE”
    #SSLCACertificateFile “SSL_CERTIFICATE_FILE”
    #SSLCACertificatePath “SSL_CERTIFICATE_PATH”
    #SSLVerifyClient “SSL_VALIDATE_CLIENT”

    # Engine apache settings
    # “Virtual” directory for handling OCS Inventory NG agents communications
    # Be careful, do not create such directory into your web server root document !

    # Apache 2.4
    Require all granted

    # Apache 2.2
    order deny,allow
    allow from all

    # If you protect this area you have to deal with http_auth_* agent’s parameters
    # AuthType Basic
    # AuthName “OCS Inventory agent area”
    # AuthUserFile “APACHE_AUTH_USER_FILE”
    # require valid-user
    SetHandler perl-script
    PerlHandler Apache::Ocsinventory

    #Web Service for plugin engine

    # Apache 2.4
    Require local

    # Apache 2.2
    order deny,allow
    allow from 127.0.0.1

    SetHandler perl-script
    PerlHandler Apache::Ocsinventory::Plugins::Apache

    # Web service apache settings
    PerlModule Apache::Ocsinventory::SOAP

    SetHandler perl-script
    PerlHandler “Apache::Ocsinventory::SOAP”

    # By default, you can query web service from everywhere with a valid user

    # Apache 2.4
    Require all granted

    Order deny,allow
    Allow from all

    AuthType Basic
    AuthName “OCS Inventory SOAP Area”
    # Use htpasswd to create/update soap-user (or another granted user)
    AuthUserFile “APACHE_AUTH_USER_FILE”

    # Apache 2.4
    Require user “SOAP_USER”

    require “SOAP_USER”

    ******** End updated ocsinventory-server.conf.local ***********
    Removing old communication server configuration to file /etc/apache2/sites-enabled*/ocsinventory.conf
    Writing communication server configuration to file /etc/apache2/sites-enabled*/z-ocsinventory-server.conf
    cp: cannot create regular file ‘/etc/apache2/sites-enabled*/z-ocsinventory-server.conf’: No such file or directory

  19. David COLLANGE October 19, 2016 at 13:37 - Reply

    Thank you to help me, It’s close to chinese for me… 😀

  20. Riccardo October 27, 2016 at 16:18 - Reply

    thank you for this wonderful guide. I was wondering when do you plan to add the “how to” to enable SSL on the last OCS InVentory 2.2.1. That would be also very helpful.

    Thank you anyway for the help.

    • Miłosz Engel October 27, 2016 at 17:22 - Reply

      I wish I knew that! Hopefully soon but looking at my current activities this might take a while. Lot of changes right know but I will not abandon this blog, that’s for sure!

  21. Adrien December 13, 2016 at 13:21 - Reply

    Thx for this perfect How To !

  22. Yann March 27, 2017 at 16:46 - Reply

    Hi ! Thank you for your how-to, it was really helpful for me !
    But, it’s me or there is an issue with the text, now ?

    • Miłosz Engel March 27, 2017 at 22:13 - Reply

      Hey Yann, thanks for the feedback. In fact, body of the post was broken. Thanks for pointing this out. It should be fixed by now.

  23. Ricardo September 29, 2017 at 19:30 - Reply

    Hi… I am a newbie system admin. I installed ocsinventory server on a centos environment, however I got the forbidden permission error, I tried to change folder permissions, directory permission on apache but nothing seems to work.

    • Miłosz Engel October 3, 2017 at 22:15 - Reply

      Hi, never tried that on centos but please attach some logs, send some more details what are trying to achieve and what url causes the error. Without details, it’s hard to tell

  24. Carlos December 13, 2017 at 22:43 - Reply

    Hello, I have an issue with administrative data.

    When I use administrative data – blob file this only show me “btn” word, it’s kind ocsreports can’t call some function o some module.

    Can you help me please.

    Thanks

  25. Xavier March 29, 2018 at 19:43 - Reply

    Muy agradecido, lo habia hecho hace 5 años y actualmente 2 intentos fallidos hasta que llegué aquí. gracias!!!

    • Miłosz Engel March 29, 2018 at 20:48 - Reply

      I guess, glad it worked for you will be most appropriate 🙂
      Thanks for feedback!

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.