This is the repository for the Elastic stack MSI-based Windows installers.
Simply clone the repository and run
build.bat
This will download the latest version of the stack (currently only Elasticsearch) and create the MSIs.
You can also specify a specific version
build.bat 5.1.1
There are many other configuration options available, run the following to see them all
build.bat help
NOTE: Building from source should only be done for development purposes. Only the officially distributed and signed Elastic installer should be used in production. Using an unofficial Elastic installer is not supported.
Instead of installing through the UI, it is also possible to perform an installation in "quiet" mode via the command-line using msiexec and passing the /qn
flag, which will invoke the installer without the UI. This can be particularly useful for automating deployments.
start /wait msiexec.exe /i elasticsearch-5.5.0.msi /qn
You can also optionally specify a log file
start /wait msiexec.exe /i elasticsearch-5.5.0.msi /qn /l elastic-install.log
All of the configurable options available in the UI are also exposed as command line arguments to msiexec
:
start /wait msiexec.exe /i elasticsearch-5.5.0.msi /qn /l elastic-install.log NODENAME=my_node_name CLUSTERNAME=my_cluster_name
Parameter name | Description | Default value |
---|---|---|
INSTALLDIR | Elasticsearch installation path | %ProgramW6432% \Elastic\Elasticsearch |
DATADIRECTORY | Data directory path | %ALLUSERSPROFILE% \Elastic\Elasticsearch\data |
CONFIGDIRECTORY | Config directory path | %ALLUSERSPROFILE% \Elastic\Elasticsearch\config |
LOGSDIRECTORY | Logs directory path | %ALLUSERSPROFILE% \Elastic\Elasticsearch\logs |
CLUSTERNAME | Cluster name | elasticsearch |
NODENAME | Node name | %COMPUTERNAME% |
UNICASTHOSTS | Comma-delimited list of unicast nodes | |
HTTPPORT | Port to use for HTTP communication | 9200 |
TRANSPORTPORT | Port to use for transport (node-to-node communication) | 9300 |
MINIMUMMASTERNODES | Minimum number of master eligible nodes | 1 |
MASTERNODE | Whether this node should be master eligible | true |
DATANODE | Whether or not to make this a data node | true |
INGESTNODE | Whether or not to make this an ingest node | true |
NETWORKHOST | Hostname to bind to and advertise to other nodes | |
SELECTEDMEMORY | Amount of memory to allocate to the JVM | 2GB. If the target machine has less than 4GB RAM, then 50% RAM |
LOCKMEMORY | Whether or not to lock JVM memory | false |
INSTALLASSERVICE | Install as a Windows service | true |
STARTAFTERINSTALL | Start the service after install is completed | true |
STARTWHENWINDOWSSTARTS | Start the service when Windows starts (Automatic) | true |
USELOCALSYSTEM | Run the service as the LOCALSYSTEM user |
true |
USENETWORKSERVICE | Run the service as the NETWORKSERVICE user |
false |
USEEXISTINGUSER | Run the service as the specified USER |
false |
USER | Existing user to run the service as | |
PASSWORD | Password for the existing user | |
PLUGINS | Comma-delimited list of plugins to install |
If Elasticsearch was installed as a service via the MSI, then it can be controlled using the native Windows sc utility.
sc start Elasticsearch
to start the service, or
sc stop Elasticsearch
to stop it.
Configuring Elasticsearch specific settings while running as a service is as simple as editing the elasticsearch.yml
and jvm.options
files, and then restarting the service.
In addition to installing and running Elasticsearch as a service, it can also be started from the command-line by calling elasticsearch.exe
located in the bin
directory, much like the original elasticsearch.bat
that's distributed with the zip file.
It also accepts the same command-line arguments as the original bat file.
./elasticsearch.exe -E cluster.name=my_cluster_name -E node.name=my_node_name
To report any problems encountered during installation, or to request features, please open an issue. We ask that you please attach the MSI log file if applicable.
When installing from the command-line, the log file can be captured by passing the /l <logfilename>
. When installing through the UI, a link to the log file will be provided at the end of the installation.
For general questions and comments, please use the Elastic discussion forum.