mirror of
https://github.com/friendica/friendica
synced 2025-09-05 22:05:26 +02:00
Automatic Install Tests & Doku (#5674)
* Automatic Installation Testing - New dev-library "mikey179/vfsStream" - created "reload" method for App-Reloads - ConsoleTest now using virtual directory - Adding Automatic Installation Tests - Fixing some probable install-failures * Updating README for Automatic Installation * Updating README for Automatic Installation * Bugfix normal installation * Fixing copying of config files
This commit is contained in:
parent
31d47ade78
commit
2838e4ebaf
11 changed files with 665 additions and 111 deletions
|
@ -111,30 +111,86 @@ You might wish to move/rename `config/local.ini.php` to another name and empty (
|
|||
|
||||
### Option B: Run the automatic install script
|
||||
|
||||
Open the file htconfig.php in the main Friendica directory with a text editor.
|
||||
Remove the `die('...');` line and edit the lines to suit your installation (MySQL, language, theme etc.).
|
||||
Then save the file (do not rename it).
|
||||
You have the following options to automatically install Friendica:
|
||||
- creating a prepared config file (f.e. `prepared.ini.php`)
|
||||
- using environment variables (f.e. `MYSQL_HOST`)
|
||||
- using options (f.e. `--dbhost <host>`)
|
||||
|
||||
Navigate to the main Friendica directory and execute the following command:
|
||||
|
||||
bin/console autoinstall
|
||||
|
||||
Or if you wish to include all optional checks, execute this statement instead:
|
||||
|
||||
bin/console autoinstall -a
|
||||
|
||||
At this point visit your website again, and register your personal account.
|
||||
|
||||
*If* the automatic installation fails for any reason, check the following:
|
||||
|
||||
* Does "config/local.ini.php" already exist? If yes, the automatic installation won't start
|
||||
* Are the settings inside "htconfig.php" correct? If not, edit the file again.
|
||||
* Is the empty MySQL-database created? If not, create it.
|
||||
You can combine environment variables and options, but be aware that options are prioritized over environment variables.
|
||||
|
||||
For more information during the installation, you can use this command line option
|
||||
|
||||
bin/console autoinstall -v
|
||||
|
||||
If you wish to include all optional checks, use `-a` like this statement:
|
||||
|
||||
bin/console autoinstall -a
|
||||
|
||||
*If* the automatic installation fails for any reason, check the following:
|
||||
|
||||
* Does `config/local.ini.php` already exist? If yes, the automatic installation won't start
|
||||
* Are the options in the `config/local.ini.php` correct? If not, edit them directly.
|
||||
* Is the empty MySQL-database created? If not, create it.
|
||||
|
||||
#### B.1: Config file
|
||||
|
||||
You can use a prepared config file like [local-sample.ini.php](config/local-sample.ini.php).
|
||||
|
||||
Navigate to the main Friendica directory and execute the following command:
|
||||
|
||||
bin/console autoinstall -f <prepared.ini.php>
|
||||
|
||||
#### B.2: Environment variables
|
||||
|
||||
There are two types of environment variables.
|
||||
- those you can use in normal mode too (Currently just **database credentials**)
|
||||
- those you can only use during installation (because Friendica will normally ignore it)
|
||||
|
||||
You can use the options during installation too and skip some of the environment variables.
|
||||
|
||||
**Database credentials**
|
||||
|
||||
if you don't use the option `--savedb` during installation, the DB credentials will **not** be saved in the `config/local.ini.php`.
|
||||
|
||||
- `MYSQL_HOST` The host of the mysql/mariadb database
|
||||
- `MYSQL_PORT` The port of the mysql/mariadb database
|
||||
- `MYSQL_USERNAME` The username of the mysql database login (used for mysql)
|
||||
- `MYSQL_USER` The username of the mysql database login (used for mariadb)
|
||||
- `MYSQL_PASSWORD` The password of the mysql/mariadb database login
|
||||
- `MYSQL_DATABASE` The name of the mysql/mariadb database
|
||||
|
||||
**Friendica settings**
|
||||
|
||||
This variables wont be used at normal Friendica runtime.
|
||||
Instead, they get saved into `config/local.ini.php`.
|
||||
|
||||
- `FRIENDICA_PHP_PATH` The path of the PHP binary
|
||||
- `FRIENDICA_ADMIN_MAIL` The admin email address of Friendica (this email will be used for admin access)
|
||||
- `FRIENDICA_TZ` The timezone of Friendica
|
||||
- `FRIENDICA_LANG` The langauge of Friendica
|
||||
|
||||
Navigate to the main Friendica directory and execute the following command:
|
||||
|
||||
bin/console autoinstall [--savedb]
|
||||
|
||||
#### B.3: Execution options
|
||||
|
||||
All options will be saved in the `config/local.ini.php` and are overruling the associated environment variables.
|
||||
|
||||
- `-H|--dbhost <host>` The host of the mysql/mariadb database (env `MYSQL_HOST`)
|
||||
- `-p|--dbport <port>` The port of the mysql/mariadb database (env `MYSQL_PORT`)
|
||||
- `-U|--dbuser <username>` The username of the mysql/mariadb database login (env `MYSQL_USER` or `MYSQL_USERNAME`)
|
||||
- `-P|--dbpass <password>` The password of the mysql/mariadb database login (env `MYSQL_PASSWORD`)
|
||||
- `-d|--dbdata <database>` The name of the mysql/mariadb database (env `MYSQL_DATABASE`)
|
||||
- `-b|--phppath <path>` The path of the PHP binary (env `FRIENDICA_PHP_PATH`)
|
||||
- `-A|--admin <mail>` The admin email address of Friendica (env `FRIENDICA_ADMIN_MAIL`)
|
||||
- `-T|--tz <timezone>` The timezone of Friendica (env `FRIENDICA_TZ`)
|
||||
- `-L|--land <language>` The language of Friendica (env `FRIENDICA_LANG`)
|
||||
|
||||
Navigate to the main Friendica directory and execute the following command:
|
||||
|
||||
bin/console autoinstall [options]
|
||||
|
||||
### Prepare .htaccess file
|
||||
|
||||
Copy .htaccess-dist to .htaccess (be careful under Windows) to have working mod-rewrite again. If you have installed Friendica into a sub directory, like /friendica/ set this path in RewriteBase accordingly.
|
||||
|
|
|
@ -112,29 +112,88 @@ Alle Registrierungsprobleme sollten automatisch behebbar sein.
|
|||
Wenn du irgendwelche **kritischen** Fehler zu diesen Zeitpunkt erhalten solltest, deutet das darauf hin, dass die Datenbank nicht korrekt installiert wurde.
|
||||
Du kannst bei Bedarf die Datei config/local.ini.php verschieben/umbenennen und die Datenbank leeren (als „Dropping“ bezeichnet), so dass du mit einem sauberen System neu starten kannst.
|
||||
|
||||
### Option B: Starte das manuelle Installationsscript
|
||||
### Option B: Starte das automatische Installationsscript
|
||||
|
||||
Öffne die Datei htconfig.php im Friendica-Hauptordner mit einem Text-Editor.
|
||||
Entferne die `die('...');` Zeile und bearbeite die Einstellungen so, das sie zu deinem System passen (MySQL, Sprache, Theme etc.).
|
||||
Dann speichere die Datei (jedoch nicht umbenennen).
|
||||
Es existieren folgende Varianten zur automatischen Installation von Friendica:
|
||||
- Eine vorgefertigte Konfigurationsdatei erstellen (z.B. `prepared.ini.php`)
|
||||
- Verwendung von Umgebungsvariablen (z.B. `MYSQL_HOST`)
|
||||
- Verwendung von Optionen (z.B. `--dbhost <host>`)
|
||||
|
||||
Gehe in den Friendica-Hauptordner und führe den Kommandozeilen Befehl aus:
|
||||
|
||||
bin/console autoinstall
|
||||
|
||||
Oder falls du alle optionalen Checks ausfürehn lassen möchtest, benutze diese Option:
|
||||
|
||||
bin/console autoinstall -a
|
||||
|
||||
*Wenn* die automatisierte Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende:
|
||||
* Existiert die `config/local.ini.php`? Falls ja, wird die automatisierte Installation nicht gestartet.
|
||||
* Sind Einstellungen in der `config/local.ini.php` korrekt? Falls nicht, bitte bearbeite diese Datei erneut.
|
||||
* Ist die leere MySQL-Datenbank erstellt? Falls nicht, erstelle diese.
|
||||
Umgebungsvariablen und Optionen können auch kombiniert werden.
|
||||
Dabei ist jedoch darauf zu achten, dass etwaige Optionen immer die zugehörigen Umgebungsvariablen überschreiben.
|
||||
|
||||
Für mehr Informationen kannst du diese Option verwenden:
|
||||
|
||||
bin/console autoinstall -v
|
||||
|
||||
Falls du alle optionalen Checks ausfürehn lassen möchtest, benutze diese Option:
|
||||
|
||||
bin/console autoinstall -a
|
||||
|
||||
*Wenn* die automatisierte Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende:
|
||||
* Existiert die `config/local.ini.php`? Falls ja, wird die automatisierte Installation nicht gestartet.
|
||||
* Sind Einstellungen in der `config/local.ini.php` korrekt? Falls nicht, bitte bearbeite diese Datei erneut.
|
||||
* Ist die leere MySQL-Datenbank erstellt? Falls nicht, erstelle diese.
|
||||
|
||||
#### B.1: Konfigurationsdatei
|
||||
|
||||
Für diese Variante muss ein Konfigurationsdatei bereits vor der Installation fertig definiert sein (z.B. [local-sample.ini.php](config/local-sample.ini.php).
|
||||
|
||||
Gehe im Anschluss in den Friendica-Hauptordner und führe den Kommandozeilen Befehl aus:
|
||||
|
||||
bin/console autoinstall -f <prepared.ini.php>
|
||||
|
||||
#### B.2: Umgebungsvariablen
|
||||
|
||||
Es existieren Zwei Arten von Umgebungsvariablen in Friendica:
|
||||
- Jene, die auch im normalen Betrieb verwendet werden können (derzeit ausschließlich **Datenbank Einstellungen**)
|
||||
- Jene, die nur während der Installation verwedent werden können (im normalen Betrieb werden sie ignoriert)
|
||||
|
||||
Umgebungsvariablen können auch durch adäquate Optionen (z.B. `--dbhost <hostname>`)übersteuert werden.
|
||||
|
||||
**Datenbank Einstellungen**
|
||||
|
||||
Nur wenn die Option `--savedb` gesetzt ist, werden diese Umgebungsvariablen auch in `config/local.ini.php` gespeichert!
|
||||
|
||||
- `MYSQL_HOST` Der Host der MySQL/MariaDB Datenbank
|
||||
- `MYSQL_PORT` Der Port der MySQL/MariaDB Datenbank
|
||||
- `MYSQL_USERNAME` Der Benutzername des MySQL Datenbanklogins (MySql - Variante)
|
||||
- `MYSQL_USER` Der Benutzername des MariaDB Datenbanklogins (MariaDB-Variante)
|
||||
- `MYSQL_PASSWORD` Das Passwort der MySQL/MariaDB Datenbanklogins
|
||||
- `MYSQL_DATABASE` Der Name der MySQL/MariaDB Datenbank
|
||||
|
||||
**Friendica Einstellungen**
|
||||
|
||||
Diese Umgebungsvariablen können nicht während des normalen Friendica Betriebs verwendet werden.
|
||||
Sie werden stattdessen direkt in `config/local.ini.php` gespeichert.
|
||||
|
||||
- `FRIENDICA_PHP_PATH` Der Pfad zur PHP-Datei
|
||||
- `FRIENDICA_ADMIN_MAIL` Die Admin E-Mail Adresse dieses Friendica Knotens (wird auch für den Admin-Zugang benötigt)
|
||||
- `FRIENDICA_TZ` Die Zeitzone von Friendica
|
||||
- `FRIENDICA_LANG` Die Sprache von Friendica
|
||||
|
||||
Gehe im Anschluss in den Friendica-Hauptordner und führe den Kommandozeilen Befehl aus:
|
||||
|
||||
bin/console autoinstall [--savedb]
|
||||
|
||||
#### B.3: Optionen
|
||||
|
||||
Alle Optionen werden in `config/local.ini.php` gespeichert und überschreiben etwaige, zugehörige Umgebungsvariablen.
|
||||
|
||||
- `-H|--dbhost <host>` Der Host der MySQL/MariaDB Datenbank (env `MYSQL_HOST`)
|
||||
- `-p|--dbport <port>` Der Port der MySQL/MariaDB Datenbank (env `MYSQL_PORT`)
|
||||
- `-U|--dbuser <username>` Der Benutzername des MySQL/MariaDB Datenbanklogins (env `MYSQL_USER` or `MYSQL_USERNAME`)
|
||||
- `-P|--dbpass <password>` Das Passwort der MySQL/MariaDB Datenbanklogins (env `MYSQL_PASSWORD`)
|
||||
- `-d|--dbdata <database>` Der Name der MySQL/MariaDB Datenbank (env `MYSQL_DATABASE`)
|
||||
- `-b|--phppath <path>` Der Pfad zur PHP-Datei (env `FRIENDICA_PHP_PATH`)
|
||||
- `-A|--admin <mail>` Die Admin E-Mail Adresse dieses Friendica Knotens (env `FRIENDICA_ADMIN_MAIL`)
|
||||
- `-T|--tz <timezone>` Die Zeitzone von Friendica (env `FRIENDICA_TZ`)
|
||||
- `-L|--land <language>` Die Sprache von Friendica (env `FRIENDICA_LANG`)
|
||||
|
||||
Gehe in den Friendica-Hauptordner und führe den Kommandozeilen Befehl aus:
|
||||
|
||||
bin/console autoinstall [options]
|
||||
|
||||
### Einen Worker einrichten
|
||||
|
||||
Erstelle einen Cron job oder einen regelmäßigen Task, um den Poller alle 5-10 Minuten im Hintergrund ablaufen zu lassen.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue