Install OCS Inventory NG server and configure

Ok, now, when we have environment ready, we can download and install OCS Inventory NG Server. Since we have all set up, installation will be pretty straight forward and will end up pressing the ENTER key all the way till the end:)

  1. Download, unzip and enter ocs directory:
    cd /tmp
    wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.5/OCSNG_UNIX_SERVER_2.5.tar.gz
    tar -zxf OCSNG_UNIX_SERVER_2.5.tar.gz
    cd OCSNG_UNIX_SERVER_2.5
    
  2. Start the setup and keep pressing ENTER all the way till the end:
    sh setup.sh
  3. Setup OCS Inventory NG Apache configs,permissions and restart Apache:
    ln -s /etc/apache2/conf-available/ocsinventory-reports.conf /etc/apache2/conf-enabled/ocsinventory-reports.conf
    ln -s /etc/apache2/conf-available/z-ocsinventory-server.conf /etc/apache2/conf-enabled/z-ocsinventory-server.conf
    
    chown www-data:www-data -R /var/lib/ocsinventory-reports
    
    service apache2 restart

    That was easy, wasn’t it?

  4. Open web browser and navigate to http://your_OCS_Server_IP_or_Name/ocsreports
  5. Configure as follows:
    • ocsuser
    • NEW_DB_PASSWORD
    • ocsweb
    • localhost

    Just like below:

    Then perform the update:

  6. Once done:

    You can login to the console using admin / admin credentials:
  7. First page should look like:
  8. Now, back to the console and type below command to remove install.php file to disable above warning:
    rm /usr/share/ocsinventory-reports/ocsreports/install.php
  9. Edit the OCS config to update DB Credentials:
    nano /etc/apache2/conf-enabled/z-ocsinventory-server.conf

    and change the following lines to reflect DB config and restart apache service:

    # User allowed to connect to database
    PerlSetEnv OCS_DB_USER ocsuser
    # Password for user
    PerlSetVar OCS_DB_PWD NEW_DB_PASSWORD
    
    //restart the apache service
    service apache2 restart
    

DONE!
Now, we can proceed with enabling SSL and securing OCS communication.