웹사이트 검색

Ubuntu 20.04에 TeamPass Password Manager를 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. LAMP 서버 설치
  3. TeamPass 데이터베이스 생성
  4. TeamPass 다운로드
  5. Apache 웹 서버 구성
  6. Lets Encrypt SSL로 TeamPass 보안 유지
  7. TeamPass 웹 UI 액세스
  8. 결론

TeamPass는 암호를 관리하고 팀 구성원 간에 암호를 공유하는 데 사용되는 공동 작업 암호 관리자입니다. MySQL/MariaDB 데이터베이스를 사용하여 암호를 안전하게 저장합니다. 사용자 역할에 따라 암호 액세스를 사용자 정의하는 강력한 도구를 제공합니다. 무료 오픈 소스 소프트웨어이며 각 사용자에 대해 정의된 액세스 권한과 관련하여 조직적인 방식으로 암호 및 관련 데이터를 관리할 수 있습니다. 데이터 암호화, 개인 폴더, 트리 구조, 사용자 권한, 역할 정의 등을 포함한 다양한 기능이 제공됩니다.

이 튜토리얼에서는 Lets Encrypt SSL을 사용하여 Ubuntu 20.04에 TeamPass Password Manager 소프트웨어를 설치하는 방법을 보여줍니다.

전제 조건

  • Ubuntu 20.04를 실행하는 서버.\n
  • 유효한 도메인 이름은 서버 IP로 지정됩니다.\n
  • 루트 암호는 서버에서 구성됩니다.\n

램프 서버 설치

시작하기 전에 LAMP 서버가 서버에 설치되어 있어야 합니다. 설치되지 않은 경우 다음 명령을 실행하여 다른 패키지와 함께 설치할 수 있습니다.

apt-get install apache2 mariadb-server php7.4 php7.4-cli libapache2-mod-php7.4 php7.4-mysql php7.4-curl php7.4-mbstring php7.4-bcmath php7.4-common php7.4-gd php7.4-xml git wget -y

LAMP 서버가 설치되면 php.ini 파일을 편집하고 일부 설정을 변경합니다.

nano /etc/php/7.4/apache2/php.ini

다음 줄을 수정합니다.

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata

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

TeamPass 데이터베이스 생성

다음으로 TeamPass용 데이터베이스와 사용자를 생성해야 합니다. 먼저 다음 명령을 사용하여 MariaDB 셸에 로그인합니다.

mysql -u root

로그인한 후 다음 명령을 사용하여 TeamPass용 데이터베이스 및 사용자를 생성합니다.

MariaDB [(none)]> create database teampass;
MariaDB [(none)]> grant all privileges on teampass.* to identified by "password";

그런 다음 권한을 플러시하고 다음 명령을 사용하여 MariaDB를 종료합니다.

MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

데이터베이스가 생성되면 다음 단계로 진행할 수 있습니다.

팀패스 다운로드

먼저 Git 저장소에서 최신 버전의 TeamPass를 다운로드해야 합니다. 다음 명령을 사용하여 Apache 웹 루트 디렉터리에 다운로드할 수 있습니다.

cd /var/www/html
git clone https://github.com/nilsteampassnet/TeamPass.git

다운로드가 완료되면 소유권을 www-data 사용자로 변경하고 다음 명령을 사용하여 적절한 권한을 설정합니다.

chown -R www-data.www-data /var/www/html/TeamPass/
chmod -R 775 /var/www/html/TeamPass/

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

Apache 웹 서버 구성

먼저 다음 명령을 사용하여 TeamPass용 Apache 가상 호스트 구성 파일을 만듭니다.

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

다음 줄을 추가합니다.

<VirtualHost *:80>   
     ServerAdmin 
     DocumentRoot /var/www/html/TeamPass   
     ServerName teampass.linuxbuz.com

     <Directory /var/www/html/TeamPass>      
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>   

     ErrorLog ${APACHE_LOG_DIR}/teampass_error.log
     CustomLog ${APACHE_LOG_DIR}/teampass_access.log combined

</VirtualHost>  

완료되면 파일을 저장하십시오. 그런 다음 Apache 가상 호스트 파일을 활성화하고 Apache 서비스를 다시 시작하여 변경 사항을 적용합니다.

a2ensite teampass
systemctl restart apache2

Apache 웹 서버가 구성되면 다음 단계를 진행할 수 있습니다.

Lets Encrypt SSL로 TeamPass 보호

.먼저 서버에 Certbot Lets Encrypt 클라이언트를 설치해야 합니다. 도메인에 대한 Lets Encrypt SSL 인증서를 설치하고 관리하는 데 사용됩니다. 다음 명령을 실행하여 Certbot을 설치합니다.

apt-get install python3-certbot-apache -y

Certbot이 설치되면 다음 명령을 실행하여 웹사이트용 Lets Encrypt SSL을 다운로드하고 설치합니다.

certbot --apache -d teampass.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 teampass.linuxbuz.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/teampass-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/teampass-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/teampass-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를 입력하여 모든 요청을 안전한 HTTPS 액세스로 리디렉션하고 Enter 키를 눌러 Lets Encrypt SSL을 설치합니다. 설치가 성공적으로 완료되면 다음 출력이 표시됩니다.

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

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

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

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/teampass.linuxbuz.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/teampass.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

이 시점에서 귀하의 웹사이트는 Lets Encrypt SSL로 보호됩니다. 이제 HTTPS 프로토콜로 안전하게 액세스할 수 있습니다.

TeamPass 웹 UI에 액세스

이제 URL https://teampass.linuxbuz.com을 방문하여 TeamPass 웹 인터페이스에 액세스하십시오. TeamPass 시작 화면이 표시되어야 합니다.

다음 버튼을 클릭합니다. 서버 확인 화면이 표시되어야 합니다.

LAUNCH 및 NEXT 버튼을 클릭합니다. 데이터베이스 연결 화면이 표시되어야 합니다.

데이터베이스 세부 정보를 제공하고 LAUNCH 및 NEXT 버튼을 클릭합니다. 준비 화면이 표시되어야 합니다.

LAUNCH 및 NEXT 버튼을 클릭합니다. 테이블 생성 화면이 표시되어야 합니다.

LAUNCH 및 NEXT 버튼을 클릭합니다. 완료 화면이 표시되어야 합니다.

LAUNCH 및 NEXT 버튼을 클릭합니다. 설치가 성공적으로 완료되면 다음 화면이 표시됩니다.

이제 홈 페이지로 이동 버튼을 클릭하십시오. 아래와 같이 TeamPass 로그인 화면으로 리디렉션됩니다.

사용자 이름을 admin으로 입력하고 설치 과정에서 작성한 비밀번호를 입력하고 로그인 버튼을 클릭합니다. 다음 화면에 TeamPass 대시보드가 표시되어야 합니다.

결론

이 가이드에서는 Ubuntu 20.04에 TeamPass 암호 관리자를 설치하고 Lets Encrypt SSL로 보호하는 방법을 배웠습니다. 이제 TeamPass를 탐색하고 프로덕션 환경에 배포할 수 있습니다. 자세한 내용은 TeamPass 공식 문서를 참조하세요.