0328.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  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. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  7. <script type="text/javascript">
  8. $(function(){
  9. $('textarea').each(function(i,e){
  10. theTextarea = $(this);
  11. theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
  12. });
  13. $('li').each(function(i,e){
  14. var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
  15. $(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
  16. $(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
  17. });
  18. $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
  19. theElement = $(this);
  20. var lines = theElement.html().split("\n");
  21. theElement.empty();
  22. for(l=0;l<lines.length;l++){
  23. if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
  24. theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ $.trim(lines[l].replace(/"/g, '&quot;')) +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
  25. } else {
  26. theElement.append(lines[l]);
  27. }
  28. }
  29. });
  30. $(document).on('click','input.copy-text',function(){
  31. theButton = $(this);
  32. $('input.copy-text').attr('src','images/clipboard.png');
  33. $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
  34. try {
  35. if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
  36. $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
  37. } else if($('#'+ theButton.attr('rel')).parent('div').hasClass('CMD')){
  38. $('#'+ theButton.attr('rel')).addClass('copy-animation-cmd');
  39. } else {
  40. $('#'+ theButton.attr('rel')).addClass('copy-animation');
  41. }
  42. navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
  43. theButton.attr('src','images/clipboard_active.png');
  44. } catch(err) {
  45. }
  46. return false;
  47. });
  48. $(document).on('click','input.completeBox',function(){
  49. theBox = $(this);
  50. $('#'+ theBox.attr('rel')).addClass('strikethrough');
  51. theBox.prop('disabled',true);
  52. theBox.parent('li').prevAll().each(function(i,e){
  53. theLI = $(this);
  54. if(theLI.find('input[type=checkbox]').not(':checked')){
  55. $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
  56. theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
  57. }
  58. });
  59. });
  60. if(window.self !== window.top){
  61. window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
  62. }
  63. });
  64. </script>
  65. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  66. </head>
  67. <body>
  68. <div id="gridContainer">
  69. <div class="topMargin"></div>
  70. <div id="listName" class="topMargin">
  71. <h1>Installing Passbolt on Linux (Debian 10)</h1>
  72. </div>
  73. <div></div>
  74. <div id="content">
  75. <ol>
  76. <li>Log into the Debian device</li>
  77. <li>Run the following commands in a terminal:
  78. <div class="codeBlock"># update software repositories<br />
  79. sudo apt update<br />
  80. # install available updates<br />
  81. sudo apt upgrade -y<br />
  82. # install some dependencies<br />
  83. sudo apt install git composer apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y<br />
  84. # install Apache HTTPD and MySQL<br />
  85. sudo apt install apache2 mariadb-server mariadb-client -y<br />
  86. # install PHP components<br />
  87. 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 />
  88. # configure the MySQL database<br />
  89. sudo su<br />
  90. mysql_secure_installation</div>
  91. </li>
  92. <li>Press Enter to login as root</li>
  93. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  94. <li>Type Y and press Enter to remove anonymous users</li>
  95. <li>Type Y and press Enter to disallow root login remotely</li>
  96. <li>Type Y and press Enter to remove the test database</li>
  97. <li>Type Y and press Enter to reload privilege tables</li>
  98. <li>Run the following command to login into MySQL:
  99. <div class="codeBlock">mysql -u root -p</div>
  100. </li>
  101. <li>Authenticate with the root password set earlier</li>
  102. <li>Run the following commands to create the Passbolt database and database user
  103. <div class="codeBlock">CREATE DATABASE passbolt DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<br />
  104. GRANT ALL ON passbolt.* TO &#39;passboltuser&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;Pa$$b0lt!!&#39;;<br />
  105. FLUSH PRIVILEGES;<br />
  106. EXIT;<br />
  107. exit</div>
  108. </li>
  109. <li>Continue with the following commands to download and extract Passbolt in the Apache webroot
  110. <div class="codeBlock">cd /var/www<br />
  111. # clone passbolt from github<br />
  112. sudo git clone https://github.com/passbolt/passbolt_api.git<br />
  113. # rename extracted folder passbolt<br />
  114. sudo mv /var/www/passbolt* /var/www/passbolt<br />
  115. # set the owner of the new passbolt directory to www-data<br />
  116. sudo chown -R www-data:www-data /var/www/passbolt<br />
  117. # setup composer working directory<br />
  118. sudo mkdir /var/www/.composer<br />
  119. sudo chown -R www-data:www-data /var/www/.composer<br />
  120. cd /var/www/passbolt<br />
  121. # install dependencies with composer, answer y to default permissions<br />
  122. sudo -u www-data composer install --no-dev<br />
  123. # generate a key pair<br />
  124. gpg --gen-key</div>
  125. </li>
  126. <li>Enter a name and email address</li>
  127. <li>Type O for Okay &gt; Press Enter</li>
  128. <li>When prompted, leave the passwords blank</li>
  129. <li>Continue the installation with the following commands in terminal
  130. <div class="codeBlock"># export the private key, replace email with the email used to create the key pair above<br />
  131. gpg --armor --export-secret-keys i12bretro@i12bretro.local | sudo tee /var/www/passbolt/config/gpg/serverkey_private.asc &gt; /dev/null<br />
  132. # export the public key, replace email with the email used to create the key pair above<br />
  133. gpg --armor --export i12bretro@i12bretro.local | sudo tee /var/www/passbolt/config/gpg/serverkey.asc &gt; /dev/null<br />
  134. # setup gnupg working directory<br />
  135. sudo mkdir /var/www/.gnupg<br />
  136. sudo chown -R www-data:www-data /var/www/.gnupg<br />
  137. # initialize the keyring for www-data<br />
  138. sudo su -s /bin/bash -c &quot;gpg --list-keys&quot; www-data<br />
  139. # create a copy of the configuration template file<br />
  140. cd /var/www/passbolt/<br />
  141. sudo cp config/passbolt.default.php config/passbolt.php<br />
  142. # display the GPG key fingerprint, update the email to what was used above, copy the output to the clipboard<br />
  143. gpg --list-keys --fingerprint | grep -i -B 2 &#39;i12bretro@i12bretro.local&#39;<br />
  144. # edit the passbolt config file<br />
  145. sudo nano config/passbolt.php</div>
  146. </li>
  147. <li>Press CTRL + W and search for fullBaseUrl</li>
  148. <li>Update the URL to http://DNSorIP/passbolt</li>
  149. <li>Press CTRL + W and search for Database configuration</li>
  150. <li>Update the database connection information
  151. <p>host: localhost<br />
  152. username: passboltuser<br />
  153. password: Pa$$b0lt!!<br />
  154. database: passbolt</p>
  155. </li>
  156. <li>Press CTRL + W and search for Email configuration</li>
  157. <li>Update the email server configuration and default sender account</li>
  158. <li>Press CTRL + W and search for fingerprint</li>
  159. <li>Paste the fingerprint from the clipboard</li>
  160. <li>Remove all spaces from the fingerprint</li>
  161. <li>Uncomment the public and private lines below the fingerprint by deleting //</li>
  162. <li>Press CTRL + W and search for passbolt</li>
  163. <li>Paste the following after the &#39;passbolt&#39; =&gt; [ line to disable the SSL requirement<br />
  164. &#39;ssl&#39; =&gt; [<br />
  165. &#39;force&#39; =&gt; false,<br />
  166. ],</li>
  167. <li>Press CTRL+O, Enter, CTRL+X to write the changes to passbolt.php</li>
  168. <li>Continue the installation with the following commands
  169. <div class="codeBlock"># create a passbolt apache2 config<br />
  170. sudo nano /etc/apache2/sites-available/passbolt.conf</div>
  171. </li>
  172. <li>Paste the following configuration into passbolt.conf
  173. <p>Alias /passbolt /var/www/passbolt/webroot<br />
  174. &lt;Directory /var/www/passbolt/webroot&gt;<br />
  175. Options FollowSymLinks MultiViews<br />
  176. AllowOverride All<br />
  177. Order allow,deny<br />
  178. allow from all<br />
  179. &lt;/Directory&gt;</p>
  180. </li>
  181. <li>Press CTRL+O, Enter, CTRL+X to write the changes to passbolt.conf</li>
  182. <li>Run the following command to enable the passbolt site
  183. <div class="codeBlock"># enable apache modules<br />
  184. sudo a2enmod headers rewrite<br />
  185. # enable the passbolt site<br />
  186. sudo a2ensite passbolt.conf<br />
  187. # restart the apache2 service<br />
  188. sudo systemctl restart apache2</div>
  189. </li>
  190. <li>Run the following command to run the passbolt installer
  191. <div class="codeBlock">sudo su -s /bin/bash -c &quot;./bin/cake passbolt install --force&quot; www-data</div>
  192. </li>
  193. <li>When prompted, enter an email address, first name and last name to create an account</li>
  194. <li>Copy the URL output after the installation completes</li>
  195. <li>Open a web browser</li>
  196. <li>Install the Passbolt browser extension</li>
  197. <li>With the Passbolt extension installed, navigate to the URL copied from the output of the install script</li>
  198. <li>The Passbolt setup screen should be displayed</li>
  199. <li>Enter a passphrase to use for the account</li>
  200. <li>Save the recovery and store it in a safe place &gt; Click the Next button</li>
  201. <li>Set a color and 3 letter security token &gt; Click the Next button</li>
  202. <li>Welcome to self-hosted Passbolt Password Vault</li>
  203. </ol>
  204. </div>
  205. </div>
  206. </body>
  207. </html>