Drupal 8 Installation

This guide will explain how to get up and running with Drupal 8 on LiteSpeed Web Server.

Install PHP modules

The easiest way to install PHP for LiteSpeed is through our CentOS repository. If the LiteSpeed Repository was not installed and enabled during the web server installation, follow this guide to install and enable the LiteSpeed Repository.

Step 1. Install PHP

You can install some of the most commonly-used PHP 7.1 packages and modules for LiteSpeed. Use the following command:

sudo yum install lsphp71 lsphp71-mysqlnd lsphp71-common lsphp71-gd lsphp71-pdo lsphp71-process lsphp71-mbstring lsphp71-mcrypt lsphp71-opcache lsphp71-bcmath lsphp71-xml lsphp71-soap lsphp71-json -y 

Step 2. Setup PHP

Visit http://your_server_IP:7080. Navigate to Server Configuration > External app, then click the second icon Edit on the right hand side in order to edit this application.
Modify:

  • Name: lsphp → lsphp71
  • Command: $SERVER_ROOT/fcgi-bin/lsphp5 → $SERVER_ROOT/lsphp71/bin/lsphp

Step 3. Restart LSWS

When you are finished, click the Save icon to save your changes, then click the Graceful Restart button.

Step 4. PHP Verification

Visit http://your_server_IP/phpinfo.php and make sure PHP Version shows 7.1.x.

MariaDB Installation:

Install MariaDB:

sudo yum install mariadb-server
sudo systemctl start mariadb

Set new password:

/usr/bin/mysql_secure_installation

Enter $yourpassword

Create Drupal DB Account

Create the Drupal database and your Drupal user/password:

 mysql -u root -p$yourmysqlpassword
 create database drupal; grant all privileges on drupal.* to drupal@localhost identified by 'drupal'; exit;

Note: For security purposes, you should use a Drupal username and password that are different than our example.

Set Index File

An index file needs to be set in the LiteSpeed Web Admin Console. Navigate to Virtual Hosts > Select Virtual Host from List > General > Index Files, click Edit in the top right corner, and enter index.html,index.php in the Index Files box.

Download and Extract Drupal

To illustrate setting up Drupal on a vhost we'll use the default virtual host, “Example”. You can download drupal from their official download page.

Please note that the document root of 'Example' virtual host is /usr/local/lsws/Example/http/

If you have downloaded in zip format, use following:

unzip drupal-8.x.x.zip
mv drupal-8.x.x/* .

Or if you have downloaded in tar.gz

tar zxf drupal-8.x.x.tar.gz
mv drupal-8.x.x/* .

Drupal Installation

Open the browser with URL http://server_IP:8088/

Choose language

This will start the Drupal web installer and it will look something like this:

Select your preferred language and click Save and Continue.

Choose profile

Select your installation profile. You have two options here:

  • Standard.
  • Minimal.

Standard would be fine for most users. With Minimal, you will have the option to manually choose which functions to install. For now, you should select Standard.

Verify requirements

On the next step, Drupal checks if all of the requirements are met on the server side. First, make sure to create a settings file using the following command:

cp sites/default/default.settings.php sites/default/settings.php

Second, make sure that the folder which contains Drupal (and all folders/files inside of it) is owned by the user under which the web server runs, in this case user nobody.

Once the requirements are met you will be directed to enter database information.

Set up database

We've created the database above. Just enter the database details and click Save and continue. If the Drupal installer is successfully able to connect to the database, it will start the installation process.

Configure site

On this step, the installer will let you configure settings for your site. Example settings are:

  • Site name: Litespeedtech
  • Site email address: drupal@example.com
  • Username: litespeedtech
  • Password: litespeedtech

Once you are satisfied, you can finally click Save and continue and your installation is successfully completed. You will now be redirected to the Drupal homepage, which looks something like:

 
litespeed_wiki/installation/drupal_installation.txt · Last modified: 2017/09/07 13:30 by Ron Saad