• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Drupal CMS on Debian 12

  • 00:41 cat /etc/os-release
  • 00:49 apt update
  • 01:07 apt install apache2 mariadb-server mariadb-client php php-mysql libapache2-mod-php php-gd php-xml php-mbstring unzip
  • 02:29 cd /tmp
  • 02:29 wget https://www.drupal.org/download-latest/tar.gz
  • 02:29 tar -xzvf tar.gz
  • 02:42 mv drupal-* /var/www/html/drupal
  • 02:53 mysql
  • 03:01 CREATE DATABASE drubal_db;
  • 03:14 CREATE USER 'drubal_user'@'localhost' IDENTIFIED BY '123456';
  • 03:54 GRANT ALL ON drubal_db.* TO 'drubal_user'@'localhost';
  • 04:00 FLUSH PRIVILEGES;
  • 04:11 quit
  • 04:27 vim /etc/apache2/sites-available/drupal.conf
  • 05:33 a2ensite drupal.conf
  • 05:51 a2enmod rewrite
  • 06:03 systemctl restart apache2
  • 06:17 vim /etc/hosts
{{postValue.id}}

To Install Drupal CMS On Debian 12

Introduction:

Drupal is content management software. It's used to make many of the websites and applications you use every day. Drupal has great standard features, like easy content authoring, reliable performance, and excellent security.

Installation Steps:

Step 1: Check the OS version by using the below command.

root@linuxhelp:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL=https://bugs.debian.org/

Step 2: Update the Package list by using the below command.

root@linuxhelp:~# apt update
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Hit:2 http://deb.debian.org/debian bookworm InRelease
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Get:4 http://security.debian.org/debian-security bookworm-security/main Sources [69.2 kB]
Get:5 http://security.debian.org/debian-security bookworm-security/main amd64 Packages [132 kB]
Get:6 http://security.debian.org/debian-security bookworm-security/main Translation-en [78.5 kB]
Get:7 http://deb.debian.org/debian bookworm-updates/main Sources.diff/Index [8,361 B]
Get:8 http://deb.debian.org/debian bookworm-updates/main amd64 Packages.diff/Index [8,361 B]
Get:9 http://deb.debian.org/debian bookworm-updates/main Translation-en.diff/Index [8,361 B]
Get:10 http://deb.debian.org/debian bookworm-updates/main Sources T-2023-12-26-1404.09-F-2023-12-26-1404.09.pdiff [806 B]
Get:10 http://deb.debian.org/debian bookworm-updates/main Sources T-2023-12-26-1404.09-F-2023-12-26-1404.09.pdiff [806 B]
Get:11 http://deb.debian.org/debian bookworm-updates/main amd64 Packages T-2023-12-26-1404.09-F-2023-12-26-1404.09.pdiff [524 B]
Get:11 http://deb.debian.org/debian bookworm-updates/main amd64 Packages T-2023-12-26-1404.09-F-2023-12-26-1404.09.pdiff [524 B]
Get:12 http://deb.debian.org/debian bookworm-updates/main Translation-en T-2023-12-26-1404.09-F-2023-12-26-1404.09.pdiff [347 B]
Get:12 http://deb.debian.org/debian bookworm-updates/main Translation-en T-2023-12-26-1404.09-F-2023-12-26-1404.09.pdiff [347 B]
Fetched 407 kB in 2s (212 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
201 packages can be upgraded. Run 'apt list --upgradable' to see them.

Step 3: Install the prerequisites by using the below command.

root@linuxhelp:~# apt install apache2 mariadb-server mariadb-client php php-mysql libapache2-mod-php php-gd php-xml php-mbstring unzip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
unzip is already the newest version (6.0-28).
unzip set to manually installed.
The following additional packages will be installed:
  apache2-data apache2-utils galera-4 gawk libapache2-mod-php8.2 libcgi-fast-perl
  libcgi-pm-perl libconfig-inifiles-perl libdaxctl1 libdbd-mariadb-perl libdbi-perl
  libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl libmariadb3 libndctl6
  libpmem1 libsigsegv2 libterm-readkey-perl liburing2 mariadb-client-core
  mariadb-common mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4
  mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo
  mariadb-plugin-provider-snappy mariadb-server-core php-common php8.2 php8.2-cli
  php8.2-common php8.2-gd php8.2-mbstring php8.2-mysql php8.2-opcache
  php8.2-readline php8.2-xml pv rsync socat
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom gawk-doc php-pear
  libmldbm-perl libnet-daemon-perl libsql-statement-perl libipc-sharedcache-perl
  mailx mariadb-test netcat-openbsd doc-base python3-braceexpand
The following NEW packages will be installed:
  apache2 apache2-data apache2-utils galera-4 gawk libapache2-mod-php
  libapache2-mod-php8.2 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl
  libdaxctl1 libdbd-mariadb-perl libdbi-perl libfcgi-bin libfcgi-perl libfcgi0ldbl
  libhtml-template-perl libndctl6 libpmem1 libsigsegv2 libterm-readkey-perl
  liburing2 mariadb-client mariadb-client-core mariadb-plugin-provider-bzip2
  mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma
  mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy mariadb-server
  mariadb-server-core php php-common php-gd php-mbstring php-mysql php-xml php8.2
  php8.2-cli php8.2-common php8.2-gd php8.2-mbstring php8.2-mysql php8.2-opcache
  php8.2-readline php8.2-xml pv rsync socat
The following packages will be upgraded:
  libmariadb3 mariadb-common
2 upgraded, 49 newly installed, 0 to remove and 199 not upgraded.
Need to get 24.4 MB/24.6 MB of archives.
After this operation, 218 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 apache2-data all 2.4.57-2 [160 kB]
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Setting up mariadb-client-core (1:10.11.4-1~deb12u1) ...
Setting up libdbd-mariadb-perl (1.22-1+b1) ...
Setting up libapache2-mod-php8.2 (8.2.7-1~deb12u1) ...

Creating config file /etc/php/8.2/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php8.2
Setting up libapache2-mod-php (2:8.2+93) ...
Setting up mariadb-server-core (1:10.11.4-1~deb12u1) ...
Setting up mariadb-client (1:10.11.4-1~deb12u1) ...
Setting up mariadb-server (1:10.11.4-1~deb12u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
Setting up mariadb-plugin-provider-bzip2 (1:10.11.4-1~deb12u1) ...
Setting up mariadb-plugin-provider-lzma (1:10.11.4-1~deb12u1) ...
Setting up php8.2 (8.2.7-1~deb12u1) ...
Setting up mariadb-plugin-provider-lzo (1:10.11.4-1~deb12u1) ...
Setting up php (2:8.2+93) ...
Setting up mariadb-plugin-provider-lz4 (1:10.11.4-1~deb12u1) ...
Setting up mariadb-plugin-provider-snappy (1:10.11.4-1~deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u1) ...
Processing triggers for php8.2-cli (8.2.7-1~deb12u1) ...
Processing triggers for libapache2-mod-php8.2 (8.2.7-1~deb12u1) ...
Processing triggers for mariadb-server (1:10.11.4-1~deb12u1) ...

Step 4: Go to the following location by using the below command.

root@linuxhelp:~# cd /tmp
root@linuxhelp:/tmp#

Step 5: Download the drupal CMS from source by using following command.

root@linuxhelp:/tmp# wget https://www.drupal.org/download-latest/tar.gz
--2023-12-29 04:04:33--  https://www.drupal.org/download-latest/tar.gz
Resolving www.drupal.org (www.drupal.org)... 199.232.254.217
Connecting to www.drupal.org (www.drupal.org)|199.232.254.217|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://ftp.drupal.org/files/projects/drupal-10.2.0.tar.gz [following]
--2023-12-29 04:04:33--  https://ftp.drupal.org/files/projects/drupal-10.2.0.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 151.101.2.217, 151.101.66.217, 151.101.130.217, ...
Connecting to ftp.drupal.org (ftp.drupal.org)|151.101.2.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18941213 (18M) [application/octet-stream]
Saving to: ‘tar.gz’

tar.gz                100%[======================>]  18.06M  52.8MB/s    in 0.3s

2023-12-29 04:04:34 (52.8 MB/s) - ‘tar.gz’ saved [18941213/18941213]

Step 6: Extract the Drupal zip file by using the below command.

root@linuxhelp:/tmp# tar -xzvf tar.gz
drupal-10.2.0/
drupal-10.2.0/vendor/
drupal-10.2.0/vendor/composer/
drupal-10.2.0/vendor/composer/semver/
drupal-10.2.0/vendor/composer/semver/CHANGELOG.md
drupal-10.2.0/vendor/composer/semver/LICENSE
drupal-10.2.0/vendor/composer/semver/README.md
drupal-10.2.0/vendor/composer/semver/composer.json
drupal-10.2.0/vendor/composer/semver/phpstan-baseline.neon
drupal-10.2.0/vendor/composer/semver/src/
drupal-10.2.0/vendor/composer/semver/src/Comparator.php
drupal-10.2.0/vendor/composer/semver/src/CompilingMatcher.php
drupal-10.2.0/sites/default/default.services.yml
drupal-10.2.0/sites/default/default.settings.php
drupal-10.2.0/modules/
drupal-10.2.0/modules/README.txt
drupal-10.2.0/profiles/
drupal-10.2.0/profiles/README.txt
drupal-10.2.0/themes/
drupal-10.2.0/themes/README.txt
drupal-10.2.0/autoload.php
drupal-10.2.0/composer.json
drupal-10.2.0/composer.lock
drupal-10.2.0/LICENSE.txt

Step 7: Move the drupal directory to the apache web server document root location by using the below command.

root@linuxhelp:/tmp# mv drupal-* /var/www/html/drupal

Step 8: Login to the MySQL console by using the below command.

root@linuxhelp:/tmp# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 31
Server version: 10.11.4-MariaDB-1~deb12u1 Debian 12
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>

Step 9: Create a database for Drupal CMS by using the below command.

MariaDB [(none)]> CREATE DATABASE drubal_db;
Query OK, 1 row affected (0.001 sec)

Step 10: Create user for Drupal CMS by using the below command.

MariaDB [(none)]> CREATE USER 'drubal_user'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.002 sec)

Step 11: Make Grand privileges for the user by using the below command.

MariaDB [(none)]> GRANT ALL ON drubal_db.* TO 'drubal_user'@'localhost';
Query OK, 0 rows affected (0.002 sec)

Step 12: Reload the privileges by using the below command.

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)

Step 13: Exit from MySQL by using the below command.

MariaDB [(none)]> quit
Bye
root@linuxhelp:/tmp#

Step 14: Make the Apache configuration file by using the below command.

root@linuxhelp:/tmp# vim /etc/apache2/sites-available/drupal.conf
<VirtualHost *:80>
        ServerName my.linuxhelp.com
        DocumentRoot /var/www/html/drupal

<Directory /var/www/html/drupal>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>
</VirtualHost>

Step 15: Enable the Apache Drupal configuration file by using the below command.

root@linuxhelp:/tmp# a2ensite drupal.conf
Enabling site drupal.
To activate the new configuration, you need to run:
  systemctl reload apache2

Step 16: Enable the Apache rewrite module by using the below command.

root@linuxhelp:/tmp# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Step 17: Restart the Apache web server by using the below command.

root@linuxhelp:/tmp# systemctl restart apache2
root@linuxhelp:/tmp#

Step 18: Make the host entry by using the below command.

root@linuxhelp:/tmp# vim /etc/hosts
127.0.0.1       localhost
192.168.6.131   my.linuxhelp.com linuxhelp.linuxhelp    linuxhelp

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Step 19: Goto the browser and search the domain as shown in below image. snap 1

Step 20: Choose the Language then click save and continue as shown in below image. snap 2

Step 21: Select the Installation profile then click save and continue as shown in below image. snap 3

Step 22: Make the Database configuration then click save and continue as shown in below image. snap 4

Step 23: After connect to the Database the Drupal Installation processing as shown in below image. snap 5

Step 24: Configure the Site then click save and continue as shown in below image. snap 6 snap 7 snap 8

Step 25: This is the Dashboard page of Drupal CMS snap 9

Conclusion:

We have reached the end of this article. In this guide , we have walked you through the steps to install Drupal CMS on Debian 12. Your feedback is much welcome.

Tags:
grayson
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What are the minimum server requirements for Drupal 9?

A

Web server (Apache or Nginx)
PHP 7.3.5 or higher
MySQL/MariaDB 5.5.5 or higher
Database server (MySQL/MariaDB, PostgreSQL, or SQLite)
Composer (for managing PHP dependencies)

Q

How do I set up a LAMP stack on Debian 12?

A

Install Apache, PHP, and MySQL/MariaDB using apt: sudo apt install apache2 mariadb-server php php-mysql libapache2-mod-php php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip unzip composer
Configure Apache and PHP settings as needed.

Q

How do I download the Drupal installation files?

A

Use Composer to download Drupal core and manage dependencies: composer create-project drupal/recommended-project my_drupal_site

Q

How do I create a database for Drupal?

A

Use MySQL/MariaDB commands to create a database and user.

Q

How do I configure Drupal during installation?

A

Access the Drupal installer in your web browser (usually http://your-server-ip/my_drupal_site) and follow the prompts:
Provide database credentials.
Choose basic site settings.
Create an initial administrator account.

Load more

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.