How to Install OCS Inventory NG on macOS
Introduction
OCS Inventory NG is an open-source inventory and package deployment system. It allows you to collect information about hardware and software assets of your networked computers and deploy packages through a web-based interface. In this tutorial, we will guide you on how to install OCS Inventory NG on macOS.
Prerequisites
- macOS installed and running
- Command Line Tools installed
- Homebrew package manager installed
Step 1 - Install Apache and PHP
First, we need to install Apache and PHP. We'll use Homebrew to install them. Open the Terminal app and run the following commands:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install httpd php
Step 2 - Start Apache and PHP
Once Apache and PHP are installed, we need to start them. Run the following commands in the Terminal app:
sudo apachectl start
sudo brew services start php
Step 3 - Install OCS Inventory Server
Download the latest version of OCS Inventory Server from https://ocsinventory-ng.org/. Then run the following commands in the Terminal app:
tar -xvzf OCSNG_UNIX_SERVER-x.x.x.tar.gz
cd OCSNG_UNIX_SERVER-x.x.x
sudo ./setup.sh
Follow the prompts during the installation process.
Step 4 - Configure OCS Inventory Server
Once OCS Inventory Server is installed, we need to configure it. Open the ocsinventory-reports file using a text editor:
sudo nano /usr/local/apache2/htdocs/ocsreports/dbconfig.inc.php
Change the following lines with your database information:
define('DB_NAME', 'ocsweb');
define('SERVER_READ', 'localhost');
define('SERVER_WRITE', 'localhost');
define('COMPTE_BASE', '');
define('PSWD_BASE', '');
Save and exit the file.
Step 5 - Install OCS Inventory Agent
Now we need to install the OCS Inventory Agent on the computer we want to inventory. Download the latest version of the Agent from https://ocsinventory-ng.org/. Then run the following command in the Terminal app:
sudo installer -pkg OCSNG_AGENT-x.x.x.pkg -target /
Step 6 - Add the Computer in OCS Inventory Console
Open a web browser and go to http://localhost/ocsreports/. Login with the default username and password admin/admin. Then click on Add and fill in the computer information. Click on Save to add the computer to the inventory list.
Conclusion
You have successfully installed OCS Inventory NG on your macOS and added a computer to the inventory list. Now you can collect information about hardware and software assets of your networked computers and deploy packages through the web-based interface.