OCS INVENTORY ON LINUX


-->




              OCS INVENTORY SERVER SIDE CONFIGURATION:

OCS Inventory is a great software to make inventories. The NG Server is formed by: communication server, deployment server, and administration console.
The computers that will be inventoried must run an agent (installed on each computer), to connect to the OCS NG Server. This to have a complete inventory system on a single system.
 

RPM Package Required:
#yum install -y perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Net-IP perl-XML-Entities perl-Apache-DBI perl-Apache2-SOAP perl-SOAP-Lite mod_perl

Installing OCS Inventory NG Server 2
First, we need to download the tarball from OCS Inventory website.
#mkdir OCS
#cd OCS
#wget http://launchpad.net/ocsinventory-server/stable-2.0/2.0rc1/+download/OCSNG_UNIX_SERVER-2.0rc1.tar.gz

Initiate the installer:
#tar -zxvf OCSNG_UNIX_SERVER-2.0rc1.tar.gz
#cd /download/OCSNG_UNIX_SERVER-2.0rc1

sh setup.sh

Almost all the options, we'll select the default option. These are the below questions:
If you leave the question in blank, it will select the default option.
Do you wish to continue ([y]/n)?y

Your MySQL client seems to be part of MySQL version 5.0.
Your computer seems to be running MySQL 4.1 or higher, good ;-)
Which host is running database server [localhost] ?localhost
On which port is running database server [3306] ? 3306

Where is Apache daemon binary [/usr/sbin/httpd] ? Enter

Where is Apache main configuration file [/etc/httpd/conf/httpd.conf] ? Enter

Which user account is running Apache web server [apache] ? Enter

Which user group is running Apache web server [apache] ? Enter

Where is Apache Include configuration directory [/etc/httpd/conf.d/] ? Enter

Where is PERL Intrepreter binary [/usr/bin/perl] ? Enter

Do you wish to setup Communication server on this computer ([y]/n)?y

Where to put Communication server log directory [/var/log/ocsinventory-server] ? Enter

OCS setup.sh can install perl module from packages for you
The script will use the native package from your operating system like apt or rpm
Do you wish to continue (y/[n])? y

To ensure Apache loads mod_perl before OCS Inventory NG Communication Server,
Setup can name Communication Server Apache configuration file

'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'. Enter

Do you allow Setup renaming Communication Server Apache configuration file
to 'z-ocsinventory-server.conf' ([y]/n) ?y

Do you wish to setup Administration Server (Web Administration Console)
on this computer ([y]/n)?y

If you choose to move directory, YOU MUST MOVE 'OCS' directory to
Administration Server writable/cache directory (by default
/var/lib/ocsinventory-reports), especialy if you use deployement feature.
Do you wish to continue ([y]/n)?y

Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports] ? Enter

Where to create writable/cache directories for deployement packages,
IPDiscover and SNMP [/var/lib/ocsinventory-reports] ? Enter


                                  Create OCS Mysql Database and Permission:


Creating a MySQL database:
#mysql -u root -p"password"

Then create the database named ocs, and grant permissions to user ocs, with password ocs:

CREATE DATABASE ocs;

GRANT ALL ON ocs.* to 'ocs'@'localhost' identified by 'ocs';


Finally, we must delete the install script:
rm -f /usr/share/ocsinventory-reports/ocsreports/install.php




                           OCS INVENTORY CLIENT SIDE CONFIGURATION:

Create a directory
#mkdir OCS
#cd OCS/
# yum install perl-XML-Simple perl-Compress-Zlib perl-Net-IP perl-LWP perl-Digest-MD5 perl-Net-SSLeay
#yum install perl-Net-SNMP perl-Proc-Daemon perl-Proc-PID-File perl-Sys-Syslog pciutils smartmontools monitor-edid
#tar -xvzf Ocsinventory-Unix-Agent-2.0.1.tar.gz
#cd Ocsinventory-Unix-Agent-2.0.1/
#perl Makefile.PL
#make
#make install
#/etc/init.d/httpd reload


After client configuration now login on OCS server panel in below:

To manage the server with the administration tool:
http://ocs-server-ip/ocsreports/

Username: admin
Password: admin