• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install Drupal CMS on Ubuntu 22.04

  • 00:35 lsb_release -a
  • 01:12 apt install -y mariadb-server mariadb-client
  • 02:00 systemctl status mariadb
  • 02:11 mariadb
  • 02:29 CREATE DATABASE drupal;
  • 03:00 CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'password';
  • 03:50 GRANT ALL PRIVILEGES ON drupal.* to drupal_user@'localhost';
  • 04:00 FLUSH PRIVILEGES;
  • 04:09 \q
  • 04:18 apt install php php-{cli,fpm,json,common,mysql,zip,gd,intl,mbstring,curl,xml,pear,tidy,soap,bcmath,xmlrpc}
  • 07:23 vim /etc/php/*/apache2/php.ini
  • 07:45 wget https://www.drupal.org/download-latest/tar.gz -O drupal.tar.gz
  • 08:10 tar xvf drupal.tar.gz
  • 08:48 mv drupal-*/ /var/www/html/drupal
  • 09:11 chown -R web-data: /var/www/html/
  • 09:31 chmod -R 755 /var/www/html/
  • 09:53 vim /etc/apache2/sites-available/drupal.conf
  • 10:23 apachectl -t
  • 10:41 a2enmod rewrite
  • 11:04 a2ensite drupal.conf
  • 11:24 systemctl restart apache2
7678

To Install Drupal CMS On Ubuntu 22.04

Introduction

Drupal is a flexible CMS based on the LAMP stack, with a modular design allowing features to be added and removed by installing and uninstalling modules and allowing the entire look and feel of the website to be changed by installing and uninstalling themes.

procedure Steps:

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

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:    jammy

Step 2: Now install MariaDB client and server by using the below command

root@linuxhelp:~# apt install -y mariadb-server mariadb-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2 libllvm13
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  galera-4 gawk libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdaxctl1 libdbd-mysql-perl libdbi-perl libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl libmariadb3
  libmysqlclient21 libndctl6 libpmem1 libsigsegv2 libsnappy1v5 libterm-readkey-perl liburing2 mariadb-client-10.6 mariadb-client-core-10.6 mariadb-common mariadb-server-10.6 mariadb-server-core-10.6
  mysql-common socat
Suggested packages:
  gawk-doc libmldbm-perl libnet-daemon-perl libsql-statement-perl libipc-sharedcache-perl mailx mariadb-test
The following NEW packages will be installed:
  galera-4 gawk libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdaxctl1 libdbd-mysql-perl libdbi-perl libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl libmariadb3
  libmysqlclient21 libndctl6 libpmem1 libsigsegv2 libsnappy1v5 libterm-readkey-perl liburing2 mariadb-client mariadb-client-10.6 mariadb-client-core-10.6 mariadb-common mariadb-server
Setting up mariadb-server (1:10.6.12-0ubuntu0.22.04.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

Step 3: Now check the status of the MariaDB service by using the below command

root@linuxhelp:~# systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-10-16 17:14:36 IST; 1min 45s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 6552 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 6554 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 6556 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITIO>
    Process: 6602 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 6604 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
   Main PID: 6585 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 10 (limit: 4556)
     Memory: 61.5M
        CPU: 824ms
     CGroup: /system.slice/mariadb.service
             └─6585 /usr/sbin/mariadbd

Step 4: Login to the MariaDB console by using the below command

root@linuxhelp:~# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 31
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Step 5: Create a database by using the below command

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

Step 6: Create a user by using the below command

MariaDB [(none)]> CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.001 sec)

Step 7: Now Grant All privileges for the user to access that database by using the below command

MariaDB [(none)]> GRANT ALL PRIVILEGES ON drupal.* to drupal_user@'localhost';
Query OK, 0 rows affected (0.001 sec)

Step 8: Flush the privileges by using the below command

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

Step 9: Now Exit from the MariaDB console by using the below command

MariaDB [(none)]> \q
Bye

Step 10: Install PHP with it dependency modules by using the below command

root@linuxhelp:~# apt install php php-{cli,fpm,json,common,mysql,zip,gd,intl,mbstring,curl,xml,pear,tidy,soap,bcmath,xmlrpc}
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2 libllvm13
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php8.1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libonig5 libtidy5deb1 libxmlrpc-epi0 libzip4 php8.1 php8.1-bcmath
  php8.1-cli php8.1-common php8.1-curl php8.1-fpm php8.1-gd php8.1-intl php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-readline php8.1-soap php8.1-tidy php8.1-xml php8.1-xmlrpc php8.1-zip
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php8.1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libonig5 libtidy5deb1 libxmlrpc-epi0 libzip4 php php-bcmath php-cli
  php-common php-curl php-fpm php-gd php-intl php-json php-mbstring php-mysql php-pear php-soap php-tidy php-xml php-xmlrpc php-zip php8.1 php8.1-bcmath php8.1-cli php8.1-common php8.1-curl php8.1-fpm
  php8.1-gd php8.1-intl php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-readline php8.1-soap php8.1-tidy php8.1-xml php8.1-xmlrpc php8.1-zip
0 upgraded, 47 newly installed, 0 to remove and 86 not upgraded.
Need to get 10.9 MB of archives.
After this operation, 42.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libapr1 amd64 1.7.0-8ubuntu0.22.04.1 [108 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libaprutil1 amd64 1.6.1-5ubuntu4.22.04.2 [92.8 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libaprutil1-dbd-sqlite3 

Step 11: Now going to increase memory size in the php.ini file by using the below command

root@linuxhelp:~# vim /etc/php/*/apache2/php.ini
memory_limit = 256M
Step 12: Download the Drupal package by using the wget command
root@linuxhelp:~# wget https://www.drupal.org/download-latest/tar.gz -O drupal.tar.gz
--2023-10-16 17:26:57--  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.1.5.tar.gz [following]
--2023-10-16 17:26:58--  https://ftp.drupal.org/files/projects/drupal-10.1.5.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 199.232.254.217
Connecting to ftp.drupal.org (ftp.drupal.org)|199.232.254.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18285113 (17M) [application/octet-stream]
Saving to: ‘drupal.tar.gz’

drupal.tar.gz                                      100%[==============================================================================================================>]  17.44M  10.4MB/s    in 1.7s

2023-10-16 17:26:59 (10.4 MB/s) - ‘drupal.tar.gz’ saved [18285113/18285113]

Step 12: Extract the downloaded package by using the tar command

root@linuxhelp:~# tar xvf drupal.tar.gz
drupal-10.1.5/
drupal-10.1.5/vendor/
drupal-10.1.5/vendor/composer/
drupal-10.1.5/vendor/composer/semver/
drupal-10.1.5/vendor/composer/semver/CHANGELOG.md
drupal-10.1.5/vendor/composer/semver/LICENSE
drupal-10.1.5/vendor/composer/semver/README.md
drupal-10.1.5/vendor/composer/semver/composer.json
drupal-10.1.5/vendor/composer/semver/src/
drupal-10.1.5/vendor/composer/semver/src/Comparator.php
drupal-10.1.5/autoload.php
drupal-10.1.5/composer.json
drupal-10.1.5/composer.lock
drupal-10.1.5/LICENSE.txt

Step 13: Move the Extracted folder to the Apache document root directory by using the below command

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

Step 14: Change the ownership of the folder by using the below command

root@linuxhelp:~#  chown -R web-data: /var/www/html/

Stap 15: Change the permission of the folder using following command

root@linuxhelp:~#  chmod -R 755 /var/www/html/

Step 16: Now create a virtual host file by using the below command

root@linuxhelp:~# vim /etc/apache2/sites-available/drupal.conf
<VirtualHost *:80>
     ServerName linuxhelp.xyz
     ServerAdmin admin@linuxhelp.xyz
     DocumentRoot /var/www/html/drupal/

     CustomLog ${APACHE_LOG_DIR}/access.log combined
     ErrorLog ${APACHE_LOG_DIR}/error.log

      <Directory /var/www/html/drupal>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
            RewriteEngine on
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
   </Directory>
</VirtualHost>

Step 17: Now check the syntax of the Apache by using the below command

root@linuxhelp:~#  apachectl -t
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK

Step 18: Enable rewrite module by using the below command

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

Step 19: Enable site configuration by using the below command

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

Step 20: Restart the Apache service by using the below command

root@linuxhelp:~# systemctl restart apache2

Now go to the browser and search with your IP or domain as shown in the below image Snap 1

Then select the Installation method and enter the database credential as shown in the below image Snap 2

Now enter the Site Details as shown in the below image SNAP 3

Now you will seen the welcome page of you site as shown in the below image SNAP 4

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to installation of Drupal CMS on Ubuntu 22.04. Your feedback is much welcome.

Tags:
caden
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How to install Apache2 on Ubuntu?

A

Use the following command to install Apache2 on Ubuntu
# apt install apache2

Q

How to install mariadb-server on Ubuntu?

A

Use the following command to install Apache2 on Ubuntu
# apt install mariadb-server

Q

How to create a user in MariaDB?

A

You can create a user in MariaDB by using the following query
# CREATE USER ‘usename’@’localhost’ IDENTIFIED BY ‘your_password’;

Q

How to create a database in MariaDB?

A

You can create a database in MariaDB by using the following query
# CREATE DATABASE ‘database_name’;

Q

How to reload the privileages in MariaDB?

A

Use the following query to flush the privileges on MariaDB
# FLUSH PRIVILEGES;

Related Tutorials in How to install Drupal CMS on Ubuntu 22.04

Related Tutorials in How to install Drupal CMS on Ubuntu 22.04

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install Tiki Wiki CMS Groupware on CentOS 7
How to install Tiki Wiki CMS Groupware on CentOS 7
May 31, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018

Related Forums in How to install Drupal CMS on Ubuntu 22.04

Related Forums in How to install Drupal CMS on Ubuntu 22.04

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021
NFS
luke class=
clnt_create: RPC: Program not registered
Apr 25, 2017
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018

Related News in How to install Drupal CMS on Ubuntu 22.04

Related News in How to install Drupal CMS on Ubuntu 22.04

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
KDE Connect App was removed from Google Play Store and brought back in 24 hours
KDE Connect App was removed from Google Play Store and brought back in 24 hours
Mar 22, 2019
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 Ryan ?
how to use visual traceroute tool

Am using traceroute command to check for the route. i got this tool while surfing. So pls help me out installation and usage of Visual traceroute tool.

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.