Installing and setting up Drupal 8 CMS system

botond published 2018/08/14, k - 23:30 time

Content

 

Introductory

Previously we installed a complete web server, and then we created one webfiókot, and now in this tutorial we will install a Drupal 8 CMS on this storage (In the next tutorials we will try a few more CMS system is).

Update 2021-01-10:
The Drupal Installation Guide is also available with Drupal Version 9: Installing and setting up Drupal 9 CMS system

 

There is no particular prerequisite for this installation guide, it can be installed on any dynamic web storage, so wherever you are PHP, mySQL, and a few hundred Mb of storage. I did this installation now for the above mentioned VirtualBox V I run it on a web server configured for a web server, which is then ripe for uploading the latest version of it.

The earlier web account setup www.testpage.local I baptized the storage space that I set up in my hosts file, so this domain name I can access this storage from my computer as if it were on the Internet. So I'm going to work with that name now during the installation of Drupal 8.

Recent web storage under ISPConfig and shell user terminal associated with the web account

The image shows the fresh web hosts and those associated with the web account shell user terminal that we will need for today's installation.

When you are ready and the right storage space is available, you can get started!

 

 

Download and unpack the Drupal 8 installation package

When installing a new website, always use the get the latest installation package from the developer's official siteand install it. At the time of writing this description (2018-08-14) from Drupal, 8.5.6 stable version is the latestso I'm installing this now.

 

In the terminal, go to the user root web root directory and download the installation package:

 cd /var/www/tesztoldal.local/web/

Then, download the tar.gz file from the wget command:

wget https://ftp.drupal.org/files/projects/drupal-8.5.6.tar.gz

This will download the compressed file (16 Mb).

Install Drupal 8 - Download the installation package

Meanwhile, quickly I set the colors in the terminalto see what I'm doing and set up some aliases to make it easier to navigate my web storage.

Now, unpack:

tar -xvzf drupal-8.5.6.tar.gz --strip=1

 

A --strip = 1 switch to leave the creation of the first directory in the package directory structure, so it will be unpacked immediately to the current directory and not to a drupal-8.5.6 into a subdirectory called "Drupal", where we could copy it later with the hidden files ...
Of course, we only apply this if we know that it is packaged in an extra subdirectory that we do not want the system to extract.

 

After unzipping, we get about 15 000 files in the full directory structure of our web root. Interestingly, we can count the files with the following command:

find . -type f | wc -l

 

Alternative solution:
If you do not have SSH access to your webhost, you can download the above installation file to your machine in the traditional way, where you will unzip it and upload it to FTP via FTP. But if you have SSH access then I would definitely recommend the method described here, because uploading this 15 thousands of files unpacked via FTP can be quite painful ...

 

Installing Drupal 8

If you have done well so far, all you need to do is refresh your web browser home page and the Drupal 8.5.6 installer start panel will load:

Install Drupal 8 - Select Language

Here you will immediately be offered the Hungarian language, which will be downloaded during the installation. Click the blue save button.

In the following panel, you can choose whether you want to get a generic system or whether you want to custom build it:

Install Drupal 8 - Select installation profile

Select General option, so all functionality is added and we can customize the functionality of the page later.

The next step is to set up the Database:

Installing Drupal 8 - Configuring a Database

Here I set the parameters that were used when creating the web account, but everyone should configure the access data according to their own database.

You can even choose from several database types here, and in the advanced settings you can specify a remote database, and if you plan to run more than one on the web host, you may want to specify a table prefixso that it does not clash with the boards of other systems. Here I leave the advanced options untouched, for now I am preparing a completely general installation.

After saving the panel, the installation progress bar will appear, showing you how to install the Drupal packages:

Installing Drupal 8 - Installation process

When this is over, the language translation download will come:

Install Drupal 8 - Update Translations

And here the percentages revolve around.

We have a very sophisticated and user-friendly installer that sets everything up in the background. Once this is done, a page will reload to submit the site's basic information form:

Installing Drupal 8 - Site Setup (top of panel)

Installing Drupal 8 - Site Setup (Bottom Panel)

Set the appropriate data here, as appropriate. I've saved the admin password provided here in the /root/access.txt file on the virtual server, so all accesses will be available on the download server.

Email addresses only matter when creating a live website, anything can be specified for testing purposes.

Once you have saved the form, the progress bar will go through again, refresh the language translations, and then load the drupal homepage, where we are logged in as admin.

 

 

The home page

Installing Drupal 8 - Getting Started

Here, in the notification bar, it says 8644 has translated text for the installation and congratulates you on the successful installation.

Above you will see the Drupal admin menu to start drilling and carving the page.

 

Basic settings

The top admin menu bar configuration entering the menu will immediately receive an error:

Installing Drupal 8 - Troubleshooting Initial Troubleshooting

If we follow the link in the red error panel, we'll be taken to the status report page to learn more about the error:

Installing Drupal 8 - Configuring Trusted Storage

Here you can see the main parameters of the drupal system, as well as information about our server configuration, such as PHP version, database version, etc. In addition, we receive information about a system error that warns you of the vulnerability to an attack type, which is a threat only when in use.

To do this, switch to terminal and then to starting from a web root go to the following directory:

cd sites/default/

Here, when we list the directory, we see three files:

Install Drupal 8 - Configure the settings.php configuration file

These will work with settings.php, but as you can see, it has no write access. Because the account owns the file, we can easily grant write access to chmod command to modify its content:

chmod u+w settings.php

Then open the file with an editor such as dwarf, then search for "trusted_host_patterns", and after the comment section, add a few lines defining the domain availability of our site (with and without www):

[...]
$settings['trusted_host_patterns'] = array(
        '^www\.tesztoldal\.local$',
        '^tesztoldal\.local$',
);
[...]

So after editing this section should look like this (before and after with commented sections):

Install Drupal 8 - settings.php - configure trusted_host_patterns

Of course, here too, everyone replaces their domain name with the test page.local instead, and be careful with the escape characters before the dots and the trailing dollar signs for regular expression.

Once you have made the change and saved it, remove the write access from the settings.php file:

chmod u-w settings.php

Because if you forget to take it off, Drupal will also take this as a mistake.

If you are all set, just refresh the page on the status report page and if you have done everything right, the error message will disappear:

Installing Drupal 8 - Status Report - Error status

 

Finally, we delete the downloaded installation package file at first because we no longer need it. From the web root, run the following command:

rm drupal-8.5.6.tar.gz

 

Conclusion

Our new Drupal 8 installation is now ready to use.

It's a good idea to run 7.x PHP on your hosting, strongly recommended by Drupal's developers. Earlier versions of PHP may cause compatibility issues over Drupal 8.5.x. THE About installing 7 PHP in optional mode in this tutorial get information.

All in all, Drupal 8 is a very robust CMS system that can be sophisticatedly customized and the number of modules published by third-party vendors is respectable.

I've uploaded the current state of the virtual server to the downloads so it is now available with this Drupal 8 installation at the following link: Download perfect server: Debian 8 (Jessie) V1.1