OCS Inventory NG
Open source network and asset management tracking software with remote agents. I particularly wanted to accurately know what software was currently installed at any given time on the laptops in the checkout pool. Adding all the computers has become extremely useful.
Installation based on RedHat instructions on
Install MySQL Server
apt-get install mysql-serverChange the root password:
# mysql --user root mysql> UPDATE mysql.user SET Password = PASSWORD('secret') WHERE User = 'root'; mysql> FLUSH PRIVILEGES; mysql> exit
apt-get install ocsinventory-serverRecommended running apt-get autoremove
Gave DB password and set OCS user DB password via install.
Note: OCS stores them in plaintext in /var/lib/ocsinventory-server/config/dbconfig.inc.php and the symlinks in /usr/share/ocsinventory-server/ocsreports/ and /etc/ocsinventory.
Test Web InterfaceOpen up a browser to http://myOCSserver/ocsreports/install.php. Make sure that you click on a language icon!
You can modify many of the defaults by editing /usr/share/ocsinventory-server/ocsreports/preferences.php. Here are some examples:getBrowserLang didn't seem to be working so we hard coded it to use english (the original line followed by change):
$_SESSION["fichLang"] = new FichierConf(DEFAULT_LANGUAGE?DEFAULT_LANGUAGE:getBrowserLang()); $_SESSION["fichLang"] = new FichierConf(english);You can change the default columns and labels by editing the currentFieldList array:
$_SESSION["currentFieldList"] = array ( "a.".TAG_NAME=>TAG_LBL,"h.name"=>$l->g(23), "a.employee"=>"Employee","h.ipaddr"=>$l->g(34), ...);
The 23 in "h.name"=>$l->g(23) represents number 23 in /usr/share/ocsinventory-server/ocsreports/languages/languagefile.txt. You can also statically define the column heading as in "a.employee"=>"Employee".
Backup mySQL database on OCS ServerUse mysqldump to create a dump file that will contain all the SQL statements needed to create the table and populate the table in a new database server.
mysqldump -u user -h localhost -psecret ocsweb | gzip -9 > ocsweb-db.sql.gzRestore with
mysql ocsweb < ocsweb-db.sql
Install Windows AgentsThe windows executable (.EXE file) is available from the OCS website. OCSPackager can be used to create ocspackage.exe which will run OcsAgentSetup.exe with predefined installation options so that no user interaction is required for the install.
OcsAgentSetup.exe /S /server:myserver /now
I used a logon script to deploy this but you could also use psexec to push it to one or all the PC's on the LAN using a wildcard:
psexec \\PC1 -c \\Server1\Netlogon\ocspackage.exe psexec \\* -c \\Server1\Netlogon\ocspackage.exe