Home / How To / How to install i-doit Asset Management Tool on Ubuntu 20.04 LTS

How to install i-doit Asset Management Tool on Ubuntu 20.04 LTS



I-doit is an open source asset management tool that can be used to manage the entire IT system. It is based on a complete open source configuration management and database that allows you to keep track of software and hardware and their relationships. With i-doit, you can document entire IT systems and their changes, display important information and ensure stable and efficient operation of IT networks.

It offers a wide range of features including, asset management, infrastructure planning, ticketing systems, cable management, inventory, SAN, IP address management, clusters, patch management and many more.

In this tutorial we will explain how to install I-doit Asset Management System on Ubuntu 20.04.

conditions

  • A server running Ubuntu 20.04 with at least 2 GB of RAM.
  • A valid domain name pointed to your server IP.
  • A root password is configured on the server.

Install LAMP Server

First you need to install the Apache web server, MariaDB database server, PHP and other necessary PHP add-ons in your system. You can install all with the following command:

apt-get install apache2 mariadb-server libapache2-mod-php7.4 php7.4-bcmath php7.4-cli php7.4-common php7.4-curl php7.4-gd php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-soap php7.4-xml php7.4-zip php7.4-imagick php7.4-memcached unzip wget curl memcached moreutils -y

Once all packages have been installed, create a new php.ini file for I-doit with the desired values:

nano /etc/php/7.4/mods-available/i-doit.ini

Add the following lines:

allow_url_fopen = Yes
file_uploads = On
magic_quotes_gpc = Off
max_execution_time = 300
max_file_uploads = 42
max_input_time = 60
max_input_vars = 10000
memory_limit = 256M
post_max_size = 128M
register_argc_argv = On
register_globals = Off
short_open_tag = On
upload_max_filesize = 128M
display_errors = Off
display_startup_errors = Off
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors = On
default_charset = "UTF-8"
default_socket_timeout = 60
date.timezone = Asia/Kolkata
session.gc_maxlifetime = 604800
session.cookie_lifetime = 0
mysqli.default_socket = /var/run/mysqld/mysqld.sock

Save and close the file when you are done. Then use the configuration and activate the memcached module with the following command:

phpenmod i-doit
phpenmod memcached

Then restart the Apache service to apply the changes:

systemctl restart apache2

Configure MariaDB for better performance

Next, you need to configure the MariaDB server for better performance. You can do this by creating a new configuration file:

nano /etc/mysql/mariadb.conf.d/99-i-doit.cnf

Add the following lines:

[mysqld]
innodb_buffer_pool_size = 1G
innodb_buffer_pool_instances = 1
innodb_log_file_size = 512M
innodb_sort_buffer_size = 64M
sort_buffer_size = 262144 # default
join_buffer_size = 262144 # default
max_allowed_packet = 128M
max_heap_table_size = 32M
query_cache_min_res_unit = 4096
query_cache_type = 1
query_cache_limit = 5M
query_cache_size = 80M
tmp_table_size = 32M
max_connections = 200
innodb_file_per_table = 1
innodb_thread_concurrency = 0
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
innodb_lru_scan_depth = 2048
table_definition_cache = 1024
table_open_cache = 2048
innodb_stats_on_metadata = 0
sql-mode = ""

Save and close the file when you are done. Then log in to the MariaDB shell with the following command:

mysql

After logging in, change the MariaDB authentication plugin to mysql_native_password using the following command:

MariaDB [(none)]> SET GLOBAL innodb_fast_shutdown = 0;
MariaDB [(none)]> UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User="root";

Then flush the privileges and leave the MariaDB shell with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Finally, restart the MariaDB service to apply the changes:

systemctl restart mariadb

Download I-must

First, you need to download the latest version of I-doit from the Sourceforge website. You can use the wget command to download it:

wget https://excellmedia.dl.sourceforge.net/project/i-doit/i-doit/1.14/idoit-open-1.14.zip

Once downloaded, unzip the downloaded file to the Apache Web Directory directory using the following command:

unzip idoit-open-1.14.2.zip -d /var/www/html/idoit

Then change the ownership of the www data user and set the correct permissions with the following command:

chown -R www-data:www-data /var/www/html/idoit/
chmod -R 775 /var/www/html/idoit/

When you are done, you can move on to the next step.

Configure Apache Web Server

Then create the Apache I-doit virtual host configuration file.

nano /etc/apache2/sites-available/idoit.conf

Add the following lines:


        ServerAdmin [email protected]
        ServerName  idoit.linuxbuz.com
        DirectoryIndex index.php
        DocumentRoot /var/www/html/idoit
        
                AllowOverride All
                Require all granted
        
        LogLevel warn
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

Save and close the file when you are done. Then activate the virtual host and Apache rewrite module with the following command:

a2ensite idoit
a2enmod rewrite

Then restart the Apache service to apply the changes:

systemctl restart apache2

Secure I-doit with Let’s Encrypt SSL

To secure your I-doit website with Let’s Encrypt SSL, you need to install the Certbot client package on your server. You can install it with the following command:

apt-get install python3-certbot-apache -y

After installing, run the following command to secure your site with Let’s Encrypt SSL:

certbot --apache -d idoit.linuxbuz.com

You must enter your valid email address and accept the service shown below:advertisement

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for idoit.linuxbuz.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/idoit-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/idoit-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/idoit-le-ssl.conf

Then select whether to redirect HTTP traffic to HTTPS as shown below:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Type 2 and struck Get on to install Let’s Encrypt SSL for your website:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/idoit.conf to ssl vhost in /etc/apache2/sites-available/idoit-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://idoit.linuxbuz.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=idoit.linuxbuz.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/idoit.linuxbuz.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/idoit.linuxbuz.com/privkey.pem
   Your cert will expire on 2020-10-17. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

When you are done, you can move on to the next step.

Access to I-must web interface

Now open your browser and access I-doit with the URL https://idoit.linuxbuz.com. You should see the system control screen:

System Control

Make sure all the necessary packages are installed. Then click on Next button. You should see the directory configuration screen:

Product Configuration

Enter the desired file manager directory path and click Next button. You should see the database configuration screen:

database Configuration

Enter the desired database information and click Next button. You should see the Administrator Configuration screen:

Administrator Tasks

Enter your username, password and click Next button. You should see the configuration preview screen:

Final configuration check

click Next to start the installation. When the installation is complete, you will see the following screen:

The installation process

click Next button. You should see the I-doit login screen:

I have to log in

Enter your username, password and click Sign in button. You should see the I-doit dashboard on the following screen:

I-Doit Asset Management Tool

Conclusion

Congratulations! you have installed I-doit Asset Management System on Ubuntu 20.04 with Let’s Encrypt SSL. You can now manage your hardware and software assets through a web browser. Feel free to ask me if you have any questions.


Source link