THEORY
Agents are loaded on the individual systems that can be invoked with a simple command line. When invoked they communicate systems settings and hardware information to the OCSNG server on support.mydomain.com . GLPI can be programmed to automatically update any system that does not exist (based on IP address, and/or serial number, and/or system name etc), or GLPI can be set to not update this information at all. GPLI also has the ability to import some or all of the information. For instance, you may or may not want to import the printer queues.
WORD OF CAUTION
All of the packages and installers make the assumption that you want to run things in daemon mode. So using the installed and following the instructions with the installer will result in a system that updates every 4 hours or so. This may be okay for a file server, but we should use this sparingly.
MAC (Tiger /Leopard / Snow Leopard)
There is a Mac .PKG file available from the downloads section of the OCS Next Generation (NG) site. We are using version 1.3 as of this writing, but they go to pains to keep the agents compatible with the server so you may be able to use a new agent.
wget http://launchpad.net/ocsinventory-unix-agent/stable/ocsinventory-unix-agent-1.1.2/+download/Agent_MacOSX_1.1.pkg.zip
Installing and Configuring
For the most part you simply want to take a built package and place it in the Applications directory then invoke it with the simple line:
/Applications/OCSNG.app/Contents/Resources/ocsinventory-agent –debug –server=support.mydomain.com
NOTES
Running the .pkg installer is going to place an entry in /Library/LaunchDaemons/org.ocsng.agent.plist that causes the agent to run in daemon mode at startup. Not only that, it will be missing an entry defining the appropriate place to send the information in the agent config file
#/etc/ocsinventory-agent/ocsinventory-agent.cfg
server=support.mydomain.com
logfile=/var/log/ocsng.log
delaytime=30
LINUX (Redhat / CentOS)
Version 5 —
wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
yum install -y ocsinventory-agent
ocsinventory-agent –server=http://support.mydomain.com/ocsinventory
Version 6 —
wget http://dl.fedoraproject.org/pub/epel/beta/6/i386/epel-release-6-5.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
yum install -y ocsinventory-agent
ocsinventory-agent –server=http://support.mydomain.com/ocsinventory
SOLARIS
I’m not doing this in Solaris at the moment. If someone has some nice install notes, then let me know.
WINDOWS
There are a few ways to do this install with Windows and the primary difference is that the methosd that use installers assume that you want a service running that will keep poking the OCS inventory collection server. I’d actually prefer we not do that and simply run the ocsinventory.exe from the command line with a /server:support.mydomain.com switch. This lets you run the program when you want it updated and leave it off the rest of the time.
PSTools Method (not as a service)
This method uses pstools to copy data to the program files of the remote system and then executes the basic command. It does not start a service. One key point. The location you copy files from should not have files specific to the system. So if you just copy from one system to another you will end up with hostname specific files in your library. Clean that up… or better yet pull these file from File01 in the pstools subfolder.
mkdir “\\target_system\c$\windows\system32\PsTools”
mkdir “\\target_system\c$\Program Files\OCS Inventory Agent”
copy “C:\PsTools” “\\target_system\c$\windows\system32\PsTools\”
copy “C:\ocsfiles\OCS Inventory Agent” “\\target_system\c$\Program Files\OCS Inventory Agent\”
psexec \\target_system -s -u domain\Administrator -p password “c:\Program Files\OCS Inventory Agent\ocsinventory.exe” /server:support.zulugolf.com
Experienced additional trouble with this method at forge and had to change to using cmd /k and a special ocs_contact.lnk
mkdir “\\target_system\c$\windows\system32\PsTools”
mkdir “\\target_system\c$\Program Files\OCS Inventory Agent”
copy “C:\deploy\PsTools” “\\target_system\c$\windows\system32\PsTools\”
copy “C:\deploy\OCS Inventory Agent” “\\target_system\c$\Program Files\OCS Inventory Agent\”
psexec \\target_system -s -u msdomain\domain_admin_user -p password cmd /k “c:\Program Files\OCS Inventory Agent\Ocs_contact.lnk”
exit
Installer Method