Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions distribution/src/main/packaging/scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ case "$1" in
esac

# to pick up /usr/lib/sysctl.d/elasticsearch.conf
if command -v /usr/lib/systemd/systemd-sysctl > /dev/null; then
/usr/lib/systemd/systemd-sysctl
elif command -v /lib/systemd/systemd-sysctl > /dev/null; then
/lib/systemd/systemd-sysctl
if [ "${ES_SKIP_SET_KERNEL_PARAMETERS:-false}" == "false" ]; then
if command -v /usr/lib/systemd/systemd-sysctl > /dev/null; then
/usr/lib/systemd/systemd-sysctl
elif command -v /lib/systemd/systemd-sysctl > /dev/null; then
/lib/systemd/systemd-sysctl
fi
elif [ "$ES_SKIP_SET_KERNEL_PARAMETERS" == "true" ]; then
echo "skipping setting kernel parameters"
else
echo "unrecognized value [$ES_SKIP_SET_KERNEL_PARAMETERS] for ES_SKIP_SET_KERNEL_PARAMETERS; must [false] (default) or [true]"
exit 1
fi

if [ "x$IS_UPGRADE" != "xtrue" ]; then
Expand Down
1 change: 1 addition & 0 deletions docs/reference/setup/install/deb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Examine +/etc/apt/sources.list.d/elasticsearch-{major-version}.list+ for the dup

endif::[]

include::skip-set-kernel-parameters.asciidoc[]

[[install-deb]]
==== Download and install the Debian package manually
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/setup/install/rpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ sudo rpm --install elasticsearch-{version}.rpm

endif::[]

include::skip-set-kernel-parameters.asciidoc[]

include::init-systemd.asciidoc[]

[[rpm-running-init]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NOTE: On systemd-based distributions, the installation scripts will attempt to set kernel parameters (e.g.,
`vm.max_map_count`); you can skip this by setting the environment variable `ES_SKIP_SET_KERNEL_PARAMETERS` to `true`.