Unattended installation  [SOLVED]

Discussions about the installation of KeyHelp.
Post Reply
Kairion
Posts: 2
Joined: Fri 21. Apr 2023, 09:41

Unattended installation

Post by Kairion »

Hello, KeyHelp community!

I know the default command to install KeyHelp is this one:

Code: Select all

wget https://install.keyhelp.de/get_keyhelp.php -O install_keyhelp.sh ; bash install_keyhelp.sh ;
But I'm wondering if KeyHelp has a script to allow unattended installations, i.e., passing parameters to the script so it runs a silent installation.
Best regards;
Kairion
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Unattended installation  [SOLVED]

Post by Alexander »

Hello,

Yes you can do so.
Just add appropriate parameters to the "bash install_keyhelp.sh" command.


When you call the following command, you will receive the info which parameters you can use:

Code: Select all

php /home/keyhelp/www/keyhelp/install/install.php --help
Also you can read here, but this will more or less tell you, that you should look into the above command:

Code: Select all

install_keyhelp.sh --help

All parameters added to the preparation script called by "bash install_keyhelp.sh" will get passed to this "real" installation script "/home/keyhelp/www/keyhelp/install/install.php"

For example, call the following command, to perform the installation in a non-interactive way and create instead of "keyadmin" an admin called "alex" with the password "123456". After installation finished, send a notification to info@example.com.

Code: Select all

wget https://install.keyhelp.de/get_keyhelp.php -O install_keyhelp.sh ;
bash install_keyhelp.sh --non-interactive --admin-username="alex" --admin-password="123456" --notification="info@example.com" ;
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Kairion
Posts: 2
Joined: Fri 21. Apr 2023, 09:41

Re: Unattended installation

Post by Kairion »

Hello Alexander,

Thank you for your reply, that was exactly what I was looking for.

For future reference, I'm leaving below the current (April 23, 2023) output of the installation script:

Code: Select all

This program installs KeyHelp on your server.

Usage: php install.php [OPTION] ...

General:
  --help                           Displays this help.
  --non-interactive                Performs the installation without user interaction.
  --no-reboot                      Prevent the reboot at the end of the installation.
  --notification=<EMAIL_ADDRESS>   After installation, sends a notification to the specified email address.
  --language=<LANGUAGE_CODE>       Sets the default language of KeyHelp and its components.
  --extended-log                   Logs everything, also sensitive data like passwords etc.
  --preferred-protocol=<PROTOCOL>  Sets the preferred protocol when communicating with install servers. [ipv4 / ipv6 / none]

Installation parameters:
  --hostname-fqdn=<SERVER_DOMAIN>  The 'Fully-Qualified-Domain-Name' (FQDN), eg. 'keyhelp.example.com'.
  --server-fqdn=<SERVER_DOMAIN>    Alias for --hostname-fqdn [Deprecated]
  --admin-username=<USERNAME>      Login name for the KeyHelp admin account.
  --admin-password=<PASSWORD>      Password for the KeyHelp admin account. At least 6 characters.
  --admin-email=<EMAIL_ADDRESS>    Email address for the KeyHelp admin account.
Best regards;
Kairion
Post Reply