bookmark_borderHow to Install Drupal on Ubuntu 22.10

Drupal is a Content Management System (CMS) to maintain and publish an internet website. It’s an open-source content management system (CMS) with a large, supportive community. It’s used by millions of people and organizations around the globe to build and maintain their websites.

Update the System

Let us update the system packages to the latest by running the below commands,

apt update -y 
apt upgrade -y

Install MariaDB Server

Next is to install MariaDB or MySQL. I will be using MariaDB for this process. So let’s install MariaDB with the following command.

apt install -y mariadb-server mariadb-client

Secure your database server by setting a root password, disabling root remote logins, and removing test databases.

mysql_secure_installation

Output:

root@crown:~# sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

To log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y 
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Check that you can log in to the database as a root user with a password set.

mysql -u root -p

Now that we are able to log in as regular users, we can now create a Drupal database that Drupal can use once we installed it into our system. To create one using the following command.

Create Database for Drupal

Create a database for Drupal and grant all privileges to the Drupal user.

mysql -u root -p
CREATE DATABASE drupal;
CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON drupal.* to drupal_user@'localhost';
FLUSH PRIVILEGES;
\q

Replace “password” with a real and strong password.

Output:


Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 41
Server version: 10.6.9-MariaDB-1 Ubuntu 22.10

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)]> CREATE DATABASE drupal;
Query OK, 1 row affected (0.001 sec)

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

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

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

MariaDB [(none)]> \q
Bye

Install PHP

By default, Ubuntu 22.10 comes with PHP version 8.1. We will install PHP and other necessary modules required to run Drupal.

apt install php php-{cli,fpm,json,common,mysql,zip,gd,intl,mbstring,curl,xml,pear,tidy,soap,bcmath,xmlrpc}

Output:

root@crown:~# 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
php is already the newest version (2:8.1+92ubuntu1).
php-cli is already the newest version (2:8.1+92ubuntu1).
php-json is already the newest version (2:8.1+92ubuntu1).
php-common is already the newest version (2:92ubuntu1).
php-mysql is already the newest version (2:8.1+92ubuntu1).
php-zip is already the newest version (2:8.1+92ubuntu1).
php-gd is already the newest version (2:8.1+92ubuntu1).
php-mbstring is already the newest version (2:8.1+92ubuntu1).
php-curl is already the newest version (2:8.1+92ubuntu1).

Install Apache Web Server

As for the Web Server, we will use Apache as it is easy to configure and use.

To install, run the below commands

apt install apache2 libapache2-mod-php

Output:

root@crown:~# apt install apache2 libapache2-mod-php
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
apache2 is already the newest version (2.4.54-2ubuntu1).
libapache2-mod-php is already the newest version (2:8.1+92ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Update PHP Timezone and Memory Limit.

Enter the TimeZone you want Drupal to use as default.

nano /etc/php/*/apache2/php.ini
memory_limit = 256
date.timezone = UTC

Download the Latest Version of Drupal and extract it on Ubuntu 22.10.

wget https://www.drupal.org/download-latest/tar.gz -O drupal.tar.gz
tar xvf drupal.tar.gz
mv drupal-*/  /var/www/html/drupal

Update ownership for a drupal directory to Apache user and group.

 chown -R www-data:www-data /var/www/html/
 chmod -R 755 /var/www/html/

Configure Apache Web Server for Drupal

Create a configuration file for Drupal.

 nano /etc/apache2/sites-available/drupal.conf

Add the following content,

Replace example.com with your actual domain name. If you do not have any domain, you can enter the server’s IP address instead.

<VirtualHost *:80>
     ServerName example.com
     ServerAdmin admin@example.com
     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>

Configure and Enable the Website using the below commands,

 apachectl -t
 a2dismod mpm_event
 a2enmod mpm_prefork
 a2enmod php8.1
 a2enmod rewrite
 a2ensite drupal.conf
 systemctl restart apache2

Check and Install Drupal on Ubuntu from the browser.

Access the Drupal configuration page by using http://example.com

Replace example.com with your actual domain or the server’s IP address.

images

Select an installation profile.

images

Input the Database configuration that was created from earlier.

images

Wait for the installation to complete,

images

Configure your site,

images

You’ll get to the Drupal dashboard as shown below,

images

Done.

bookmark_borderUbuntu 22.04 is now available on OpenVZ-based VPSes

Hey There!


We’re happy to announce that Ubuntu 22.04 is now available as an operating system choice on our OpenVZ-based plans in our control panel.

We also have a few guides available on our wiki to start off with Ubuntu 22.04Click Here — Feel free to contact our support team (via a support ticket) if you wish to see any new/different guides available on our wiki!

Stay tuned for more!
– Team CrownCloud

bookmark_borderInstalling Webmin on AlmaLinux 9

Hello,

In this week’s feature highlight, we look at How to Install Webmin on AlmaLinux 9

Webmin is a web-based dashboard that allows sysadmins to manage Linux and Unix-like systems (especially servers). Webmin allows system administrators to manage user accounts, update packages, system log files, configure firewalls, email, database, postfix, etc.

First, check for any pending system updates,

dnf update

install Webmin using the following command:

yum install webmin

Access the Webmin Web Interface.

firewall-cmd --add-port=10000/tcp --permanent
firewall-cmd --reload

To start Webmin, you can use the following command:

service webmin start

To access Webmin, open the URL from your web browser: https://IP_address:10000

Note:

  1. When logging in for the first time, you will see an ‘invalid SSL’ warning.
  2. Simply click on the ‘Advanced’ tab and then ‘Accept the risk and Continue’.

Login to the Webmin web interface using your root user and password.

First

Once you log in, you will be redirected to the Webmin dashboard.

First

bookmark_borderInstalling AlmaLinux 9

Hello,

In this week’s feature highlight, we look at How to Install AlmaLinux 9.

Login to your Panel (https://crownpanel.com/)

To start the installation, first mount the AlmaLinux ISO.

Mounting the AlmaLinux ISO Image

To mount the ISO select the CD-ROM Tab and select the AlmaLinux ISO from the drop-down named AlmaLinux 9 x86_64 and click on Mount button.

Please note: The ISO mount may take upto 2-3 minutes to complete.

ab

Once the ISO has mounted (Task Log tab will show the status of the task), navigate to “Power Control” tab and then perform a Reboot task on the server.

Now, Switch to the VNC Tab and click on “Launch VNC” to launch the web based VNC console to start the AlmaLinux installation.

If the VPS hasn’t booted yet into the AlmaLinux installer, please click on the CTRL+ALT+DEL button from the VNC console to send a reboot signal to the VPS to boot into the installer.

Once we have booted into the AlmaLinux installer,

Select “Install AlmaLinux”

Select the desired language and click on continue.

Select Network & Hostname and configure.

If you would like to keep the Network Dynamic / DHCP (default configuration), Enable the network and click on Done.

Disk Partitioning Configuration

After Select Installation & Destination.

Select standard Partition and assign disk required and done.

Then select Accept changes.

Installation Source Configuration

After Select Installation Source.

Select auto detected installation media -> verify -> Minimal and press done.

Software Selection

After Select Software Selection–>minimal install and press done.

Login Password Configuration

select the root password to set ‘root’ password.

Begin Installation

And Begin Installation.

After installation is completed unmount the ISO and reboot the server. Wait for a few minutes for the reboot to complete, after which you will see the login prompt.

Note: You can also use SSH to connect to your VPS at this point.

Done!

bookmark_borderUbuntu 22.04 Template now available for KVM Based VPS

Hey There!
We’re happy to announce that Ubuntu 22.04 is now available as an operating system choice on our KVM-based plans in our control panel.

Please refer to the following guide to install the operating system on KVM based VPSes using our Control Panel, Click Here.

Stay tuned for further updates!

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

bookmark_borderDebian 11 is now available on OpenVZ based VPSes

Hey There!


We’re happy to announce that Debian 11 is now available as an operating system choice on our OpenVZ based plans in our control panel.

We also have a few guides available on our wiki to start off with Debian 11, https://wiki.crowncloud.net/index.php#Debian+11 — Feel free to contact our support team (via a support ticket) if you wish to see any new/different guide available on our wiki!

Stay tuned for more!
– Team CrownCloud

bookmark_borderCentOS 8 Stream now available on OpenVZ based VPSes

Hey There!


We’re happy to announce that CentOS 8 Stream is now available as an operating system choice on our OpenVZ based plans in our control panel.

We also have a few guides available on our wiki to start off with CentOS 8 Stream, https://wiki.crowncloud.net/index.php#CentOS+8 — Feel free to contact our support team (via a support ticket) if you wish to see any new/different guide available on our wiki!

Stay tuned for more!
– Team CrownCloud

bookmark_borderAlmalinux 8 is now available on OpenVZ based VPSes

Hey There!


We’re happy to announce that Almalinux 8 is now available as an operating system choice on our OpenVZ based plans in our control panel.

We also have a few guides available on our wiki to start off with Almalinux 8, https://wiki.crowncloud.net/index.php#AlmaLinux+8 — Feel free to contact our support team (via a support ticket) if you wish to see any new/different guide available on our wiki!

Stay tuned for more!
– Team CrownCloud

bookmark_borderRocky Linux OS Template is now available for KVM

Hey There!
We’re happy to announce that Rocky Linux is now available as an operating system choice on our KVM-based plans in our control panel.

Please refer to the following guide to install the operating system on KVM based VPSes using our Control Panel – Click here

Stay tuned for further updates!

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

bookmark_borderAlmaLinux OS Template is now available for KVM

Hey There!
We’re happy to announce that AlmaLinux is now available as an operating system choice on our KVM-based plans in our control panel.

Please refer to the following guide to install the operating system on KVM based VPSes using our Control Panel Click Here

Stay tuned for further updates!

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.