OCS Inventory Tools
Maintainer
Sylvain Gomez
mailto:sylvaingomez@free.fr
Special thanks to Rémi Collet who provided a working OCS Unified Agent Linux (and so much more!)
Inventory tools for SME 7.x
OCS Inventory NG Description
Open Computer and Software Inventory Next Generation is an application designed to help a network or system administrator keep track of the computer configuration and software installed on the network.
Used with a IT and Asset Management Software such as open source tool GLPI, you will have a powerful inventory and asset management software with automatic updates of computer configuration, license management, help desk and more.
It also allows deploying packages on Windows and Linux computers.
For more information see http://www.ocsinventory-ng.org/.
GLPI Description
GLPI is the Information Resource-Manager with an additional Administration- Interface. You can use it to build up a database with an inventory for your company (computer, software, printers...). It has enhanced functions to make the daily life for the administrators easier, like a job-tracking-system with mail-notification and methods to build a database with basic information about your network-topology.
For more information see http://www.glpi-project.org/.
Server Installation
Download
You can download this rpm package smeserver-inventory-tools. You will also need a few dependencies, combined into ocs_perl_deps.tar.gz If you want to save it directly on your SME Server, you can give these commands at the prompt:
wget http://mirror.contribs.org/smeserver/contribs/sgomez/contribs/inventory/dependencies/ocs_perl_deps.tar.gz wget http://mirror.contribs.org/smeserver/contribs/sgomez/contribs/inventory/smeserver-inventory-tools-1-1.i386.rpm
Install
First, you need to install the dependencies.
According to your SME Server version, you may also need to install mod_perl
yum install mod_perl
Other Perl dependencies have been packaged in one file for easy downloading. Simply uncompress the tarball and install RPMs using yum:
tar -xzf ./ocs_perl_deps.tar.gz yum localinstall ./ocs_perl_deps/*.rpm
Finally, you can install OCS Reports and GLPI with the following command:
yum localinstall smeserver-inventory-tools-1-1.i386.rpm
You can ignore the yum-comments signal event post-upgrade and signal-event reboot.
Update
Update from old RPMs (smeserver-ocs_inventory_ng and smeserver-glpi) is not possible.
You must uninstall both RPMs first!
If you want to keep your data, you need to uninstall old versions with following commnands:
rpm -e smeserver-glpi --noscripts rpm -e smeserver-ocs_inventory_ng --noscripts
There are 3 new dependencies, so you need to install them. These RPMs can be found in the above Tarball.
tar -xzf ./ocs_perl_deps.tar.gz yum localinstall ./ocs_perl_deps/*remi*.rpm
And then install the new version with
yum localinstall smeserver-inventory-tools-1-1.i386.rpm
Uninstallation
To uninstall OCS Reports and GLPI, just hit the following command:
yum remove smeserver-inventory-tools
You can ignore the yum-comments signal event post-upgrade and signal-event reboot.
To completly remove OCS Reports and GLPI (installation files ; MySQL user+database ; OCS Agent) you will need the following command:
sh /root/OCS_GLPI-Full-Uninstall.sh
You should also uninstall all dependencies if you don't need them anymore...
Client Installation
The client side is available on all platforms. Download the latest client version according to your OS.
After installing the Agent, you should launch it manually to upload your first inventory (as it's updated once per day by default)
OCS Agent for SME Server
The client-side of OCS will already be installed if you install smeserver-inventory-tools.
You should see an inventory of your SME Server in OCS web interface after the RPM install.
If you want to inventory other SME Servers (without installing the server-side and web interfaces), you only need following packages in the dependencies tarball:
- monitor-edid-1.11-1.el4.remi.i386.rpm
- ocsinventory-agent-0.0.6-1.el4.remi.noarch.rpm
- ocsinventory-ipdiscover-1.01-2.el4.remi.i386.rpm
Then edit /etc/ocsinventory-agent/ocsinv.conf and modify following lines:
OCSSERVER=yourdomain.com OCSTAG=your_tag
And finally launch the first inventory manually:
ocsinventory-agent -s yourdomain.com -t your_tag
OCS Agent for Windows
Download the latest client software, OCSNG_WIN32_AGENT_1.xx_repack.zip, this contains three alternatives, it is suggested you use OcsAgentSetup.exe
Launch the first inventory by typing the following in the 'execute box':
"C:\Program Files\OCS Inventory Agent\OCSInventory.exe" /server:yourdomain.com /np /debug /tag:your_tag
Wait a few seconds and go to http://your-server/ocs, you should see your computer's inventory, Or just wait a day for the automatic update.
OCS Agent for Linux
For a RPM based distro use the above rpms. For others download the generic linux tar.gz, unpack, and as root, run the setup script.
Mempis 7 required additional perl- packages, use you package management tools to search for the missing dependencies based on the error messages. See Section 4.2 in the internal OCS help file.
The first inventory is launched during install.
Use
OCS Inventory NG
OCS Reports' web interface can be reached at http://your-server/ocs
Before login, please choose your language (flags on the top right corner)
Login : admin
Password: admin
Inventories can be done from WAN but the web interface is only available from inside your network for security reasons by default.
GLPI
GLPI's web interface can be reached at http://your-server/glpi
Login : glpi
Password: glpi
GLPI's web interface is only available from inside your network for security reasons by default.
Special commands
To view OCS and GLPI's configuration, you can type the following at the prompt:
config show ocs config show glpi
You can change a few parameters:
DB parameter | Options | Default | Explanation # HTTPS | on/off | on | enable/disable https mode # PublicAccess | local/global | local | Accessibility of web interface # InventoryAccess | local/global | global | Accessibility of OCS Server (to receive inventories) # InventoryDelay | >1 | 600 | Time to wait (sec) to avoid server overload (Agent cron)
After any change to OCS or GLPI configuration, you should apply modifications by typing the following at the prompt:
signal-event ocsglpi-update
It will expand and restart needed templates and services in one command!
Additional information
Initial howtos:
Sylvain Gomez (Cool34000)