Create a new MariaDB user 'pmpg' and database of the same name (hopefully with a more secure password than this):
katy@katyswain:/var/www/pmpg/web/sites/default$ sudo mariadb
Welcome to the MariaDB monitor. Commands end with ; or \g.
[…]
MariaDB [(none)]> create database pmpg;
Query OK, 1 row affected (0.001 sec)
MariaDB [(none)]> grant all privileges on pmpg.* to 'pmpg'@localhost identified by '1234567890';
Query OK, 0 rows affected (0.002 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> quit
ByeCopy our example settings.local.php and fire up your text editor of choice:
katy@katyswain:/var/www/pmpg/web/sites/default$ cp default.settings.local.php settings.local.php
katy@katyswain:/var/www/pmpg/web/sites/default$ nano -w settings.local.phpReplace database/user/directory/names and password as appropriate:
$databases['default']['default'] = array (
'database' => 'pmpg',
'username' => 'pmpg',
'password' => 'Rei4gi3lu(Ko',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'isolation_level' => 'READ COMMITTED',
'driver' => 'mysql',
'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql',
'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',
);
/***
* Config sync/split settings
*
* By default, the installer puts a config sync directory in the
* files directory, where it won't be version controlled.
**/
$settings['config_sync_directory'] = '/var/www/pmpg/config/sync';
$config['config_split.config_split.dev']['status'] = FALSE;
$config['config_split.config_split.stage']['status'] = FALSE;
$config['config_split.config_split.prod']['status'] = TRUE;
We use the Configuration Split module to vary configuration depending on whether a site is for development, testing, or 'production'. (Generally for the purpose of switching off developer functionality on publicly accessible sites, so users can't possibly do the sort of things they shouldn't.) In the example above, we want this to be a live production site.
Here we're creating a new site without duplicating the content of an existing one (see the next section on restoring from a backup for instructions on that). So if we've done all the preceding steps correctly, we should be able to use the graphical installer in a web browser.