Setup OCS Inventory 1.02.X â 1.3.X under Windows with d'Apache ...
Setup OCS Inventory 1.02.X â 1.3.X under Windows with d'Apache ...
Setup OCS Inventory 1.02.X â 1.3.X under Windows with d'Apache ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Setup</strong> <strong>OCS</strong> <strong>Inventory</strong> <strong>1.02.X</strong> – <strong>1.3.X</strong><br />
<strong>under</strong> <strong>Windows</strong> <strong>with</strong> <strong>d'Apache</strong> 2.2 and<br />
MySQL 5.1 already installed<br />
This document explains how to setup <strong>OCS</strong> <strong>Inventory</strong> NG Server <strong>under</strong> <strong>Windows</strong> <strong>with</strong>out<br />
setting up XAMPP, but using existing Apache and MySQL installation.
Contents<br />
1. Components to download ............................................................................................................... 3<br />
2. Installing PERL .................................................................................................................................. 3<br />
3. Installing PERL modules ................................................................................................................... 3<br />
4. Installing mod_perl for Apache ....................................................................................................... 4<br />
4.1. Downloading mod_perl ........................................................................................................... 4<br />
4.2. Configuring Apache ................................................................................................................. 4<br />
5. Installing <strong>OCS</strong> <strong>Inventory</strong> NG Server ................................................................................................. 5<br />
5.1. Installing Communication Server PERL module ...................................................................... 5<br />
5.2. Updating Apache configuration file (httpd.conf) .................................................................... 5<br />
6. Installing Administration console and database ............................................................................. 6<br />
6.1. Configuring MySQL .................................................................................................................. 6<br />
6.2. Installing Administration console ............................................................................................ 6<br />
6.3. Creating ocsweb database and initial configuration ............................................................... 6<br />
7. Test <strong>OCS</strong> <strong>Inventory</strong> NG Server ......................................................................................................... 7
1. Components to download<br />
We assume that Apache 2.2 and Mysql 5.1 are already installed.<br />
Download and unpack the following packages:<br />
<strong>OCS</strong> <strong>Inventory</strong> NG Server for Linux in folder (preferred<br />
C:\Program Files\<strong>OCS</strong> <strong>Inventory</strong> NG)<br />
<strong>OCS</strong> <strong>Inventory</strong> NG Agent for <strong>Windows</strong> in folder <br />
ActivePerl (http://www.activestate.com)<br />
NMake (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084)<br />
In this document, extract folder for files will be named <br />
2. Installing PERL<br />
Run ActivePerl setup, using default parameters (Must be installed in a path <strong>with</strong>out space, or<br />
this make many troubles for next steps).<br />
Copy files nmake.err and nmake.exe in folder C:\Perl\bin<br />
3. Installing PERL modules<br />
Needed PERL module list is available in file README from folder<br />
//README :<br />
XML::Simple (2.12 or higher - Already installed)<br />
Compress:Zlib (1.33 or higher - Already installed)<br />
DBI (1.40 or higher - Already installed)<br />
DBD::Mysql (2.9004 or higher)<br />
Apache::DBI (0.93 or higher)<br />
Net::IP<br />
(1.21 or higher)<br />
Some PERL module are already installed <strong>with</strong> ActivePerl. To view list of installed PERL<br />
modules, run command ppm to open PERL package manager. By default, DBI, XML::Simple<br />
and Compress::Zlib are already installed.<br />
Ensure that module version are greater than the required once listed in README.<br />
To setup the other modules, you just have to run the following command (need Internet<br />
connection 1 ) :<br />
ppm install (take care to the case).<br />
For example :<br />
ppm install DBD::Mysql<br />
ppm install Apache::DBI<br />
ppm install Net::IP<br />
If you want to use SOAP web service, you must also install modules SOAP::Lite (0.66 or<br />
higher), and XML::Entities (0.02 or higher).<br />
1 If you are below a proxy, you must create an environnement variable called « HTTP_proxy » <strong>with</strong> var =<br />
http:login:password@ip:port
4. Installing mod_perl for Apache<br />
4.1. Downloading mod_perl<br />
Just run (need Internet connection) depending of your Perl version :<br />
Perl 5.8 :<br />
ppm install http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd<br />
Perl 5.10 :<br />
ppm repo add http://cpan.uwinnipeg.ca/PPMPackages/10xx/<br />
ppm install mod_perl<br />
Perl 5.12 :<br />
ppm repo add http://cpan.uwinnipeg.ca/PPMPackages/12xx/<br />
ppm install mod_perl<br />
During the install process, you will be asked for Apache module folder, where to copy<br />
mod_perl.so file (default is C:\Program Files\Apache Software<br />
Foundation\Apache2.2\modules).<br />
For more informations about mod_perl setup, refer to :<br />
http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages<br />
4.2. Configuring Apache<br />
Edit Apache configuration file httpd.conf and add following lines depending of your Perl<br />
version:<br />
Perl 5.8 :<br />
LoadFile "C:/Path/to/Perl/bin/perl58.dll"<br />
LoadModule perl_module modules/mod_perl.so<br />
Perl 5.10 :<br />
LoadFile "C:/Path/to/Perl/bin/perl510.dll"<br />
LoadModule perl_module modules/mod_perl.so<br />
Perl 5.12 :<br />
LoadFile " C:/Path/to/Perl/bin/perl512.dll "<br />
LoadModule perl_module modules/mod_perl.so<br />
Then restart Apache service.
5. Installing <strong>OCS</strong> <strong>Inventory</strong> NG Server<br />
5.1. Installing Communication Server PERL module<br />
Open a command prompt in folder<br />
//Apache.<br />
Read file INSTALL and then run the following commands :<br />
perl MakeFile.PL<br />
nmake<br />
nmake install<br />
5.2. Updating Apache configuration file (httpd.conf)<br />
Copy the file<br />
6. Installing Administration console and database<br />
6.1. Configuring MySQL (optional)<br />
Ensure that InnoDB database engine is enabled in MySQL configuration file : my.ini.<br />
You must uncomment line skip innodb.<br />
You must comment line sqlmode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"<br />
to<br />
permit correct <strong>OCS</strong> installation.<br />
Then, restart MySQL service.<br />
6.2. Installing Administration console<br />
Copy folder //ocsreports to the document<br />
root directory of your Apache web server.<br />
6.3. Creating ocsweb database and initial configuration<br />
If you specifiy UTF-8 for your MySQL, <strong>OCS</strong> installation hang on creating some table.<br />
You must modify those two entries in <strong>OCS</strong>REPORTS\files\ ocsbase.sql:<br />
Original<br />
CREATE TABLE files (<br />
NAME VARCHAR(255) NOT NULL,<br />
VERSION VARCHAR(255) NOT NULL,<br />
OS VARCHAR(255) NOT NULL,<br />
CONTENT LONGBLOB NOT NULL,<br />
PRIMARY KEY (NAME, OS, VERSION)<br />
) ENGINE=MYISAM ;<br />
Modified<br />
CREATE TABLE files (<br />
NAME VARCHAR(255) NOT NULL,<br />
VERSION VARCHAR(255) NOT NULL,<br />
OS VARCHAR(255) NOT NULL,<br />
CONTENT LONGBLOB NOT NULL,<br />
PRIMARY KEY (NAME, OS, VERSION)<br />
) ENGINE=INNODB ;<br />
CREATE TABLE tags (<br />
Tag VARCHAR(255) NOT NULL default '',<br />
Login VARCHAR(255) NOT NULL default '',<br />
PRIMARY KEY (Tag,Login),<br />
KEY Tag (Tag),<br />
KEY Login (Login)<br />
) ENGINE=MyISAM;<br />
CREATE TABLE tags (<br />
Tag VARCHAR(255) NOT NULL default '',<br />
Login VARCHAR(255) NOT NULL default '',<br />
PRIMARY KEY (Tag,Login),<br />
KEY Tag (Tag),<br />
KEY Login (Login)<br />
) ENGINE=INNODB;<br />
In your favorite web browser, open URL<br />
http:///ocsreports/install.php to run <strong>OCS</strong> <strong>Inventory</strong> NG<br />
setup process.<br />
Then, update if asked file PHP_DIR\php.ini (openssl, file size and restart Apache<br />
service).<br />
Look for :<br />
- post_max_size = 8M replace by post_max_size = 32M<br />
- upload_max_filesize = 2M replace by upload_max_filesize = 32M<br />
Follow instructions to create database and insert initial configuration into database.
7. Test <strong>OCS</strong> <strong>Inventory</strong> NG Server<br />
In folder /, run ocsAgent.exe.<br />
This command creates a folder C:\ocs-ng where <strong>OCS</strong> <strong>Inventory</strong> NG agent is installed.<br />
Open a command prompt in this folder and run command<br />
ocsinventory /server:127.0.0.1 /pnum: /debug<br />
Check in Administration console that your computer has been added in inventory.<br />
<strong>Setup</strong> is now finished and <strong>OCS</strong> <strong>Inventory</strong> NG Server may work <strong>with</strong>out any problem.<br />
8. Secure <strong>OCS</strong> <strong>Inventory</strong> NG Server<br />
Please go to http://wiki.ocsinventory-ng.org/index.php/Documentation:Secure for securing<br />
your <strong>OCS</strong> <strong>Inventory</strong> NG installation.
Originally written by Frédéric Prost (frederic.prost@laposte.net) 16/09/2006<br />
Originally translated from French by par Didier Liroulet (ocsinventory@liroulet.net)<br />
Updated for 1.2.x and 1.3.x by Thierry Barrau