Let the platform do the work

Silent Installer Settings

Overview

The Sugar silent installer facilitates and automates the installation of the Sugar application after the files have been copied onto the server. This is done by populating correct parameters in a configuration file and then making a web request to kick off the installation.

config_si.php

The ./config_si.php file is located at the root level of the Sugar application. It contains an array of name-value pairs consisting of the relevant parameters for installation of the app. The array name is $sugar_config_si. An example file looks like:

  <?php

$sugar_config_si = array (
    'setup_site_url' => 'http://${domainname}:${webport}/sugar',
    'setup_system_name' => '${systemname}',    
    'setup_db_host_name' => 'localhost',
    'setup_site_admin_user_name' => 'admin',
    'setup_site_admin_password' => '${sugarpassword}',
    'demoData' => true, 
    'setup_db_type' => 'mysql',
    'setup_db_host_name' => '{db_host_name}',
    'setup_db_port_num' => 'db_port_number',
    'setup_db_database_name' => 'sugar',
    'setup_db_admin_user_name' => 'root',
    'setup_db_admin_password' => '${rootpassword}',
    'setup_db_options' => array(
    	'ssl' => true,
    ),
    'setup_db_drop_tables' => false,
    'setup_db_create_database' => true,
    'setup_license_key' => '${slkey}',
    'setup_license_key_users' => '${slkeyusers}',
    'setup_license_key_expire_date' => '${slkeyexpiredate}',
    'setup_license_key_oc_licences' => '${slkey_oc_licenses}',
    'default_currency_iso4217' => 'USD',
    'default_currency_name' => 'US Dollars',
    'default_currency_significant_digits' => '2',
    'default_currency_symbol' => '$',
    'default_date_format' => 'Y-m-d',
    'default_time_format' => 'H:i',
    'default_decimal_seperator' => '.',
    'default_export_charset' => 'ISO-8859-1',
    'default_language' => 'en_us',
    'default_locale_name_format' => 's f l',
    'default_number_grouping_seperator' => ',',
    'export_delimiter' => ',',
);

Essential Settings

The following are settings that must be set:

General System Settings

setup_system_name

Description A unique system name for the application that will be displayed on the web browser
Type String

setup_site_url

Description The site location and URL of the Sugar application
Type String

setup_site_admin_user_name

Description Specifies the admin username for the Sugar application
Type String

setup_site_admin_password

Description Specifies the admin password for the Sugar application
Type String

demoData

Description Indicates whether the app will be installed with demo data
Type Boolean

Database Settings

setup_db_type

Description Defines the type of database being used with Sugar. It is important to note that db2 and oracle are only applicable to Sugar Ent and Ult.
Type String: valid options include mysql, mssql, db2, oracle

setup_db_host_instance

Description Defines the host instance for MSSQL connections.
Type String : Database Host Instance Name

setup_db_host_name

Description Defines the hostname of the database server.
Type String

setup_db_port_num

Description Defines the port number on the server to connect to for authentication and transactions.
Type String

setup_db_database_name

Description Defines the database name to connect to on the database server.
Type String

setup_db_admin_user_name

Description Specifies the database administrator's username
Type String

setup_db_admin_password

Description Specifies the database administrator's password
Type String

The following are not necessarily required, but it is recommended that at least one is set:

setup_db_create_database

Description Specifies whether Sugar will create a new database with the name given or use an existing database.
Type Boolean

setup_db_drop_tables

Description Specifies whether Sugar will drop existing tables on a database if the database already exists
Type Boolean

Extended Database Settings

There is also an option for an additional array of db config settings. These array entries are equivalent to the Core Settings options prefixed with dbconfigoption. For example dbconfigoption.collation and dbconfigoption.ssl

setup_db_options

Description See: Architecture/Configurator/Core_Settings/index.html#dbconfigoptionautofree
Type Array

Full-Text Search (ElasticSearch) Settings

setup_fts_type

Description The Full-Text Search service type
Type String, currently only supported value Elastic

setup_fts_host

Description The hostname of the Full-Text Search service
Type String

setup_fts_port

Description The port number of the Full-Text Search service
Type String

Advanced Full-Text Search Configuration Settings

While not required, the Silent Installer offers a few FTS settings not available in the browser-based installation process. These settings are considered more advanced and should not be implemented casually. Further details on advanced ElasticSearch configuration can be found in the ElasticSearch installation guide in the section Advanced Configuration.

setup_fts_curl

Description

Additional settings for the cURL request to the Elasticsearch server, keyed by the PHP cURL constants used for curl_setopt. For example  

'setup_fts_curl' => array(
	CURLOPT_SSL_VERIFYPEER = false,
),
Type Array

License Settings

While not required during installation, the license settings are required for Sugar to be usable by all users. Setting the license settings during the Silent Install will save the need to enter this required data after the install.

setup_license_key

Description Specifies the license key
Type String

setup_license_key_users

Description Specifies the number of license key users
Type Integer

setup_license_key_expire_date

Description The expiration date of the license key
Type String: yyyy-mm-dd format

setup_site_sugarbeet_automatic_checks

Description Specifies if License Validation checks should be set to Automatic
Type Boolean

Additionally, Offline Client license settings can be set in Silent Installer

setup_license_key_oc_licences

Description the number of offline client users
Type Integer

setup_num_lic_oc

Description the number of offline client users
Type Integer

Making the Web Request

After the ./config_si.php file is in place, the following web request can be made to kick off the installation:

http://${hostname}/sugar/install.php?goto=SilentInstall&cli=true

where ${hostname} is the name of the host. Upon completion of the process, the installation should respond with Success, and you may navigate to the web address to find an installed version of Sugar.

Configuring a Sugar-Specific Database User during Install

By default, Sugar will use the database user set for the install process as the database user for general use after installation. There are three different Silent Install options for having Sugar use a different database user once installed. Which option the installer users is determined by the dbUSRData config setting.

The dbUSRData silent install config setting has four valid options:

same

This is the default setting used, even when dbUSRData is not explicitly set. The DB user provided for installing Sugar is used for running Sugar after installation.

auto

Sugar will create a new database user using a self-generated username and password.

In your $sugar_config_si array, the options for this to work as expected are:

  'dbUSRData' => 'auto',
'setup_db_create_sugarsales_user' => true,

provide

Sugar will use the provided database username and password after installation, and the installer assumes that the database user has already been created on the database and that the provided password is valid. Essentially this is informing Sugar to use a different existing DB user after the installation has completed.

In your $sugar_config_si array, the options for this to work as expected are:

  'dbUSRData' => 'provide',
'setup_db_create_sugarsales_user' => false,
'setup_db_sugarsales_user' => '{existing_db_user_name}',
'setup_db_sugarsales_password' => '{existing_db_user_password}',
'setup_db_sugarsales_password_retype' => '{existing_db_user_password}',

create

Sugar will create a new database user using the provided database username and password after installation. This is similar to 'provide', except that Sugar assumes that it will be creating the database user during installation.

In your $sugar_config_si array, the options for this to work as expected are:

  'dbUSRData' => 'create',
'setup_db_create_sugarsales_user' => true,
'setup_db_sugarsales_user' => '{new_db_user_name}',
'setup_db_sugarsales_password' => '{new_db_user_password}',
'setup_db_sugarsales_password_retype' => '{new_db_user_password}',


Note: For create, the installer will create a user with access only to the database created for this Sugar instance. It will also have limited access for which host it can connect from, versus the admin user, which usually has access from any host.

Sugar will set the user to have access to localhost and the provided hostname derived from setup_site_url. If there are issues connecting to the database during or after installation, check that the user was created correctly in the database and that the user can connect from the host that the instance is on.

Other Silent Install Config Options

Many of these options match an equivalent Sugar Config option, with further descriptions available at Core Settings.

cache_dir

Description This is the directory Sugar will store all cached files. Can be relative to Sugar root directory.
Type String, default "cache/"

Locale Settings

The following options are locale settings. With one exception, these can be set or updated through Administration > Locale. 

export_delimiter

Description The field delimiter (separator) used when exporting records as CSV
Type String, default ","

default_export_charset

Description The default character set for CSV files to be encoded in when exporting
Type String, default "ISO-8859-1"

default_currency_iso4217

Description The ISO-4217 code of the default currency
Type String, default "USD"

default_currency_name

Description The name to use for the default currency
Type String, default "US Dollars"

default_currency_significant_digits

Description

Changes the number of significant digits in currency by default.

Note that this setting can not be changed through the Admin panel after installation. It can be set for each user through the user's profile or can be updated globally by updating the config array.

Type Integer, default 2

default_currency_symbol

Description The symbol to use for the default currency
Type String, default "$"

default_language

Description Sets each user's default language. Possible values include any language offered by Sugar, such as: 'ar_SA', 'bg_BG', 'ca_ES', 'cs_CZ', 'da_DK', 'de_DE', 'el_EL', 'en_UK', 'en_us', 'es_ES', 'es_LA', 'zh_CN'
Type String, default "en_US"

default_date_format

Description Modifies the default date format for all users.
Type String, default "m/d/Y"

default_time_format

Description Modifies the default time format for all users.
Type String, default "H:i"

default_decimal_seperator

Description Sets the character used as a decimal separator for numbers.
Type String, default "."

default_number_grouping_seperator

Description Sets the character used as the 1000s separator for numbers.
Type String, default ","

default_locale_name_format

Description Sets the format for displaying full name (eg "Salutation FirstName LastName" vs "LastName, FirstName"
Type String, default "s f l"