Update config files docs
This commit updates the docs for the config files to explain the new mechanism for customizing the configuration directory via the environment variable CONF_DIR. Relates #25990
This commit is contained in:
parent
4d589afbc2
commit
bc8dc683e4
|
@ -15,10 +15,9 @@ packages.
|
|||
Previous versions of Elasticsearch enabled setting `path.conf` as a
|
||||
setting. This was rather convoluted as it meant that you could start
|
||||
Elasticsearch with a config file that specified via `path.conf` that
|
||||
Elasticsearch should use another config file. Instead, `path.conf` is now a
|
||||
command-line flag. To start Elasticsearch with a custom config file, use `-c
|
||||
/path/to/config` or `--path.conf /path/to/config`. Here, `/path/to/config` is
|
||||
the *directory* containing the config file.
|
||||
Elasticsearch should use another config file. Instead, to configure a custom
|
||||
config directory, use the <<config-files-location,`CONF_DIR` environment
|
||||
variable>>.
|
||||
|
||||
==== Default path settings are removed
|
||||
|
||||
|
|
|
@ -9,26 +9,42 @@ The configuration files should contain settings which are node-specific (such
|
|||
as `node.name` and paths), or settings which a node requires in order to be
|
||||
able to join a cluster, such as `cluster.name` and `network.host`.
|
||||
|
||||
[[config-files-location]]
|
||||
[float]
|
||||
=== Config file location
|
||||
=== Config files location
|
||||
|
||||
Elasticsearch has two configuration files:
|
||||
Elasticsearch has three configuration files:
|
||||
|
||||
* `elasticsearch.yml` for configuring Elasticsearch, and
|
||||
* `log4j2.properties` for configuring Elasticsearch logging.
|
||||
* `elasticsearch.yml` for configuring Elasticsearch
|
||||
* `jvm.options` for configuring Elasticsearch JVM settings
|
||||
* `log4j2.properties` for configuring Elasticsearch logging
|
||||
|
||||
These files are located in the config directory, whose location defaults to
|
||||
`$ES_HOME/config/`. The Debian and RPM packages set the config directory
|
||||
location to `/etc/elasticsearch/`.
|
||||
These files are located in the config directory, whose default location depends
|
||||
on whether or not the installation is from an archive distribution (`tar.gz` or
|
||||
`zip`) or a package distribution (Debian or RPM packages).
|
||||
|
||||
The location of the config directory can be changed with the `path.conf`
|
||||
flag, as follows:
|
||||
For the archive distributions, the config directory location defaults to
|
||||
`$ES_HOME/config`. The location of the config directory can be changed via the
|
||||
`CONF_DIR` environment variable as follows:
|
||||
|
||||
[source,sh]
|
||||
-------------------------------
|
||||
./bin/elasticsearch --path.conf /path/to/my/config/
|
||||
CONF_DIR=/path/to/my/config ./bin/elasticsearch
|
||||
-------------------------------
|
||||
|
||||
Alternatively, you can `export` the `CONF_DIR` environment variable via the
|
||||
command line or via your shell profile.
|
||||
|
||||
For the package distributions, the config directory location defaults to
|
||||
`/etc/elasticsearch`. The location of the config directory can also be changed
|
||||
via the `CONF_DIR` environment variable, but note that setting this in your
|
||||
shell is not sufficient. Instead, this variabled is sourced from
|
||||
`/etc/default/elasticsearch` (for the Debian package) and
|
||||
`/etc/sysconfig/elasticsearch` (for the RPM package). You will need to edit the
|
||||
`CONF_DIR=/etc/elasticsearch` entry in one of these files accordingly to change
|
||||
the config directory location.
|
||||
|
||||
|
||||
[float]
|
||||
=== Config file format
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ locations for a Debian-based system:
|
|||
| conf
|
||||
| Configuration files including `elasticsearch.yml`
|
||||
| /etc/elasticsearch
|
||||
| path.conf
|
||||
| <<config-files-location,CONF_DIR>>
|
||||
|
||||
| conf
|
||||
| Environment variables including heap size, file descriptors.
|
||||
|
|
|
@ -185,7 +185,7 @@ locations for an RPM-based system:
|
|||
| conf
|
||||
| Configuration files including `elasticsearch.yml`
|
||||
| /etc/elasticsearch
|
||||
| path.conf
|
||||
| <<config-files-location,CONF_DIR>>
|
||||
|
||||
| conf
|
||||
| Environment variables including heap size, file descriptors.
|
||||
|
|
|
@ -164,7 +164,7 @@ directory so that you do not delete important data later on.
|
|||
| conf
|
||||
| Configuration files including `elasticsearch.yml`
|
||||
| $ES_HOME/config
|
||||
| path.conf
|
||||
| <<config-files-location,CONF_DIR>>
|
||||
|
||||
| data
|
||||
| The location of the data files of each index / shard allocated
|
||||
|
|
|
@ -234,7 +234,7 @@ directory so that you do not delete important data later on.
|
|||
| conf
|
||||
| Configuration files including `elasticsearch.yml`
|
||||
| %ES_HOME%\config
|
||||
| path.conf
|
||||
| <<config-files-location,CONF_DIR>>
|
||||
|
||||
| data
|
||||
| The location of the data files of each index / shard allocated
|
||||
|
|
|
@ -88,9 +88,8 @@ To upgrade using a zip or compressed tarball:
|
|||
overwrite the `config` or `data` directories.
|
||||
|
||||
* Either copy the files in the `config` directory from your old installation
|
||||
to your new installation, or set the environment variable `ES_JVM_OPTIONS`
|
||||
to the location of the `jvm.options` file and use the `-E path.conf=`
|
||||
option on the command line to point to an external config directory.
|
||||
to your new installation, or set the environment variable
|
||||
<<config-files-location,`CONF_DIR`>> to point to a custom config directory.
|
||||
|
||||
* Either copy the files in the `data` directory from your old installation
|
||||
to your new installation, or configure the location of the data directory
|
||||
|
|
Loading…
Reference in New Issue