Drupal CMS
Drupal is an open-source Content Management System (CMS) that is both flexible and powerful, designed for building dynamic websites with a wide range of needs, from corporate sites, community portals, to e-commerce platforms. With its modular architecture and high-level security, Drupal allows users to customize the appearance, features, and integration with various third-party services.
Key features of Drupal include advanced content management, granular access control, as well as support for multilingual functionality and SEO. Drupal is ideal for developers who need a scalable platform, along with an active community that continuously updates and enhances its functionality.
1. System Requirements
System requirements for the Drupal CMS:
- PHP 8.3
- Extensions: PDO, XML, GD-library, OpenSSL, JSON, cURL, Mbstring, zlib
- Composer 2.3.6+
- Database: MySQL 8.0+, MariaDB 10.6+, Percona Server 8.0+, PostgreSQL 16+
- Web Server: Apache 2.4.7+ or Nginx 1.1+
Before starting the deployment, prepare:
- A VPS or server with Ubuntu LTS OS
- SSH access to the server
- A domain already pointed to the server
2. Server Preparation
Update the system
sudo apt update
sudo apt upgrade -y
Install Apache
sudo apt install apache2 -y
Install certbot for Apache
sudo apt install certbot python3-certbot-apache -y
Install MariaDB
sudo apt install mariadb-server -y
Add the PPA ondrej/php repository
sudo add-apt-repository ppa:ondrej/php -y
sudo apt upgrade -y
Install PHP 8.3 and the required extensions
sudo apt install libapache2-mod-php8.3 php8.3 php8.3-cli php8.3-common \
php8.3-apcu php8.3-mbstring php8.3-gd php8.3-intl \
php8.3-xml php8.3-soap php8.3-bcmath php8.3-mysql php8.3-zip \
php8.3-curl php8.3-tidy php8.3-imagick php8.3-sqlite3 -y
Open the php.ini
configuration file
sudo nano /etc/php/8.3/apache2/php.ini
Set memory_limit
memory_limit = 256M
Restart apache2
sudo systemctl restart apache2
3. Buat Database
Log in to MariaDB
sudo mysql
Create a database drupal
and user 'drupal'@'localhost'
CREATE DATABASE drupal;
CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'rahasia';
GRANT ALL PRIVILEGES ON drupal.* TO 'drupal'@'localhost';
FLUSH PRIVILEGES;
exit
4. Apache Configuration
Create a virtual host
sudo nano /etc/apache2/sites-available/contoh.com.conf
Enter the configuration
<VirtualHost *:80>
ServerName www.contoh.com
ServerAlias contoh.com
DocumentRoot /var/www/contoh.com/web
<Directory /var/www/contoh.com/web>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/contoh.com_error.log
CustomLog /var/log/apache2/contoh.com_access.log combined
</VirtualHost>
Enable the module and virtual host
sudo a2enmod rewrite
sudo a2ensite contoh.com.conf
sudo systemctl restart apache2
Request an SSL certificate
sudo certbot --non-interactive \
-m [email protected] \
--agree-tos \
--no-eff-email \
--apache -d contoh.com -d www.contoh.com \
--redirect
5. Install Drupal CMS
Create a Drupal CMS project using composer
composer create-project drupal/cms contoh.com
Move the contoh.com
directory to /var/www
sudo mv contoh.com /var/www
Change the user-group of the directory
sudo chown -R www-data:www-data /var/www/contoh.com
Access https://www.contoh.com
for installation.
- Click
Get started
, select the desiredpre-configured
options (these can still be added after installation, so they are not mandatory), then clickNext
. - Under
Give your site a name
, enter the website name, then clickNext
. - In
Database configuration
, selectDatabase type
= MySQL/MariaDB, then enter the database name, username, and password, and clickSave and Continue
. - Under
Create your account
, create an account by entering your email and password, then clickFinish
. - During
Setting up your site
, the installation process will run. - If the installation completes successfully, you will be redirected to the
Dashboard
.
The deployment of the Drupal CMS is complete and ready to use.