
OCSNG Inventory Let’s do an inventory! f you’re the administrator on any network, web applications that are written in PHP, and chances are you’ve already faced the need that relies on databases. Ito make an inventory. In fact, keeping a list Several webservers, such as lighttpd or of all the computers, monitors, software and mini-httpd, can be used, but you’ll probably other component of the network up-to-date is be better off using Apache, as it’s the most always both hard and tedious. widely used webserver on the internet. That But if those lists aren’t kept up-to-date, way, you’ll have plenty of documentation it often leads to outdated machines being available if need be. There is no point to look kept around or to installing more copies of a at older versions of Apache (1.3), instead use software than the number of licenses availa- the latest one available through Debian’s re- ble. But stop worrying, as Debian can be positories (2.2), so that your installation will easily transformed into an inventory server: benefit from the latest innovations and will just follow this short installation procedure, remain usable for a long time. and then all will happen automatically. Follow As far as databases are concerned, make the guide! your life simpler and choose MySQL, which is considered to be the most user-friendly data- Preparing the installation base. Just get the latest version, version 5, The installation of the two applications, from the Debian packages repositories. OCSNG Inventory and GLPI, that are going to Lastly, OCSNG Inventory and GLPI require change your Debian in an inventory server re- two command interpreters: PHP and PERL. quire some preparation. The two of them are Keep in mind that using PHP 5 should be favored over PHP 4, because the second is unmaintained since the end of 2007. So try to use maintai- ned and updated software whenever possible. Now, let’s get to work. There’s no manual compilation or otherwise weird installation procedures to fol- low, all you need are the standard Debian tools: aptitude install apache2 ↵ libapache2-mod-perl2 ↵ libapache2-mod-php5 php5 ↵ php5-gd php5-mysql php5-cgi ↵ mysql-server Your LAMP architecture (LAMP stands for Linux-Apache-MySQL- PHP) is now deployed. If you want to do so, you can test it by going to the /var/www folder (cd /var/www). Create a file named test.php (touch test.php), and edit this file, using nano for example (nano test.php). Figure 1. OCS keeps track of all the computers and servers on the network Inside, put the following: 24 LINUX IDENTITY SET www.linuxidentity.com 25 ration) is the application that’ll keep track of the computers composing your network. It is a free (as in free beer and free speech) software, and is licensed under the terms of the GPLv2. First, grab the package. Go to /var/www (cd /var/www) and use this command: wget http://prdownloads.sour ↵ ceforge.net/ocsinventory/ ↵ OCSNG_LINUX_SERVER_ ↵ 1.01.tar.gz Extract the content of the archive with the following command: tar xvzf OCSNG_LINUX_SERVER_ ↵ 1.01.tar.gz cd OCSNG_LINUX_SERVER_1.01 The next step will be automatic, as an installation script is included with OCS Inventory NG. But before run- Figure 2. OCS is configured through a web-based interface ning this script, you’ll have to install some complementary packages. <? It would be a good idea to use the Most of those are perl libraries and phpinfo(); same password than the one used compilation tools needed for the OCS ?> by the “linux” root user, or else chan- Inventory NG server to run. Once ces are that you’ll forget the MySQL again, make use of the power of Open your web browser, and type one. If you came out of this alive, aptitude: in this address: we can get into the core of the task at hand, by installing OCS Inventory aptitude install libxml- ↵ http://127.0.0.1/test.php NG. simple-perl libapache-dbi- ↵ ↵ Installing OCS perl libnet-ip-perl A page should be displayed, and it libsoap-lite-perl should be a summary of your PHP Inventory NG configuration. If that is not the case, OCS Inventory NG (Open Computer You’re now ready to run the installa- there’s something wrong, so get back and Software Inventory Next Gene- tion script: to the start and try again, making sure you’re following the steps correctly. To conclude this first part, secure your MySQL server by assigning a password for the root user. By default, when you ins- tall MySQL from the Debian repositories, the root user (the administrator of the database server) doesn’t have any kind of password. To fix that, use the following command: mysqladmin -u root password ↵ 'your_MySQL_admin_ ↵ password' Figure 3. The GLPI interface 24 LINUX IDENTITY SET www.linuxidentity.com 25 OCSNG Inventory sh setup.sh You’ll be presented with a set of questions, most of them are self- explanatory, and you can select the default answers. An exception to this rule is the question “Where is Apache root document directory”, to which you should answer with the path where your web documents are loca- ted, that is /var/www. Next, as you’re told at the end of the execution of the script, restart apache: /etc/init.d/apache2 restart You’re not done yet with OCS Invento- ry NG, you have to proceed to the da- tabase installation. This time around, you’ll be working with a web-based Figure 4. The reservation tool of GLPI interface. So fire up your browser and point it to: because no computer has been in- libxml-sax-perl libxml-↵ ventoried yet. To change that, the OCS simple-perl po-debconf make http://127.0.0.1/ocsreports Inventory client must be installed on every computer in the network. Then download the OCS client: A page should open, and you can The OCS Inventory client fill in your MySQL configuration pa- wget http://prdownloads.sour ↵ rameters. Here is what you should It doesn’t matter if the network’s ma- ceforge.net/ocsinventory/ ↵ mention: chines are running Linux or Windows, OCSNG_LINUX_AGENT_1.01_ ↵ you have to install a client on every with_require.tar.gz MySql login : root one of them either way. Under Win- MySql password : "your_MySQL_ ↵ dows, it’s really easy: download the Extract the contents of the archive: admin_password" client at the following location: MySql HostName : 127.0.0.1 tar xvzf OCSNG_LINUX_AGENT_ ↵ http://prdownloads.sourcefor ↵ 1.01_with_require.tar.gz The OCS database then proceeds ge.net/ocsinventory/OCSNG_ ↵ cd OCSNG_LINUX_AGENT_1.01 to install itself automatically. When WIN32_AGENT_1.01_repack.zip it’s done, click on the Send button Just as you’ve done to install the ser- at the bottom of the page. And there Next, uncompress the software and ver, run the install script to compile you have it, the installation is com- run the OcsAgentSetup.exe executa- and set up the client: pleted. Connect to the web interface ble. Just type in the OCS Inventory by either clicking on the link that you server’s address and you’re done. sh setup.sh will be given, or by entering the fol- On Linux systems, it’s a little more lowing URL: complicated, as you’ll have to compi- The script will ask you a set of ques- le the software yourself. For a typical tions, and here are the answers you http://127.0.0.1/ocsreports Debian system, install the necessary should give it to end up with a typical packages: installation: Click on the flag representing your language, then login into the inter- aptitude install libcompress- ↵ Which method will you use to ↵ face by using the admin both as zlib-perl libnet-ip-perl ↵ generate the inventory? ↵ the login name and the password. libnet-ssleay-perl libwww- ↵ Http Change the admin user’s password perl libxml-simple-perl ↵ Which host is running OCS ↵ right away: click on the purple icon libssl-dev libmail- ↵ Inventory NG Communication ↵ with a key, in the upper-right corner sendmail-perl intltool- ↵ Server? The OCS server’s ↵ of the page. debian gettext libxml- ↵ address Once the password has been mo- libxml-common-perl libxml- ↵ On which port is running OCS ↵ dified, go back to the main screen. libxml-perl libxml- ↵ Inventory NG Communication ↵ As you can see, there’s nothing there namespacesupport-perl ↵ Server? 80 26 LINUX IDENTITY SET www.linuxidentity.com 27 The next steps can be carried out using a web-interface. First, you have to set some things up for GLPI to ins- tall its database automatically. Open up a web browser and go to: http://127.0.0.1/glpi The application is going to ask you several questions, the first being about the language you’d rather use. Then, accept the terms of the GPL license to proceed. After that, click on Install. Your setup will be tested, and there shouldn’t be any error (no lines of red text), so click on continue. You then have to input Figure 5. GLPI also provides helpdesk functionalities your MySQL parameters, as follow: What is the value of TAG? The ↵ Extract its contents: name of the computer Mysql server: 127.0.0.1 tar xvzf glpi-0.70.tar.gz Mysql user: root If no error message gets displayed, Mysql pass: "your_MySQL_ ↵ all is well, and the client is success- A GLPI is created. This time, there’s admin_password" fully installed. In most cases, a first no need to compile anything or to run synchronization between your com- any install script.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-