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

加载更多搜索结果...

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

如何在 Debian 10 上安装 TeamPass 密码管理器

本教程适用于这些操作系统版本

  • Debian 11(Bullseye)
  • Debian 10(Buster)

在此页

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

TeamPass 是一个协作密码管理器,用于管理密码并在具有特定角色的团队成员之间共享密码。它使用 MySQL/MariaDB 来存储密码,并提供了一个强大的工具来自定义密码访问 Tampass 是高度可定制的,并提供了许多选项来根据您的需要对其进行自定义。它使用 Defuse PHP 加密库来保护您的数据和用户。

在本教程中,我们将向您展示如何在 Debian 10 上安装 TeamPass 并使用 Lets Encrypt SSL 保护它。

先决条件

  • 运行 Debian 10 的服务器。
  • 用您的服务器 IP 指向的有效域名。在本教程中,我们将使用 teampass.example.com 域。
  • 在您的服务器上配置了根密码。

入门

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

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

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

安装 LAMP 服务器

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

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

安装所有软件包后,打开 php.ini 文件并更改一些必需的设置:

nano /etc/php/7.3/apache2/php.ini
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata

完成后保存并关闭文件。

配置 MariaDB

默认情况下,MariaDB root 密码未在 Debian 10 中配置。因此出于安全原因,您需要设置它。

首先,使用以下命令登录到 MariaDB shell:

mysql

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

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

接下来,使用以下命令为 TeamPass 创建数据库和用户:

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

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

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

下载团队通行证

接下来,您需要从 Git 存储库下载最新版本的 TeamPass。您可以使用以下命令将其下载到 Apache 网站根目录:

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

接下来,使用以下命令为 TeamPass 授予适当的权限:

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

为 TeamPass 配置 Apache

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

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

添加以下行:

<VirtualHost *:80>   
     ServerAdmin 
     DocumentRoot /var/www/html/TeamPass   
     ServerName teampass.example.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>  

完成后保存并关闭文件。然后,启用 TeamPass 虚拟主机并重新启动 Apache 网络服务以应用更改:

a2ensite teampass
systemctl restart apache2

使用 Lets Encrypt 保护 TeamPass

接下来,最好使用 Lets Encrypt Free SSL 来保护您的 TeamPass。首先,您需要在服务器中安装 Certbot 客户端,以便为您的域下载并安装 Lets Encrypt SSL。

默认情况下,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 teampass.example.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.example.com
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

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/teampass.conf to ssl vhost in /etc/apache2/sites-available/teampass-le-ssl.conf

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

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

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

此时,您的域已通过 Lets Encrypt SSL 得到保护。

访问 TeamPass Web 界面

打开 Web 浏览器并输入 URL https://teampass.example.com。您将被重定向到 TeamPass 欢迎页面,如下所示:

单击下一步按钮。您应该会看到以下页面:

提供 TeamPass 的 URL 和路径,然后单击启动按钮。满足所有要求后,您应该会看到以下页面:

单击下一步按钮。您应该会看到以下页面:

提供您的数据库详细信息,然后单击启动和下一步按钮。您应该会看到以下页面:

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

单击 LAUNCH 按钮以填充数据库。您应该会看到以下页面:

单击下一步按钮。您应该会看到以下页面:

单击 LAUNCH 按钮完成安装。您应该会看到以下页面:

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

单击移至主页。您将被重定向到 TeamPass 登录页面:

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

恭喜!您已经在 Debian 10 上成功安装并配置了 TeamPass 密码管理器。

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