0270.html 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Installing Drupal on Debian</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Browser Based,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Drupal,Drupal Installation Guide,FOSS,Free Open Source Software,Free Software,How To Install Drupal On Linux,Open Source Software,PHP,Open-Source,Web Server,Web Server Administrator,Linux,Debian,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Installing Drupal on Debian">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="08/13/2022 09:51:16 AM" />
  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 Drupal on Debian</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 repositories and install any available software updates<br />
  29. sudo apt update<br />
  30. sudo apt upgrade -y<br />
  31. # install Apache HTTPD and MySQL<br />
  32. sudo apt-get install apache2 mariadb-server mariadb-client curl<br />
  33. # install PHP components<br />
  34. sudo apt install php php-mysql php-cli php-json php-opcache php-gd php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip<br />
  35. # configure the MySQL database<br />
  36. sudo su<br />
  37. mysql_secure_installation</div>
  38. </li>
  39. <li>Press Enter to login as root</li>
  40. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  41. <li>Type Y and press Enter to remove anonymous users</li>
  42. <li>Type Y and press Enter to disallow root login remotely</li>
  43. <li>Type Y and press Enter to remove the test database</li>
  44. <li>Type Y and press Enter to reload privilege tables</li>
  45. <li>Run the following command to login into MySQL:
  46. <div class="codeBlock">mysql -u root -p</div>
  47. </li>
  48. <li>Authenticate with the root password set earlier</li>
  49. <li>Run the following commands to create the Drupal database and database user
  50. <div class="codeBlock">CREATE DATABASE drupal DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;<br />
  51. GRANT ALL ON drupal.* TO &#39;drupal_rw&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;Dru4@l!!&#39;;<br />
  52. FLUSH PRIVILEGES;<br />
  53. EXIT;<br />
  54. exit</div>
  55. </li>
  56. <li>Continue with the following commands to download and extract Drupal in the Apache webroot
  57. <div class="codeBlock"># download latest drupal version<br />
  58. sudo wget -O drupal.tar.gz https://www.drupal.org/download-latest/tar.gz<br />
  59. # extract drupal.tar.gz<br />
  60. sudo tar xzvf drupal.tar.gz --directory /var/www<br />
  61. # rename drupal folder<br />
  62. sudo mv /var/www/drupal* /var/www/drupal<br />
  63. # create a new drupal.conf file to configure the site<br />
  64. sudo nano /etc/apache2/sites-available/drupal.conf</div>
  65. </li>
  66. <li>Paste the following configuration into drupal.conf
  67. <p>Alias /drupal &quot;/var/www/drupal/&quot;<br />
  68. &lt;Directory /var/www/drupal/&gt;<br />
  69. &nbsp; &nbsp; AllowOverride All<br />
  70. &lt;/Directory&gt;</p>
  71. </li>
  72. <li>Press CTRL+O, Enter, CTRL+X to write the changes to drupal.conf</li>
  73. <li>Continue with the following commands to enable the site and restart Apache:
  74. <div class="codeBlock"># enable the Drupal site and required PHP modules<br />
  75. sudo a2ensite drupal<br />
  76. sudo a2enmod rewrite<br />
  77. # set the owner of the new drupal directory to www-data<br />
  78. sudo chown -R www-data:www-data /var/www/drupal<br />
  79. # restart apache2 service<br />
  80. sudo systemctl restart apache2</div>
  81. </li>
  82. <li>Open a web browser and navigate to http://DNSorIP/drupal</li>
  83. <li>The Drupal setup screen should be displayed</li>
  84. <li>Select a language &gt; Click Save and continue</li>
  85. <li>Select the Standard profile &gt; Click Save and continue</li>
  86. <li>Enter the database name, username and&nbsp;password&nbsp;&gt; Click Save and continue</li>
  87. <li>Create a site title and Drupal login &gt; Click Install Drupal</li>
  88. <li>When the installation completes, enter a site name, email address, username and password &gt; Click Save and continue</li>
  89. <li>Welcome to your very own, self-hosted Drupal installation</li>
  90. </ol> </div>
  91. </div>
  92. </body>
  93. </html>