Installing Drupal 8

Posted under » Drupal on 20 April 2017

You already have a website domain registered and pointed to the server.

Download from drupal website and put them on the web server root which may look like this.

/www/drupal8/

Make sure all your PHP libraries are installed and your LAMP installation meet Drupal requirements like PHP7 for eg.

One of the main reason why I (or many drupal fans) use drupal is that it can host multiple websites.

This is something new in version 8. It won't automatically go the sites folder to determine which "site files" to use. You have to go the sites folder and edit the

/www/drupal8/sites/sites.php

It may look like this. Pretty handy if you want to point www to the top domain.

URL: http://main.com
$sites['main.com'] = 'main.com';
$sites['www.lkybastard.com'] = 'www.lkybastard.com';
$sites['lkybastard.com'] = 'www.lkybastard.com';

Go to sites folder and create the folder which look like this.

/www/drupal8/sites/www.lkybastard.com

If your permissions for /files and sites.php is not correct it will nag you until you enable everyone to write to it. [chmod -R 0777 /www/drupal8/sites/www.lkybastard.com] files will do the trick.

Now go to your browser and point to your site. It will prompt you to install.

It may say you don't have a file called "settings.php". So copy from the /sites/default/default.settings.php

You may have to also create a folder called.

/www/drupal8/sites/www.lkybastard.com/files

Once that done. You key in the MySQL info and the installation begins. After that, you key-in the site's name and email and basically your site is ready.

However, it will say you can prevent your settings file from writting. Do this (read more about this), you have to

chgrp www-data /home/sys-hanafi/www/drupal8/sites/www.lkybastard.com/ -R
chmod -R 0754 /home/sys-hanafi/www/drupal8/sites/www.lkybastard.com/

Well not yet. Under reports it will say something about Trusted Host settings. Make your (final) changes on the settings.php which is located at

/www/drupal8/sites/www.lkybastard.com/settings.php

Ignore the suggested array shit but add this at the bottom of settings.php

$settings['trusted_host_patterns'] = [
  '^www\.lkybastard\.com$',
];

It may nag you that it has finished writting to the "settings.php" and the file should be write disabled. Look out for any errors under reports section.
 

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css