如何在 Debian 10 上安装 i-doit 资产管理工具如何在 Debian 10 上安装 i-doit 资产管理工具如何在 Debian 10 上安装 i-doit 资产管理工具如何在 Debian 10 上安装 i-doit 资产管理工具
  • 文章
  • 正则表达式
    • 工具
  • 登录
找到的结果: {phrase} (显示: {results_count} 共: {results_count_total})
显示: {results_count} 共: {results_count_total}

加载更多搜索结果...

搜索范围
模糊匹配
搜索标题
搜索内容
发表 admin at 2025年2月28日
类别
  • 未分类
标签

如何在 Debian 10 上安装 i-doit 资产管理工具

在此页

  1. 先决条件
  2. 开始
  3. 安装 LAMP 服务器
  4. 为 i-doit 配置 MariaDB
  5. 下载 i-doit
  6. 为 i-doit 配置 Apache
  7. 访问 i-doit 网络界面
  8. 使用 Lets Encrypt 免费 SSL 保护 i-doit
  9. 结论

i-doit 是一个基于配置管理数据库的免费、开源和 IT 文档解决方案。它是一种基于 Web 的工具,可用于根据 ITIL 最佳实践管理整个 IT 系统。使用此工具,您可以跟踪软件和硬件资产及其关系,并可视化这些组件之间的关系。您可以在一处存储、维护和组织所有 IT 文档信息。它可以很容易地连接到其他应用程序,如 Nagios 和 Request Tracker,允许您在 ITSM 环境中仅输入一次数据。

i-doit 使您能够为各种资产创建整个 IT 基础设施的详细概览,包括服务器、SAN、图形机架视图、集群和刀片/机箱系统。它具有一组丰富的功能,包括 IT 文档、库存、基础设施规划、资产管理、虚拟系统、IP 地址管理、存储区域网络、电缆管理、票务系统等等。

在本教程中,我们将向您展示如何在 Debian 10 上安装和配置 i-doit 资产管理工具。

先决条件

  • 一台运行 Debian 10 的服务器,最低 2GB 内存。
  • 使用您的服务器 IP 地址指向一个有效的域名。在本教程中,我们将使用 idoit.linuxbuz.com。
  • 在每台服务器上都配置了根密码。

入门

在开始之前,最好使用最新版本更新您的系统。您可以使用以下命令更新您的系统:

apt-get update -y
apt-get upgrade -y

更新系统后,重新启动它以实施更改。

安装 LAMP 服务器

首先,您需要为您的系统安装 Apache、MariaDB、PHP 和其他所需的 PHP 扩展。您可以使用以下命令安装所有这些:

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

安装所有包后,您将需要创建一个单独的 i-doit.ini PHP 文件,其中包含所需的设置。

您可以使用以下命令创建它:

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

添加以下行:

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

完成后保存并关闭文件。然后,使用以下命令启用所需的 PHP 模块:

phpenmod i-doit
phpenmod memcached

最后,重启 Apache 服务以实现更改:

systemctl restart apache2

为 i-doit 配置 MariaDB

接下来,您需要设置一个 MariaDB root 密码,因为它没有在 Debian 10 中设置。

为此,请使用以下命令登录到 MariaDB shell:

mysql

登录后,使用以下命令设置 MariaDB root 密码:

MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("yournewpassword");

接下来,使用以下命令将 MariaDB 身份验证插件设置为 mysql_native_password:

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

接下来,使用以下命令刷新权限并退出 MariaDB shell:

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

接下来,创建一个单独的 MariaDB 配置文件以获得最佳性能:

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

添加以下行:

[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 = ""

最后,重新启动 MariaDB 服务以应用更改:

systemctl restart mariadb

下载 i-doit

在撰写本文时,最新版本的 i-doit 是 1.14。您可以使用以下命令下载它:

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

下载完成后,将下载的文件解压到Apache根目录:

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

接下来,为 i-doit 目录授予适当的权限:

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

完成后,您可以继续下一步。

为 i-doit 配置 Apache

接下来,您需要为 i-doit 配置一个 Apache 虚拟主机配置文件。您可以使用以下命令创建它:

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

添加以下行:

<VirtualHost *:80>
        ServerAdmin 
        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>

完成后保存并关闭文件。然后,使用以下命令启用 i-doit 虚拟主机文件和 Apache 重写模块:

a2ensite i-doit
a2enmod rewrite

最后,重启 Apache 服务以实现更改:

systemctl restart apache2

访问 i-doit Web 界面

打开 Web 浏览器并输入 URL http://idoit.linuxbuz.com。您将被重定向到以下页面:

确保安装了所有必需的 PHP 扩展,然后单击下一步按钮。您应该会看到以下页面:

检查建议的目录并单击下一步按钮。您应该会看到以下页面:

提供 MariaDB 根用户名、密码、新数据库用户名、密码、系统数据库名称,然后单击下一步按钮。您应该会看到以下页面:

提供您的管理员用户名和密码,然后单击“下一步”按钮。您应该会看到以下页面:

接下来,验证所有配置并单击“下一步”按钮。您应该会看到以下页面:

单击“下一步”按钮开始安装。安装完成后,您应该会看到以下页面:

提供您的管理员用户名和密码,然后单击“登录”按钮。您应该在以下页面中看到 i-doit 仪表板:

使用 Lets Encrypt 免费 SSL 保护 i-doit

安装 i-doit 后,建议使用 Lets Encrypt 免费 SSL 对其进行保护。您可以使用 Certbot 客户端保护它。

默认情况下,Certbot 客户端包在 Debian 10 默认存储库中不可用。您可以使用以下命令添加它:

echo "deb http://ftp.debian.org/debian buster-backports main" >> /etc/apt/sources.list

接下来,更新存储库并使用以下命令安装 Certbot 客户端:

apt-get update -y
apt-get install python-certbot-apache -t buster-backports

安装后,运行以下命令为您的域获取并安装 SSL 证书:

certbot --apache -d idoit.linuxbuz.com

系统将提示您接受服务条款并提供您的有效电子邮件地址,如下所示:

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): 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
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

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.

接下来,您需要选择是否将 HTTP 流量重定向到 HTTPS,如下所示:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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

键入 2 并按 Enter 键继续。安装完成后,您应该得到以下输出:

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-04-30. 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

恭喜!您的 i-doit 网站现在使用 Lets Encrypt SSL 进行保护。您现在可以使用 URL https://idoit.linuxbuz.com 安全地访问它。

结论

在上面的教程中,我们学习了如何在 Debian 10 上安装 i-doit 资产管理工具。我们还学习了如何使用 Lets Encrypt 免费 SSL 来保护它。您现在可以使用 i-doit 网络界面管理整个 IT 文档。

©2015-2025 艾丽卡 support@alaica.com