Drupal is an open-source content management system that allows you to create powerful websites. In this guide, we'll show you how to install Drupal on AlmaLinux, Rocky Linux, Debian, and Ubuntu. The installation process is simple and can be done in a few steps.
Prerequisites:
Before starting the installation, make sure you have the following:
- A server running AlmaLinux, Rocky Linux, Debian, or Ubuntu.
- Root or sudo access to your server.
- A LAMP stack installed (Linux, Apache, MySQL/MariaDB, PHP).
- A domain or subdomain pointing to your server.
Step 1: Update the System
Start by ensuring that your server's packages are up-to-date:
-
On Ubuntu/Debian:
-
On AlmaLinux/Rocky Linux:
Step 2: Install Required Software
You will need Apache, MySQL/MariaDB, and PHP to run Drupal.
-
For Ubuntu/Debian:
-
For AlmaLinux/Rocky Linux:
Step 3: Configure the Database
Now, create a MySQL or MariaDB database for Drupal.
-
Log in to MariaDB:
-
Create the database and user:
Step 4: Download and Extract Drupal
-
Download the latest version of Drupal:
Visit the Drupal download page to get the latest version, or use the following command to download it:
-
Extract Drupal:
-
Set proper permissions:
Step 5: Configure Apache (for AlmaLinux/Rocky Linux)
-
Create a new virtual host configuration:
-
Add the following configuration:
-
Restart Apache:
Step 6: Configure Apache (for Ubuntu/Debian)
-
Create a new virtual host configuration:
-
Add the following content:
-
Enable the site and restart Apache:
Step 7: Complete the Web Installation
-
Open your browser and navigate to your server's IP address or domain name (e.g.,
http://yourdomain.com
). -
The Drupal installation page will appear. Choose your language and click Save and Continue.
-
Enter the database information:
- Database type: MySQL, MariaDB
- Database name:
drupal_db
- Database username:
drupal_user
- Database password:
your_password
-
Complete the installation process by following the instructions on the screen.
Step 8: Clean Up
-
Remove the installation folder for security:
-
Set proper permissions for your Drupal installation:
Conclusion
You have successfully installed Drupal on your AlmaLinux, Rocky Linux, Debian, or Ubuntu server. You can now log in to your Drupal website’s admin panel to start building your site.