Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction
OCS Inventory is a great software to make inventories. The NG Server is formed by: communication server, deployment server,and administration console. Click here to know how it works. The computers that will be inventoried must run an agent (installed on each computer), to connect to the OCS NG Server. We are using the CentOS 5.5 (64bits) distribution, but it will probably work on Fedora (and Red Hat, for sure).
Starting MySQL:
/etc/init.d/mysqld start
HowtoForge
Page 1 of 6
How To Install OCS Inventory NG Server 2 On CentOS 5.5 /usr/bin/mysqladmin -u root password 'secret'
http://www.howtoforge.com/
Starting Apache:
We need to start Apache (OCS uses it):
/etc/init.d/httpd start
Installing Packages
Next, we need to install EPEL repository:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
perl-SOAP-Lite mod_perl
Configure PHP
Edit the /etc/php.ini file, and change the following lines:
vi /etc/php.ini
post_max_size = 200M
HowtoForge
Page 2 of 6
http://www.howtoforge.com/
Restart Apache:
/etc/init.d/httpd restart
cd /download
wget http://launchpad.net/ocsinventory-server/stable-2.0/2.0rc1/+download/OCSNG_UNIX_SERVER-2.0rc1.tar.gz
cd /download/OCSNG_UNIX_SERVER-2.0rc1
sh setup.sh
The install script is very simple, it's a wizard. Almost all the options, we'll select the default option. These are the questions:
HowtoForge
Page 3 of 6
http://www.howtoforge.com/
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] ? Where is Apache main configuration file [/etc/httpd/conf/httpd.conf] ? Which user account is running Apache web server [apache] ? Which user group is running Apache web server [apache] ? Where is Apache Include configuration directory [/etc/httpd/conf.d/] ? Where is PERL Intrepreter binary [/usr/bin/perl] ? Do you wish to setup Communication server on this computer ([y]/n)?y Where to put Communication server log directory [/var/log/ocsinventory-server] ? 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
HowtoForge
Page 4 of 6
http://www.howtoforge.com/
'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'. 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 CAUTION: Setup now install files in accordance with Filesystem Hierarchy Standard. So, no file is installed under Apache root document directory (Refer to Apache configuration files to locate it). If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache root document directory. If you choose to move directory, YOU MUST MOVE 'download' 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] ? Where to create writable/cache directories for deployement packages, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ?
Then create the database named ocsweb, and grant permissions to user ocs, with password ocs:
HowtoForge
Page 5 of 6
How To Install OCS Inventory NG Server 2 On CentOS 5.5 CREATE DATABASE ocsweb;
http://www.howtoforge.com/
If you want, you can change these parameters (database name, username or password). This is the default of ocs. Now, point your browser to ocsreports interface, to manage the server with the administration tool:
http://server-ip/ocsreports/
The default user is "admin" and password is "admin". Finally, we must delete the install script:
rm -f /usr/share/ocsinventory-reports/ocsreports/install.php
Now, all you have to do is configure the server with the machine options. Install the agents on the network computers pointing theserver ip on them. For more information, take a look at the wiki of OCS clicking here.
References
OCS Inventory: http://wiki.ocsinventory-ng.org/index.php/Documentation:Main
HowtoForge
Page 6 of 6