How to Install OCS Inventory NG on Windows 10

OCS Inventory NG is an open-source computer inventory and asset management system that helps system administrators to track, report, and manage IT resources. In this tutorial, we will go through the step-by-step process of how to install OCS Inventory NG on Windows 10.

Prerequisites

Before beginning the installation, ensure that you have the following prerequisites:

  • Windows 10 Operating System
  • Web server (such as Apache or IIS)
  • PHP (version 5.6.40 or higher)
  • MySQL/MariaDB (version 5.5 or higher)

Step 1: Download OCS Inventory NG

Firstly, visit the official OCS Inventory NG website at https://ocsinventory-ng.org/en/download/ to download the latest version of the software.

Once downloaded, extract the ZIP file to a directory of your choice.

Step 2: Install and Configure Apache

OCS Inventory NG requires a webserver to function. You can use either Apache or IIS. In this tutorial, we will use Apache.

  • Download the latest version of the Apache HTTP Server from https://httpd.apache.org/download.cgi
  • Run the installer and choose the components you want to install. For example, the 'Apache Web Server' and 'PHP'. (If you have already installed PHP and Apache, skip this step.)
  • Follow the instructions on the screen to complete the installation.

Once the installation is complete, you need to configure Apache to run as a service.

  • Open a command prompt as Administrator.
  • Change the directory to Apache’s “bin” folder. For example, cd C:\Program Files (x86)\Apache24\bin
  • Enter the following command to install the Apache service: httpd -k install -n "Apache24"
  • Open the config file C:\Program Files (x86)\Apache24\conf\httpd.conf, uncomment the line LoadModule ssl_module modules/mod_ssl.so to enable SSL support, and save the file.
  • Restart the Apache service by running the command httpd -k restart in the command prompt.

Step 3: Install MySQL/MariaDB

  • Download the latest version of MySQL or MariaDB.
  • Run the installer and choose the components you want to install.
  • Follow the instructions on the screen to complete the installation.

Step 4: Install PHP

  • Download the latest version of PHP from https://windows.php.net/download/

  • Extract the ZIP file to a directory of your choice.

  • Copy the php.ini-development file to php.ini.

  • Open the php.ini file in a text editor and make the following changes:

    • Set error_reporting to E_ALL.
    • Set extension_dir to the path of the PHP extensions directory. For example, extension_dir = "C:\php\ext".
    • Uncomment and set date.timezone to your local timezone. For example, date.timezone = America/New_York.
    • Save the file.
  • Restart the Apache service by running the command httpd -k restart in the command prompt.

Step 5: Create a MySQL/MariaDB Database

  • Open your MySQL/MariaDB database management tool.
  • Create a new database for OCS Inventory NG. For example, ocsdb.
  • Create a new user account for OCS Inventory NG. For example, ocsuser.
  • Assign the user account full privileges on the ocsdb database.

Step 6: Configure OCS Inventory NG

  • Navigate to the directory where you extracted OCS Inventory NG.

  • Edit the ocsinventory-server.conf file in a text editor.

  • Set the following parameters:

    • dbuser - Set to the username of the MySQL/MariaDB database user account you created.
    • dbpass - Set to the password of the MySQL/MariaDB database user account you created.
    • dbhost - Set to the hostname of the MySQL/MariaDB database server. For example, localhost.
    • dbname - Set to the name of the MySQL/MariaDB database you created for OCS Inventory NG. For example, ocsdb.
  • Save the ocsinventory-server.conf file.

Step 7: Install OCS Inventory NG

  • Run the executable file setup.exe in the directory where you extracted OCS Inventory NG.
  • Follow the instructions on the screen to complete the installation.
  • Open a web browser and navigate to http://localhost/ocsreports/.
  • Log in to the OCS Inventory NG web interface with the default credentials (admin and admin).
  • Change the default admin password for security reasons.

Congratulations! You have successfully installed OCS Inventory NG on Windows 10. You can continue to configure and customize OCS Inventory NG according to your requirements.