웹사이트 검색

Debian 10에 i-doit 자산 관리 도구를 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. 시작하기\n
  3. LAMP 서버 설치
  4. i-doit용 MariaDB 구성
  5. i-doit 다운로드
  6. i-doit용 Apache 구성
  7. i-doit 웹 인터페이스 액세스
  8. Lets Encrypt Free SSL로 안전한 i-doit\n
  9. 결론

i-doit은 구성 관리 데이터베이스를 기반으로 하는 무료 오픈 소스 및 IT 문서 솔루션입니다. ITIL 모범 사례에 따라 전체 IT 시스템을 관리하는 데 사용할 수 있는 웹 기반 도구입니다. 이 도구를 사용하면 소프트웨어 및 하드웨어 자산과 그 관계를 추적하고 이러한 구성 요소 간의 관계를 시각화할 수 있습니다. 모든 IT 문서 정보를 한 곳에서 저장, 유지 및 구성할 수 있습니다. ITSM 환경에서 한 번만 데이터를 입력할 수 있는 Nagios 및 Request Tracker와 같은 다른 애플리케이션과 쉽게 인터페이스할 수 있습니다.

i-doit을 사용하면 서버, SAN, 그래픽 랙 보기, 클러스터 및 블레이드/섀시 시스템을 포함한 모든 종류의 자산에 대한 전체 IT 인프라에 대한 자세한 개요를 생성할 수 있습니다. IT 문서, 인벤토리, 인프라 계획, 자산 관리, 가상 시스템, IP 주소 관리, 저장 영역 네트워크, 케이블 관리, 티켓 시스템 등을 포함한 다양한 기능이 함께 제공됩니다.

이 튜토리얼에서는 Debian 10에서 i-doit 자산 관리 도구를 설치하고 구성하는 방법을 보여줍니다.

전제 조건

  • 최소 2GB RAM으로 Debian 10을 실행하는 서버.\n
  • 유효한 도메인 이름은 서버 IP 주소로 지정됩니다. 이 튜토리얼에서는 idoit.linuxbuz.com을 사용합니다.\n
  • 루트 암호는 각 서버에 구성됩니다.\n

시작하기

시작하기 전에 시스템을 최신 버전으로 업데이트하는 것이 좋습니다. 다음 명령을 사용하여 시스템을 업데이트할 수 있습니다.

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

시스템을 업데이트한 후 시스템을 다시 시작하여 변경 사항을 적용하십시오.

램프 서버 설치

먼저 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 구성

다음으로 Debian 10에 설정되어 있지 않은 MariaDB 루트 암호를 설정해야 합니다.

이렇게 하려면 다음 명령을 사용하여 MariaDB 셸에 로그인합니다.

mysql

로그인하면 다음 명령을 사용하여 MariaDB 루트 암호를 설정합니다.

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 셸을 종료합니다.

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의 최신 버전은 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 웹 인터페이스에 액세스

웹 브라우저를 열고 URL http://idoit.linuxbuz.com을 입력합니다. 다음 페이지로 리디렉션됩니다.

필요한 모든 PHP 확장이 설치되었는지 확인한 후 다음 버튼을 클릭합니다. 다음 페이지가 표시됩니다.

제안된 디렉토리를 확인하고 다음 버튼을 클릭합니다. 다음 페이지가 표시됩니다.

MariaDB 루트 사용자 이름, 비밀번호, 새 데이터베이스 사용자 이름, 비밀번호, 시스템 데이터베이스 이름을 제공하고 다음 버튼을 클릭합니다. 다음 페이지가 표시됩니다.

관리자 사용자 이름, 비밀번호를 제공하고 다음 버튼을 클릭합니다. 다음 페이지가 표시됩니다.

다음으로 모든 구성을 확인하고 다음 버튼을 클릭합니다. 다음 페이지가 표시됩니다.

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

관리자 사용자 이름, 암호를 제공하고 로그인 버튼을 클릭합니다. 다음 페이지에서 i-doit 대시보드를 볼 수 있습니다.

Lets Encrypt Free 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 자산 관리 도구를 설치하는 방법을 배웠습니다. 또한 무료 SSL을 Lets Encrypt로 보호하는 방법도 배웠습니다. 이제 i-doit 웹 인터페이스를 사용하여 전체 IT 문서를 관리할 수 있습니다.