0328.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Installing Passbolt on Linux (Debian 10)</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Passbolt,Password Vault,Password Locker,Password Manager,Linux,Debian,Ubuntu,Self-Hosted,Security,Web Based,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Installing Passbolt on Linux (Debian 10)">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="06/15/2022 02:44:27 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Installing Passbolt on Linux (Debian 10)</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <ol>
  26. <li>Log into the Debian device</li>
  27. <li>Run the following commands in a terminal:
  28. <div class="codeBlock"># update software repositories<br />
  29. sudo apt update<br />
  30. # install available updates<br />
  31. sudo apt upgrade -y<br />
  32. # install some dependencies<br />
  33. sudo apt install git composer apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y<br />
  34. # install Apache HTTPD and MySQL<br />
  35. sudo apt install apache2 mariadb-server mariadb-client -y<br />
  36. # install PHP components<br />
  37. sudo apt install php7.3 libapache2-mod-php7.3 php-imagick php-gnupg php7.3-common php7.3-mysql php7.3-fpm php7.3-ldap php7.3-gd php7.3-imap php7.3-json php7.3-curl php7.3-zip php7.3-xml php7.3-mbstring php7.3-bz2 php7.3-intl php7.3-gmp php7.3-xsl -y<br />
  38. # configure the MySQL database<br />
  39. sudo su<br />
  40. mysql_secure_installation</div>
  41. </li>
  42. <li>Press Enter to login as root</li>
  43. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  44. <li>Type Y and press Enter to remove anonymous users</li>
  45. <li>Type Y and press Enter to disallow root login remotely</li>
  46. <li>Type Y and press Enter to remove the test database</li>
  47. <li>Type Y and press Enter to reload privilege tables</li>
  48. <li>Run the following command to login into MySQL:
  49. <div class="codeBlock">mysql -u root -p</div>
  50. </li>
  51. <li>Authenticate with the root password set earlier</li>
  52. <li>Run the following commands to create the Passbolt database and database user
  53. <div class="codeBlock">CREATE DATABASE passbolt DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<br />
  54. GRANT ALL ON passbolt.* TO &#39;passboltuser&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;Pa$$b0lt!!&#39;;<br />
  55. FLUSH PRIVILEGES;<br />
  56. EXIT;<br />
  57. exit</div>
  58. </li>
  59. <li>Continue with the following commands to download and extract Passbolt in the Apache webroot
  60. <div class="codeBlock">cd /var/www<br />
  61. # clone passbolt from github<br />
  62. sudo git clone https://github.com/passbolt/passbolt_api.git<br />
  63. # rename extracted folder passbolt<br />
  64. sudo mv /var/www/passbolt* /var/www/passbolt<br />
  65. # set the owner of the new passbolt directory to www-data<br />
  66. sudo chown -R www-data:www-data /var/www/passbolt<br />
  67. # setup composer working directory<br />
  68. sudo mkdir /var/www/.composer<br />
  69. sudo chown -R www-data:www-data /var/www/.composer<br />
  70. cd /var/www/passbolt<br />
  71. # install dependencies with composer, answer y to default permissions<br />
  72. sudo -u www-data composer install --no-dev<br />
  73. # generate a key pair<br />
  74. gpg --gen-key</div>
  75. </li>
  76. <li>Enter a name and email address</li>
  77. <li>Type O for Okay &gt; Press Enter</li>
  78. <li>When prompted, leave the passwords blank</li>
  79. <li>Continue the installation with the following commands in terminal
  80. <div class="codeBlock"># export the private key, replace email with the email used to create the key pair above<br />
  81. gpg --armor --export-secret-keys i12bretro@i12bretro.local | sudo tee /var/www/passbolt/config/gpg/serverkey_private.asc &gt; /dev/null<br />
  82. # export the public key, replace email with the email used to create the key pair above<br />
  83. gpg --armor --export i12bretro@i12bretro.local | sudo tee /var/www/passbolt/config/gpg/serverkey.asc &gt; /dev/null<br />
  84. # setup gnupg working directory<br />
  85. sudo mkdir /var/www/.gnupg<br />
  86. sudo chown -R www-data:www-data /var/www/.gnupg<br />
  87. # initialize the keyring for www-data<br />
  88. sudo su -s /bin/bash -c &quot;gpg --list-keys&quot; www-data<br />
  89. # create a copy of the configuration template file<br />
  90. cd /var/www/passbolt/<br />
  91. sudo cp config/passbolt.default.php config/passbolt.php<br />
  92. # display the GPG key fingerprint, update the email to what was used above, copy the output to the clipboard<br />
  93. gpg --list-keys --fingerprint | grep -i -B 2 &#39;i12bretro@i12bretro.local&#39;<br />
  94. # edit the passbolt config file<br />
  95. sudo nano config/passbolt.php</div>
  96. </li>
  97. <li>Press CTRL + W and search for fullBaseUrl</li>
  98. <li>Update the URL to http://DNSorIP/passbolt</li>
  99. <li>Press CTRL + W and search for Database configuration</li>
  100. <li>Update the database connection information
  101. <p>host: localhost<br />
  102. username: passboltuser<br />
  103. password: Pa$$b0lt!!<br />
  104. database: passbolt</p>
  105. </li>
  106. <li>Press CTRL + W and search for Email configuration</li>
  107. <li>Update the email server configuration and default sender account</li>
  108. <li>Press CTRL + W and search for fingerprint</li>
  109. <li>Paste the fingerprint from the clipboard</li>
  110. <li>Remove all spaces from the fingerprint</li>
  111. <li>Uncomment the public and private lines below the fingerprint by deleting //</li>
  112. <li>Press CTRL + W and search for passbolt</li>
  113. <li>Paste the following after the &#39;passbolt&#39; =&gt; [ line to disable the SSL requirement<br />
  114. &#39;ssl&#39; =&gt; [<br />
  115. &#39;force&#39; =&gt; false,<br />
  116. ],</li>
  117. <li>Press CTRL+O, Enter, CTRL+X to write the changes to passbolt.php</li>
  118. <li>Continue the installation with the following commands
  119. <div class="codeBlock"># create a passbolt apache2 config<br />
  120. sudo nano /etc/apache2/sites-available/passbolt.conf</div>
  121. </li>
  122. <li>Paste the following configuration into passbolt.conf
  123. <p>Alias /passbolt /var/www/passbolt/webroot<br />
  124. &lt;Directory /var/www/passbolt/webroot&gt;<br />
  125. Options FollowSymLinks MultiViews<br />
  126. AllowOverride All<br />
  127. Order allow,deny<br />
  128. allow from all<br />
  129. &lt;/Directory&gt;</p>
  130. </li>
  131. <li>Press CTRL+O, Enter, CTRL+X to write the changes to passbolt.conf</li>
  132. <li>Run the following command to enable the passbolt site
  133. <div class="codeBlock"># enable apache modules<br />
  134. sudo a2enmod headers rewrite<br />
  135. # enable the passbolt site<br />
  136. sudo a2ensite passbolt.conf<br />
  137. # restart the apache2 service<br />
  138. sudo systemctl restart apache2</div>
  139. </li>
  140. <li>Run the following command to run the passbolt installer
  141. <div class="codeBlock">sudo su -s /bin/bash -c &quot;./bin/cake passbolt install --force&quot; www-data</div>
  142. </li>
  143. <li>When prompted, enter an email address, first name and last name to create an account</li>
  144. <li>Copy the URL output after the installation completes</li>
  145. <li>Open a web browser</li>
  146. <li>Install the Passbolt browser extension</li>
  147. <li>With the Passbolt extension installed, navigate to the URL copied from the output of the install script</li>
  148. <li>The Passbolt setup screen should be displayed</li>
  149. <li>Enter a passphrase to use for the account</li>
  150. <li>Save the recovery and store it in a safe place &gt; Click the Next button</li>
  151. <li>Set a color and 3 letter security token &gt; Click the Next button</li>
  152. <li>Welcome to self-hosted Passbolt Password Vault</li>
  153. </ol>
  154. </div>
  155. </div>
  156. </body>
  157. </html>