How to install OCSInvntory on Ubuntu 18.04?

1
14062

In today’s world, organizations are moving at the level of increasingly demanding users. To ensure that companies have the right view of things every day, they need to control the assets they have, part of which is computer equipment. We are talking about the inventory of computer equipment.

Inventories are tangible goods held for sale in the ordinary course of business or to be consumed in the production of goods or services for subsequent marketing.

It’s usually a tedious process carried out manually, but thanks to the efforts of some developers, it’s possible to do it automatically and efficiently with OCSInventory.

OCSInventory allows you to collect hardware and software inventory from all active devices on the network, such as computers, switches, routers, network printers and unattended devices. It Supports for multiple operating systems, including Microsoft Windows, Linux, * BSD, Sun Solaris, IBM AIX, HP-UX, MacOS X. It has the ability to support Plugins and integrates seamlessly with GLPI.

Let’s install it!!

First of all we must be root users. We open a terminal and write:

1.- Logging as root user
1.- Logging as root user

After entering the password we will be root users. Then we installed LAMP Stack.

2.- Installing LAMP
2.- Installing LAMP

Once the installation of the packages is finished we will have a basic web server. Now we proceed to install basic compilation packages.

3.- Installing build essentials
3.- Installing build essentials

Next we must install some perl modules needed.

4.- PERL Modules
4.- PERL Modules

Now we write:

5.- Perl Modules
5.- Perl Modules

We install other necessary php modules.

6.- Installing php modules
6.- Installing php modules

We now proceed to download the OSCInventory.

7.- Downloading OCSInventory
7.- Downloading OCSInventory

Now we unzip the archive.

8.- Unziping file
8.- Unziping file

Now we rename the folder, and move it to our apache root directory:

Before starting the installation, we installed other necessary php modules.

9.- Installing php extra modules
9.- Installing php extra modules

Now we enter the directory and run the setup.sh script

and:

Running it will ask us many questions about configuration file locations, executable files and check the installed PERL modules. In the end, if everything went well, we should get the message that the installation was successful.

10.- Running the installation script
10.- Running the installation script
11.- Running the installation script
11.- Running the installation script
12.- Running the installation script
12.- Running the installation script

Before running its web interface, we must copy the apache configuration that the installer creates as a new apache site.

Finally, we make sure we have permissions on the /var/lib/ocsinventory-reports/ folder and we restart apache.

Accessing the web interface

Now we can access the web interface from our browser:

http://localhost/OCS/ocsreports

Note: Remember that the path might be different, so it is important to be careful about assigning folder names.

13.- Running the OSCInventory web interface
13.- Running the OSCInventory web interface

As we can notice, we skip the warning that we can’t build larger 2mb packages, so we must modify that value in the PHP configuration file.

We will modify the parameters: upload_max_filesize and post_max_size

14.- Modifying the php configuration file
14.- Modifying the php configuration file
15.- Modifying the php configuration file
15.- Modifying the php configuration file

And we restart Apache:

When accessing again, we notice that the warning continues but 250mb is a suitable value that should not cause problems.

16.- Completing the installation
16.- Completing the installation

When you click on send, it will take a while to complete the installation and then inform us that we can access with user admin and password admin

17.- Installation success
17.- Installation success of OCSInventory

By clicking on the link below, we can then log in.

18.- Logging in
18.- Logging in

Then when you log in, and check that everything is OK, we must remove the installer. As a recommendation you should change the password for mariadb.

19.- Dashboard of OCSInventory
19.- Dashboard of OCSInventory

Now we would have to install the agent in each of the computers that we want to inventory.

As a conclusion we can say that OCSInventory is an interesting application in the world of organizations that allows us to have an updated and reliable inventory of all our computer equipment.

Please share this article on your social networks.

Spread the love
  • 5
    Shares

PS. If you like this post please share it with your friends on the social networks using the buttons above.Thanks.

1 COMMENT

  1. Buenas, no se por qué, pero siempre recibo este error al instalar ocs:

    Checking for DBI PERL module…
    Found that PERL module DBI is available.
    Checking for Apache::DBI PERL module…
    Found that PERL module Apache::DBI is available.
    Checking for DBD::mysql PERL module…
    *** ERROR: PERL module DBD::mysql is not installed !
    Checking for Compress::Zlib PERL module…
    Found that PERL module Compress::Zlib is available.
    Checking for XML::Simple PERL module…
    Found that PERL module XML::Simple is available.
    Checking for Net::IP PERL module…
    Found that PERL module Net::IP is available.
    Checking for SOAP::Lite Perl module…
    Found that PERL module SOAP::Lite is available.
    Checking for Archive::Zip Perl module…
    Found that PERL module Archive::Zip is available.
    *** ERROR: There is one or more required PERL modules missing on your computer !
    Please, install missing PERL modules first.

LEAVE A REPLY

Please enter your comment!
Please enter your name here