IT Inventory and Resource Management with OCS Inventory NG 1.02
上QQ阅读APP看书,第一时间看更新

Setting up the OCS-NG management server on Windows operating systems

Over the years, people from all walks of life got familiar with the Microsoft Windows OS. The reason for that is simple; their focus lay on the standard definition of user friendliness. No matter what the task to be carried out using Windows was, it needed to be automated, wizard based, and intuitive with a beautiful user interface.

The same goes for software installations. We expect wizards and we expect to be able to go through the stages of an application's setup just by clicking Next, accepting the license agreement, filling out some text fields, browsing for the target location, and eventually ticking some checkboxes identifying what we really need. However, this last step is hidden under the name of advanced or expert mode. For the average user, the typical configuration should suffice.

Regardless of the application type and what purpose it's going to serve, most people would expect such an installation using Windows. Those expectations were instilled into consumers. As such, developers are conforming to those desires. Right now, we want to install OCS Inventory NG management server. As we know, it requires the AMP stack (Apache web server, MySQL relational database system, and PHP/Perl interpreters).

XAMPP for Windows, the warm-up stage

It should not surprise anyone that developers thought about finding integrated solutions to provide seamless modalities to set up such an AMP suite. That is how the XAMPP suite was born. It is an automated setup that sets up an AMP solution stack and some other useful tools. It supports Windows 2000, Server 2003, XP (SP2 and SP3), Server 2008, as well as Vista and Windows 7. Besides, it's also available for Linux, Solaris, and OS X.

The latest version of XAMPP for Windows at the time of writing is 1.7.2. It was tested and it indeed is fully functional on Windows 7. Should you encounter problems while installing one of the XAMPP versions, then please head over to the support forums. The project is fairly well documented, and there's a little dedicated English section within the forums.

XAMPP 1.7.2 is a collection of the following software products:

  • Apache 2.2.12 (IPv6 enabled) + OpenSSL 0.9.8k
  • MySQL 5.1.37 + PBXT engine
  • PHP 5.3.0
  • phpMyAdmin 3.2.0.1
  • Webalizer 2.21-02 + GeoIP lite
  • FileZilla FTP Server 0.9.32
  • msmtp 1.4.17

From these components, we need the first three. Unless we don't ever plan to run an FTP server from this machine, installing Filezilla FTP Server is optional. The rest of the tools may turn out useful.

We know what you're thinking about right now; in the beginning of this chapter, we were mumbling about an integrated installation package that sets up everything seamlessly. While that is true, it may not be the best decision after all. Let's demystify the situation.

OCS-NG developers integrated the XAMPP package into their installation kit. This gesture is to be appreciated as it helps most people to get the inventory server up and running under Windows OS. The only drawback of the situation is that XAMPP is more often updated than OCS-NG. Since that integrated setup suite was developed, more than a few XAMPP versions were released. This does not mean that the older version isn't enough to set up OCS-NG.

In the case of web servers and relational database systems, it is important to always be on the bleeding edge by having up-to-date releases. We don't want to risk having some uninvited guests from the dark side of wild-wild-web. The latest OCS-NG 1.02.1 setup incorporates the XAMPP 1.6.6a. It is a few releases behind the current stable 1.7.2 one.

Please visit the OCS-NG download section at the official web page:

http://www.ocsinventory-ng.org/index.php?page=downloads

On downloading, if we go ahead and execute the setup, the following warning pops up:

XAMPP for Windows, the warm-up stage

From the previous screenshot, we realize that indeed the setup comes with XAMPP 1.6.6a. In situations where the OCS-NG management server is not going to be located in a DMZ (demilitarized zone), meaning out there on the Internet available to everyone, this may not result in problems. The truth be told, this should never happen. An inventorying system and asset management suite should only be available on the intranet.

However, in the case of really large companies where the intranet gets wide enough and different people have access to specific areas, the situation can get tricky again. Most security flaws are thoroughly discussed, exposed (to the public), but fixed right away. This means that if you stick with an older but vulnerable version, anyone can exploit the said security hole; but if you update to the latest and patched release, the problem is solved.

All in all, the decision is ours. We can go through the integrated setup and choose to install XAMPP 1.6.6a along with the OCS-NG server, or we can download and install the latest XAMPP version beforehand. Once XAMPP is up and running, we can set up OCS Inventory NG server, and the installation wizard detects its presence and won't pop up that warning message.

You can download the latest version of XAMPP for Windows from the following link:

http://www.apachefriends.org/en/xampp-windows.html

We recommend downloading the self-extract archive (.exe format), but either one is alright. Once it's downloaded, we are asked where to unpack it. Let's give a common path like:

%WINDIR%\%PROGRAMFILES%\xampp

After the archive is unpacked, an automated script is executed. Our interaction might be required, but the instructions are straightforward and the actions are verbosely logged.

We can control the status of those services via the XAMPP control panel. That is also the place from where we can administer those roles as well. Either way, if we can see that Apache and MySQL are started and their status is OK ,we can install the OCS Inventory NG server.

Warning: XAMPP 1.6.8-1.7.1—a known issue and solution

There's one final warning regarding XAMPP 1.6.8 or higher version. There was a rather unfinished migration from mod_perl 5.8 and 5.10 and they have forgotten to rebuild the MySQL support for 5.10. This is further detailed in a forum post by dliroulet who is an OCS-NG team member and developer. Check out the following post:

http://forums.ocsinventory-ng.org/viewtopic.php?id=4598

Should you experience problems with the XAMPP 1.7.2 version or higher, there is a known solution. Some necessary Perl 5.10 modules need to be recompiled. Fortunately, EBH (who is also a forum member) posted for us the recompiled package in an archive. We just download and extract into the XAMPP folder!

We can download the updated modules from the following link:

http://oslinux.free.fr/xampp_1.7.1_perl510_update_modules_for_OCS_inventoryNG1.02.1.zip

They are also mirrored at the following address:

http://www.primeranks.net/storage/ocsng/xampp_1.7.1_perl510_update_modules_for_OCS_inventoryNG1.02.1.zip

You should not experience problems with XAMPP 1.7.2 and OCS-NG 1.02.1. However, no matter what, you now know what can be done if such a situation occurs.

Launching the OCS-NG integrated installation

Launching the setup wizard automatically detects the presence of Apache web server along with the required Perl module. This way, it goes further, and the warning message box will not pop up anymore. We click Next and then accept the license agreement once we have gone through the text. After this, the window where we need to choose our install type is displayed. The choices are double: either with or without XAMPP Web Server.

Assuming we have installed XAMPP earlier, then the XAMPP Web Server component will be unticked by default, and only the OCS Inventory NG Server will be chosen to be installed. This kind of install is around 3.5 MB.

On the other hand, if you decided to remain with the integrated XAMPP 1.6.6a, then the setup automatically checks that component as well. This latter situation can be seen in the following screenshot:

Launching the OCS-NG integrated installation

Keep in the mind that you cannot even start the setup without XAMPP! So that means that one way or another, you must install XAMPP earlier than the OCS-NG server.

An integrated installation (XAMPP and OCS-NG server) takes up to 70 MB of disk space. The setup is fast, regardless of whether we choose to install XAMPP or not this time. Once this is done, the following link is opened in a new browser window:

http://localhost/ocsreports/install.php

This link is valid in situations where all four server components of OCS-NG were installed on the same system. This means the installation has finished and there are just a few steps left from having the full-fledged OCS-NG management server ready.

The XAMPP status can be tracked from the Security section as well. This is the web page through which we can administer the installed services.

http://localhost/xampp/index.php

Launching the OCS-NG integrated installation

As a final step, it is important to set the root password for MySQL.

http://localhost/security/xamppsecurity.php