OCS inventory management application installation on Centos
In this Topic we are going to discuss about OCS inventory management application installation on Centos
Its a software which you can install in your office to get inventory information like hardware details, software’s installed, IP address information etc.
It runs like a client server model where you can install a server to get and manage inventory information and client can be installed on all machines like Linux, Windows and MAC which provide information to the server. The inventory information is updated automatically by client from time to time.
You just need to install the client in all machines and you can easily manage hardware and software inventory in your software.
Main information which you get from this application are as follows :
Amount of RAM installed.
CPU and its speed
Total disk and percentage of utilization.
IP and gateway information
Various software’s installed
Type and version of OS
Remotely install a package
For the installation of this application on Centos operating system, you just need to have Apache, PHP & MySQL pre-installed.
You also need to have some Perl modules. So, let’s get started.
# yum install mysql-server mysql httpd
# service httpd start; chkconfig httpd on
# service mysqld start; chkconfig mysqld on
# yum install perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Apache-DBI perl-Net-IP perl-SOAP-Lite
# yum install php-pecl-zip php-mysql php-devel zlib-devel php-pear php-gd gcc
Add zip support to PHP once this is installed
# pecl install zip
# vim /etc/php.ini
;Add zip support
Restart Apache once done
# service httpd restart
Download OCS server package from here:
# tar -xzvf OCSNG_LINUX_SERVER_1.01.tar.gz
# cd OCSNG_LINUX_SERVER_1.01
# sh setup.sh
Install OCS in Apache web root /var/www/html
Configuration file : /etc/httpd/conf.d/ocsinventory.conf
Log : /var/log/ocsinventory-NG/
once done follow web setup, create a MySQL database and provide the information in the web page.
Correct any errors if encountered here. Now you can now login to the web interface with username and password of both admin. You can change the default password at the top right-hand side of the browser window.
Server installation part is complete now, now install clients
Client – Linux
# yum install ocsinventory-agent
Follow on screen instructions
# vi /etc/ocsinventory/ocsinventory-agent.cfg
Here add your ocs server and tag name your client.
server = http://ocs.server/ocsinventory
tag = tag_name
Change the line local = /var/lib/ocsinventory-agent to basevardir = /var/lib/ocsinventory-agent. Save and close the file.
To run agent daily.
# mv /etc/cron.hourly/ocsinventory-agent /etc/cron.daily/
To forcefully send inventory
Client – Windows
Download the windows client from here :
and run the .exe, point client to your OCS server by client name or IP address and add tag name.
Client – MAC
Download the client from here :
unzip the file and double click “Ocsinventory_Agent_MacOSX.pkg
Follow on screen instructions and point the client to OCS server, add tag name as well.
Schedule to run OCS agent every 6 hours that would be enough.
To access/manage OCS server
Here you can navigate and can get all required information.