Installation Guide:
I have written this guide to good software that allows us to inventory all computers that are in our network with detailed information. The following program is completely open-source can be ridestribuito according to our needs.
What you need:
First of all we note that we can do the 'audit (play) in two ways as a service on a client computer that connects to a server and send our information or as a standalone service that we use to produce a file with information of our clients.
In this guide we look at and consider the installation of a server service and distribution within the network of a service of auditing.
PREPARATION AND INSTALLATION OF SHELTERS SERVER
WORKSTATION LINUX:
Our tests were carried out on a Ubuntu 7.10 first and then we prepare our system to ' installation of required packages to run our service.
installed first of all the services we need for the operation of our package servers then dumps.
We need, as you indicate the drive the following software:
Apache version 1.3.33 or higher / Apache version 2.0.46 or higher.
Mod_perl version 1.29 or higher.
mod_php version 4.3.2 or higher.
PHP 4.3.2 or higher, with ZIP and GD support enabled.
PERL 5.6 or higher.
Perl module XML::Simple version 2.12 or higher.
Perl module Compress::Zlib version 1.33 or higher.
Perl module DBI version 1.40 or higher.
Perl module DBD::Mysql version 2.9004 or higher.
Perl module Apache::DBI version 0.93 or higher.
Perl module Net:: IP version 1.21 or higher.
Perl module SOAP:: Lite version 0.66 or higher (not mandatory)
MySQL version 4.1.0 or higher with InnoDB engine active.
Make utility like GNU make.
then installed all of our services via the command line:
apt-get update apt-get upgrade apt-get install ssh openssh-server mc apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 \ libpopt-dev linux-kernel-headers lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf \ automake1.9 libtool bison autotools-dev g++ linux-headers-$(uname -r) apt-get install mysql-server mysql-client libmysqlclient15-dev apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert apt-get install ntp ntpdate apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap \\ php5-json php5- mcrypt php5-memcache php5-Mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite \\ php5-tidy php5-xmlrpc php5-xsl apt-get install libapache2-mod-perl2 libapache2-mod-perl2-dev libxml-simple-perl libcompress-zlib-perl libdbi-perl \\ libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl
Set the password for the MySQL root user:
mysqladmin-u root password la_password_desiderata
We are now ready to download and intall the package we need that we find on the official website of our program http:// www.ocsinventory-ng.org/index.php?page=1-01 OCSNG_LINUX_SERVER we download our package.
At this point we have to extract our package and install it, from the command line type
tar-zxvf OCSNG_LINUX_SERVER_1.01.tar.gz
We go into the folder we created and launch the installation files
OCSNG_LINUX_SERVER_1.01 cd /
sudo sh setup.sh
We follow the tutorial that will appear online
accepted the first screen that asks us to remove the previously installed apache configurations
Definimao the port on which the database is listening (default is 3306)
accepted other configurations unless there are specific proposals to give the apache server. Note that the program will ask during the installation where the Apache server puts its pages, by default in linux are put in the folder / var / www /.
restart the Apache server via the command line:
/ etc/init.d/apache2 restart
and now if we open one of our browsers we see our server side application installed. By going to http://localhost/ocsreports/install.php our server starts with the creation of tables in the database. Type in the user password ocs ocs and machine localhost and click send
The server is now listening on port 80 and ready to process the information that we will send you.
PREPARATION AND INSTALLATION OF SHELTERS CLIENT
To send data to our server we generally use an agent that allows us to unchanged data to the server in a user-functional transparent here too, depending on the locations differentiate our procedures.
Linux machines
Download our agent for linux machines http://prdownloads.sourceforge.net/ocsinventory/OCSNG_LINUX_AGENT_1.01_with_require.tar.gz?download and then extract the compressed file we have created. Before proceeding with this installation we have to download the Linux client package that we need to make it all work in a consistent and compatible with perl and php.
apt-get install libxml-simple-perl
apt-get install zlib-perl-libcompress
apt-get install libnet-ip-perl
apt-get install libwww-perl
apt-get install libdigest-md5-perl
apt-get install perl libnet-SSLeay-
Now we are ready to install our audit of the local customer
tar-xvzf OCSNG_LINUX_AGENT_1.01.tar.gz
run setup with the following command
cd OCSNG_LINUX_AGENT_1.01
sh setup.sh
We will ask whether to use the HTTP method (ie a server that acts as audit) or LOCAL for our process during installation, installed the service as http to the next screen and enter the IP of the server that we previously installed, for example, 192.168.1.2. The next screen will ask you which port is listening on the server (if we have not changed anything in apache is the default port 80) and the next screen the program asks us to enter a possible label for our computer (TAG). We confirm the final configuration steps and eventually we installed our program within the client computer.
CAR WINDOWS
mentioned that if the network is under an Active Directory domain, the official program guide will explain how to efficiently undertake the auditing service within machines in the domain. In our case we take a Windows machine without any specific requirements within the network and carry out the installation and configuration of our client software.
downloaded before the whole package from the page http://prdownloads.sourceforge.net/ocsinventory/OCSNG_WIN32_AGENT_1.01_repack.zip?download and extract it. OCSAgentSetup.exe choose to install the software and follow the configuration.
first stop the service that has just intall Start -> Control Panel -> Administrative Tools -> Services
Locate the service and OCS-Inventory arrest
In the directory C: \\ Program Files \\ OCS Inventory Agent service.ini open the file and change the field TTO_WAIT as shown, or set to update inventory after 5 seconds of 'service startup
Back to services and restart OCS-Inventory
If we now open our servers and we look at the computer inventory would find all the locations where we put our agent. From the various administration screens of various server operations are possible for you to discover them and customize them. Good job everyone let me know if this guide was helpful or if you have any suggestions as to give giorgiosadolfo [at] fastwebnet [dot] com