Howtos:Upgrade OCS from 1.3.3 to 2.0.x

From OCS Inventory NG
Jump to: navigation, search

Path for upgrading OCS NG 1.3.3 to 2.0.x

Note: This document explains how to update OCS Inventory NG Server under Windows without setting up XAMPP, but using existing Apache and MySQL installation.

Components to download

Download and unpack the following packages (don’t forget to backup and delete old content before) :

OCS Inventory NG Server for Linux in folder <<OCS_FOLDER>> (preferred C:\Program Files\OCS Inventory NG)

In this document, extract folder for files will be named <<InstallFolder>>

Updating OCS Inventory NG Server

Updating Communication Server PERL module

Open a command prompt in folder :


Read file INSTALL and then run the following commands :

perl MakeFile.PL
nmake install
Upgrade windows serv 1.jpg

Updating Apache configuration file (httpd.conf)

Copy and replace file <<InstallFolder>/<<OCS_FOLDER>>/etc/ocsinventory-server.conf into conf\extra Apache’s folder (make a backup of this file before).

Edit this file and modify parameters shown in red below to match your need (you can take them from the old ocsinventory-server.conf) :

# Which version of mod_perl we are using
# For mod_perl <= 1.999_21, replace VERSION_MP by 1
# For mod_perl > 1.999_21, replace VERSION_MP by 2
# Master Database settings
# Replace DATABASE_SERVER by hostname or ip of MySQL server for WRITE
PerlSetEnv OCS_DB_HOST localhost
# Replace DATABASE_PORT 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
# Path to log directory (must be writeable)
PerlSetEnv OCS_OPT_LOGPATH "C:/Program Files/Apache Software Foundation/Apache2.2/logs/"	#update path if needed

If needed (conf name file changed …) edit file httpd.conf and add or update the following line :

Include C:\AppServ\Apache2\conf\extra\ocsinventory-server.conf (update path if needed)

Then restart Apache service.

Updating Administration console and database

Updating Administration console

Delete the old content in folder ocsreports' in the document root directory of your Apache web server (don’t forget to backup old content before).

Copy folder <<InstallFolder>>/<<OCS_FOLDER>>/ocsreports to the document root directory of your Apache web server.

Copy old file from your previous version backup into your ocsreports directory.

Updating database and configuration

Open URL '''http://<<web_server>>/ocsreports/install.php''' to run OCS Inventory NG setup process.

Then, update if asked file PHP_DIR\php.ini (openssl, file size and restart Apache service).

Look for :

  • post_max_size = 8M replace by post_max_size = 64M
  • upload_max_filesize = 2M replace by upload_max_filesize = 64M

Follow instructions to update database and insert initial configuration into database.

When process is done, you must do manually some steps :

  • Be careful, your default admin account’s password will be reset to admin, you must change it just after your first login.
Upgrade windows serv 2.jpg
  • Update your old accountinfo (on web gui, clic on "update old accountinfo")
Upgrade windows serv 3.jpg
Upgrade windows serv 4.jpg
Upgrade windows serv 5.jpg

Upload Agent

In the update process, the upload agent ocsagent.exe is deleted, you must re-upload it. New path for uploading agent :

Upgrade windows serv 6.jpg

Written by Thierry BARRAU (