Automatically Inventory your Machine hardware and software Using OCS Inventory NG

OCS Inventory NG Open Computer and Software Inventory Next Generation is an application designed to help a network or system administrator keep track of computer configuration and software installed on the network. It also allows deploying softwares, commands or files on Windows and Linux client computers.

Dialog between client computers and management server is based on actual standards, HTTP/HTTPS protocols and XML data

formatting.

Management server runs on Apache/MySQL/PHP/PERL server, under Linux or Windows NT based computers.

Inventoried client computers can run

Microsoft Windows 95/98/Me/NT4/2000/XP/2003,
Linux,
Mac OS X,
Sun Solaris,
and IBM AIX.

Installing OCS Inventory NG Server in Debian

Before installing OCS Inventory NG you need to install the following debian packages

Installing apache2 with php support

Check here for apache2 with php support

Installing Mysql with php support

#apt-get install mysql-server-4.1 php4-mysql

Other packages need to install

#apt-get install make gcc g++

#apt-get install libapache2-mod-perl2 php4-gd libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl php4-pear php4-dev libnet-ip-perl

after installing this you need to restart your apache2 webserver using the following command

#/etc/init.d/apache2 restart

Now you need to download the OCS Inventory NG source code from the above download link once you download .tar.gz file you

need to extract this file using the following command

#tar xzvf OCSNG_LINUX_SERVER_1.0RC3-1.tar.gz

#cd OCSNG_LINUX_SERVER_1.0RC3-1

Now you need to run the setup script using the following command

#sh setup.sh

This will start OCS Inventory NG installation in this process it will prompt for the following questions

do you want to continue select option y and press enter

where is your database server located enter localhost

Enter the Database port leave default option and press enter

where is your apache server binary is located leave default option and press enter

Enter the apache configuration file location leave default option and press enter

which user account is running apache server leave default option and press enter

you want to setup communication server on this computer enter y

selecting apache mod_perl version you are using now you leave default option and press enter

enter where you want to enter the log file location leave default option and press enter

setup administration server select y and press enter

Apache root document directory leave default option and press enter

This will complete the ocs inventory NG application with the following message

Configuring OCS Inventory NG you need to point your browser to http://your-server-ip/ocsreports/ this will open the following screen in this you need to enter the mysql database username,password,hostname and click on send

[thumb:490:c:l=p]

Now you should see the following screen here you click on Submit Query

[thumb:491:c:l=p]

This will give you a message saying installation completed and you can login using admin as username/password and now you click on “click here to enter OCS-NG GUI”

[thumb:492:c:l=p]

Now you should see the OCS-NG login screen and enter using the above username and password

[thumb:493:c:l=p]

Once you logon you should see the following screen

[thumb:494:c:l=p]

Once your OCS-NG Server installation completed you need to install OCS-NG clients in windows and linux machines

Install OCS Inventory NG Clients for Linux and windows

Now you need to install OCS Inventory NG Client software for this you can download this from here

For windows and linux clients we have different client packages to use you can choose which one is suitable for you.

OCS Inventory NG Supported clients

Microsoft Windows 95/98/Me/NT4/2000/XP/2003,
Linux,
Mac OS X,
Sun Solaris,
and IBM AIX.

I am installing client for debian machine here first you need to download client

#wget http://belnet.dl.sourceforge.net/sourceforge/ocsinventory/OCSNG_LINUX_AGENT_1.0RC3.tar.gz

#tar xzvf OCSNG_LINUX_AGENT_1.0RC3-1.tar.gz

#cd OCSNG_LINUX_AGENT_1.0RC3-1

Now you need to run the setup script using the following command

#sh setup.sh

This will start client setup and it will ask the following questions

which method will you use to generate the inventory([http/local]:http

which host is running OCS Inventory NG Communication Server []:Enter your server ipaddress

On which port is running OCS Inventory NG Communication Server [80] ?80

Would you like to enable Auto Update of Agent ([y]/n) ?y

What is the value of TAG ([]) ?
dmidecode binaries not found !
Setup is able to install dmidecode version 2.8.
Do you wish setup to install dmidecode ([y]/n) ?y

PERL module Net::SSLeay is not installed !
Setup is able to install PERL module Net::SSLeay version 1.25.
Do you wish setup to install this module ([y]/n) ?y

This will complete the client installation and i have installed one more client for my windows xp machine also.I have waited for some time and after finishing the initial inventory you should see the following screen

[thumb:495:c:l=p]

Finally i was very impressed with this software and if you use this with a asset management software such as GLPI, you will have a powerfull inventory and asset management software with automatic updates of computer configuration, license management, help desk and more. If you want to install GLPI you click here for detailed installation process.

If you want to know more about OCS Inventory NG and documentation check here

Sponsored Link

21 thoughts on “Automatically Inventory your Machine hardware and software Using OCS Inventory NG

  1. I’ve installed OCS succesfully and I’ve followed all the recomended steps but it doesn’t work. First of all I’ve tried to make a local test with no results (my machine doesn’t appear in the computers browsing). If I force the agent make de .ocs file and I import it it works but not the autoreporting.
    If you could help me….
    For example, if I’ve this IP: 100.15.1.25, the network configuration (server side) will be:

    net adress: 100.15.1.0
    mask: 255.255.255.0

    And in the client side:
    server adress = 100.15.1.25
    port = 80
    no proxy = False

    Any suggestion?

  2. hi.. i installed ocs..the ocs inventory*ng login screen come.but i didnt gave any pass and dont know what is ..i tried several ways.how can i login :S

  3. hi me again.. the problem previous time was about the localhost..but know the problem is different..

    ERROR: can’t write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull)

    what can i do.. ?? what am i doing wrong

  4. In the web dir (Were ocsreports folder is) you can creat a file called dbconfig.inc.php and chmod it to 666. Then rerun the install script from the webpage.

    That should work.

  5. i am not able to see the login page i followed the same steps as shown its giving page cannot be found

  6. Sir, I was able install the communication and management server successfully and everything is fine up to here. Now how i will get the reports automatically in the server I am complexed. When I run the windows client agent in the widow’s client machine in the same subnet and without proxy and with the “test” option the log file says the error as “Could not connect to UPD : error code 404” also in the mac machine when i run the mac client agent it says the error messages as [ERROR] Error contacting communication server [http://10.10.1.41/ocsinventory].

    Really I am hanged up here, my confusion is why the client machines are trying to connect the communication server as [http://10.10.1.41/ocsinventory] I did not find any directory called “ocsinventory” in the server. Please suggest me how I will solve this issue. Is there anything I am missing in the client side or server side..? or is it that I am misunderstood the concept and not getting the right path…? please help ….

    ashwin patil

  7. I’ve been looking around for articles similar to this but never found one that actually was valuable such as this. Glad I found this place!

  8. Good afternoon. I’am french speaker. You’re post interest me a lot. I think french are according with that. Sorry for languges errors 😉

  9. for the dbconfig problem you must modify the install.php and look for the error the web and you can find a line that says “w” modify it to “rw”
    You should also disable selinux.
    vim /etc/selinux/config modify from SELINUX=enforcing to SELINUX=disabled

    BR

  10. How can I make the linux OCS agent report automatically? If I call it from command line it reports all right, but it never reports if I do not call it especifically. Thanx

  11. ERROR: can’t write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull)

  12. Hello, first thanks for your post. The OCS can report the changes automatically, for instance, if I put more memory or change the memory, or I have to change the video board? Thanks in advance.

  13. OCS server could not be updated install & uninstall software list. what is the reason of it can’t be pull proper data from cline pc.

  14. Thanks Bogdan!! it work like a charm 😀
    I had the same error:
    ERROR: can’t write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull)
    I use CentOS 6.0 64 bits
    Steps:
    * chmod 777 dbconfig.php in /usr/share/ocsinventory-reports/ocsreports/
    * vim /etc/selinux/config modify from SELINUX=enforcing to SELINUX=disabled
    * reboot
    Best regards!

Leave a comment

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