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 assets and their relations. With i-doit, you can document entire IT systems and their changes, display vital information and ensure stable and efficient operation of IT networks.
It offers a wide range of features including, Asset Management, Infrastructure Planning, Ticket System, Cable Management, Inventory, SAN, IP Address Management, Cluster, Patch Management and many more.
In this tutorial, we will be going to explain how to install I-doit Asset Management System on Ubuntu 20.04.
Prerequisites
- A server running Ubuntu 20.04 with minimum 2GB of RAM.
- A valid domain name pointed with your server IP.
- A root password is configured on the server.
Install LAMP Server
First, you will need to install the Apache web server, MariaDB database server, PHP and other required PHP extensions in your system. You can install all of them 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 the packages are installed, create a new php.ini file for I-doit with 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 finished. Then, apply the configuration and enable the memcached module with the following command:
phpenmod i-doit
phpenmod memcached
Next, restart the Apache service to apply the changes:
systemctl restart apache2
Configure MariaDB for Better Performance
Next, you will need to configure MariaDB server for better performance. You can do it by creating 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 finished. Then, log in to MariaDB shell with the following command:
mysql
Once login, change the MariaDB authentication plugin to mysql_native_password with the following command:
MariaDB [(none)]> SET GLOBAL innodb_fast_shutdown = 0;
MariaDB [(none)]> UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';
Next, flush the privileges and exit from 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-doit
First, you will need to download the latest version of I-doit from the Sourceforge website. You can use 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 root directory with the following command:
unzip idoit-open-1.14.2.zip -d /var/www/html/idoit
Next, change the ownership to the www-data user and set proper permissions with the following command:
chown -R www-data:www-data /var/www/html/idoit/
chmod -R 775 /var/www/html/idoit/
Once you are finished, you can proceed to the next step.
Configure Apache Web Server
Next, create the Apache virtual host configuration file for I-doit.
nano /etc/apache2/sites-available/idoit.conf
Add the following lines:
<VirtualHost *:80> ServerAdmin admin@linuxbuz.com ServerName idoit.linuxbuz.com DirectoryIndex index.php DocumentRoot /var/www/html/idoit <Directory /var/www/html/idoit> AllowOverride All Require all granted </Directory> LogLevel warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Save and close the file when you are finished. Then, enable the virtual host and Apache rewrite module with the following command:
a2ensite idoit
a2enmod rewrite
Next, restart the Apache service to apply the changes:
systemctl restart apache2
Secure I-doit with Let's Encrypt SSL
In order to secure your I-doit website with Let's Encrypt SSL, you will need to install the Certbot client package in your server. You can install it with the following command:
apt-get install python3-certbot-apache -y
Once installed, run the following command to secure your website with Let's Encrypt SSL:
certbot --apache -d idoit.linuxbuz.com
You will need to provide your valid email address and accept the term of service as shown below:
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): hitjethva@gmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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
Next, select whether or not 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 hit Enter to install the 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
Once you are finished, you can proceed to the next step.
Access I-doit Web Interface
Now, open your web browser and access the I-doit using the URL https://idoit.linuxbuz.com. You should see the system check screen:
Make sure all required packages are installed. Then, click on the Next button. You should see the directory configuration screen:
Provide your desired filemanager directory path and click on the Next button. You should see the database configuration screen:
Provide your desired database information and click on the Next button. You should see the admin user configuration screen:
Provide your admin username, password and click on the Next button. You should see the configuration preview screen:
Click on the Next button to start the installation. Once the installation hasĀ been finished, you should see the following screen:
Click on the Next button. You should see the I-doit login screen:
Provide your admin username, password and click on the Login button. You should see the I-doit dashboard in the following screen:
Conclusion
Congratulations! you have successfully 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.