웹사이트 검색

Ubuntu 20.04 LTS에 i-doit 자산 관리 도구를 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. LAMP 서버 설치
  3. 더 나은 성능을 위해 MariaDB 구성\n
  4. I-doit 다운로드
  5. Apache 웹 서버 구성
  6. Lets Encrypt SSL로 안전한 I-doit\n
  7. I-doit 웹 인터페이스 액세스
  8. 결론

I-doit은 전체 IT 시스템을 관리할 수 있는 오픈 소스 자산 관리 도구입니다. 소프트웨어 및 하드웨어 자산과 그 관계를 추적할 수 있는 완전한 오픈 소스 구성 관리 및 데이터베이스를 기반으로 합니다. i-doit을 사용하면 전체 IT 시스템과 변경 사항을 문서화하고 중요한 정보를 표시하며 IT 네트워크의 안정적이고 효율적인 운영을 보장할 수 있습니다.

자산 관리, 인프라 계획, 티켓 시스템, 케이블 관리, 인벤토리, SAN, IP 주소 관리, 클러스터, 패치 관리 등 다양한 기능을 제공합니다.

이 튜토리얼에서는 Ubuntu 20.04에 I-doit Asset Management System을 설치하는 방법에 대해 설명합니다.

전제 조건

  • 최소 2GB의 RAM이 있는 Ubuntu 20.04를 실행하는 서버.\n
  • 서버 IP를 가리키는 유효한 도메인 이름입니다.\n
  • 루트 암호는 서버에서 구성됩니다.\n

램프 서버 설치

먼저 시스템에 Apache 웹 서버, MariaDB 데이터베이스 서버, PHP 및 기타 필요한 PHP 확장을 설치해야 합니다. 다음 명령으로 모두 설치할 수 있습니다.

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

모든 패키지가 설치되면 원하는 값으로 I-doit용 새 php.ini 파일을 만듭니다.

nano /etc/php/7.4/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

완료되면 파일을 저장하고 닫습니다. 그런 다음 구성을 적용하고 다음 명령을 사용하여 memcached 모듈을 활성화합니다.

phpenmod i-doit
phpenmod memcached

다음으로 Apache 서비스를 다시 시작하여 변경 사항을 적용합니다.

systemctl restart apache2

더 나은 성능을 위해 MariaDB 구성

다음으로 더 나은 성능을 위해 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 셸에 로그인합니다.

mysql

로그인한 후 다음 명령을 사용하여 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 셸을 종료합니다.

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

마지막으로 MariaDB 서비스를 다시 시작하여 변경 사항을 적용합니다.

systemctl restart mariadb

다운로드

먼저 Sourceforge 웹사이트에서 최신 버전의 I-doit을 다운로드해야 합니다. wget 명령을 사용하여 다운로드할 수 있습니다.

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

다운로드가 완료되면 다음 명령을 사용하여 다운로드한 파일의 압축을 Apache 웹 루트 디렉터리에 풉니다.

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

다음으로 소유권을 www-data 사용자로 변경하고 다음 명령을 사용하여 적절한 권한을 설정합니다.

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

완료되면 다음 단계로 진행할 수 있습니다.

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>

완료되면 파일을 저장하고 닫습니다. 그런 다음 다음 명령을 사용하여 가상 호스트 및 Apache 재작성 모듈을 활성화합니다.

a2ensite idoit
a2enmod rewrite

다음으로 Apache 서비스를 다시 시작하여 변경 사항을 적용합니다.

systemctl restart apache2

Lets Encrypt SSL로 안전한 I-doit

Lets Encrypt SSL로 I-doit 웹사이트를 보호하려면 서버에 Certbot 클라이언트 패키지를 설치해야 합니다. 다음 명령으로 설치할 수 있습니다.

apt-get install python3-certbot-apache -y

설치가 완료되면 다음 명령을 실행하여 Lets Encrypt 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
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

다음으로 아래와 같이 HTTP 트래픽을 HTTPS로 리디렉션할지 여부를 선택합니다.

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

2를 입력하고 Enter 키를 눌러 웹사이트에 Lets Encrypt SSL을 설치합니다.

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

완료되면 다음 단계로 진행할 수 있습니다.

I-doit 웹 인터페이스에 액세스

이제 웹 브라우저를 열고 URL https://idoit.linuxbuz.com을 사용하여 I-doit에 액세스합니다. 시스템 확인 화면이 표시되어야 합니다.

필요한 모든 패키지가 설치되어 있는지 확인하십시오. 그런 다음 다음 버튼을 클릭합니다. 디렉터리 구성 화면이 표시되어야 합니다.

원하는 파일 관리자 디렉토리 경로를 제공하고 다음 버튼을 클릭합니다. 데이터베이스 구성 화면이 표시되어야 합니다.

원하는 데이터베이스 정보를 제공하고 다음 버튼을 클릭합니다. 관리자 사용자 구성 화면이 표시되어야 합니다.

관리자 사용자 이름, 비밀번호를 제공하고 다음 버튼을 클릭합니다. 구성 미리보기 화면이 표시되어야 합니다.

다음 버튼을 클릭하여 설치를 시작합니다. 설치가 완료되면 다음 화면이 표시됩니다.

다음 버튼을 클릭합니다. I-doit 로그인 화면이 나타납니다.

관리자 사용자 이름, 암호를 제공하고 로그인 버튼을 클릭합니다. 다음 화면에 I-doit 대시보드가 표시되어야 합니다.

결론

축하합니다! Lets Encrypt SSL을 사용하여 Ubuntu 20.04에 I-doit 자산 관리 시스템을 성공적으로 설치했습니다. 이제 웹 브라우저를 통해 하드웨어 및 소프트웨어 자산을 관리할 수 있습니다. 궁금한 점이 있으면 언제든지 문의해 주세요.