Status of Drupal in Debian
Drupal is currently not available in Debian. Historically Drupal7 used to exist in Debian 9 (stretch). For the reasoning on why newer versions have not been included, please see the ITP bug report and the blog post Giving up on the Drupal 8 debianization ☹.
Details about using Drupal7 with Debian. Please note that Drupal7 is rapidly approaching it's end-of-life. Drupal8 was released in November 2015.
apt-get install drupal7
During installation you may optionally choose to have the database created as well. Choose this unless you will be importing an existing site.
Creating a MySQL database and user manually
This step is only needed if you are importing an existing SQL database.
Create a database (CREATE DATABASE mydb)
Grant required privileges (GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON mydb.* TO 'myuser'@'localhost' IDENTIFIED BY 'mysecret')
Edit the configuration file /etc/drupal/7/sites/default/dbconfig.php as required
Adding a single site
If you only have one site that you wish to use with this installation (with potentially multiple domains) then activate the default drupal7 config file with the command :
Reload Apache, after which the site will be available at yourdomain.com/drupal7
Adding multiple sites with virtual hosts
If you wish to use this installation with more than one site, it is probably best to create a separate configuration for each site:
Create the Drupal site by duplicating the default configuration files:
cp -a /etc/drupal/7/sites/default /etc/drupal/7/sites/newsite.com
- Set up the database and edit the configuration file as per the manual database configuration above.
Add an Apache virtual host configuration file:
<VirtualHost *:80> ServerName newsite.com UseCanonicalName Off VirtualDocumentRoot /usr/share/drupal7 Options All <Directory /usr/share/drupal7/> Options +FollowSymLinks AllowOverride All order allow,deny allow from all </Directory> </VirtualHost>
With a standard installation, the default directory (for the default site) will point to /var/lib/drupal7/files/. For a multi-site installation, the files directory should be symlinked to a dedicated location. For example:
mkdir /var/lib/drupal7/newsite.com/files/ rm /etc/drupal/7/sites/newsite.com/files ln -s /etc/drupal/7/sites/newsite.com/files /var/lib/drupal7/newsite.com/files/
If you want to use clean URLs, first enable the rewrite module:
a2enmod rewrite service apache2 reload
Then edit /etc/drupal/7/htaccess and uncomment the relevant ?RewriteBase rule:
RewriteBase /drupal # If running under a /drupal URL RewriteBase / # If running under a dedicated domain
Adding custom themes and modules
Copy any custom themes or modules into /usr/local/share/drupal/themes or /usr/local/share/drupal/modules, then symlink into the required site. For example:
ln -s /usr/local/share/drupal/themes/mytheme /usr/share/drupal7/themes/mytheme
Download translation file from https://localize.drupal.org/download and put it in /usr/share/drupal7/profiles/minimal/translations/.
So you can start your installation in your language.
drush - command line shell and scripting interface
Drupal/Upgrade/From6To7 - upgrading from the drupal6 package