Open Computer and Software Inventory Next Generation (OCS inventory NG) is free software that enables users to inventory their IT assets. OCS-NG collects information about the hard- and software of networked machines running the OCS client program (“OCS Inventory Agent”). OCS can be used to visualize the inventory through a web interface. Furthermore, OCS comprises the possibility of deploying applications on the computers according to search criteria. Agent-side IpDiscover makes it possible to know the entirety of networked computers and devices.

Operating System

Downloading OCS Inventory
OCS Linux Server 1.01

Installing OCS_Inventory server required dependencies

cd /usr/local/src/
rpm --import
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

MySQL & Apache setup

yum -y install mysql-server mysql httpd
echo "ServerName your_server_name:80" >> /etc/httpd/conf/httpd.conf

Creating database for OCS inventory

mysql -u root -p
mysql>CREATE DATABASE ocsweb;
mysql>GRANT ALL PRIVILEGES ON ocsweb.* TO ocs@localhost IDENTIFIED BY 'ocs';

PHP & Perl Modules setup

yum -y install perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Apache-DBI perl-Net-IP perl-SOAP-Lite
yum -y install php-pecl-zip php-mysql php-devel zlib-devel php-pear php-gd gcc
yum -y install php-snmp php-posix libgd2 gd-devel libpng libpng-devel perl-config-IniFiles perl-Crypt-DES perl-Digest-HMAC perl-Digest-SHA1 perl-GD perl-IO-Socket-INET6 perl-Net-SNMP perl-rrdtool perl-Socket6 mod_perl perl-XML-Parser
yum -y install sudo make gcc

Adding zip support to PHP installation

pecl install zip
echo ";Add zip support" >> /etc/php.ini
echo "" >> /etc/php.ini
service httpd restart

OCS Server Installation

cd /usr/local/src
tar zxvf OCSNG_LINUX_SERVER_1.01.tar.gz
cp -rf OCSNG_LINUX_SERVER_1.01 /var/www/html/OCSNG
cd /var/www/html/OCSNG/ocsreports
chmod 666
cd /var/www/html/OCSNG

Pretty much everything is self-explanatory, and for the most part, you can select the defaults. The first screen is only important if you’ve had a previous version of OCS running on the server.
OCS is now installed in /var/www/html and the main configuration file will be located in the web server’s httpd directory, /etc/httpd/conf.d/ocsinventory.conf, along with logging directory at /var/log/ocsinventory-NG/.

Now restart your apache server:

service httpd restart

Enter the following link into your browser:

You should see a login box for your MySQL credentials.
MySQL login: root
MySQL Password: whatever you change it too
MySQL HostName: localhost

If everything goes well, you should see a long list of steps the installer completed. If not, fix the problems and try again. If it succeeded, go ahead and click the submit query button at the very bottom of the page. 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.

OCSNG Server Setup on CentOS5.2
Tagged on:     

One thought on “OCSNG Server Setup on CentOS5.2

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google