Editing
OpenSearch Cluster Installation
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Node Preparation == Each node to be used in the cluster must be prepared to support the OpenSearch installation. === Create Opensearch User === Debian/Ubuntu: sudo adduser --system -uid 968 --shell /bin/bash --gecos 'OpenSearch User' --group --disabled-password --home /opt/opensearch opensearch Fedora/RHEL: sudo adduser --system --uid 968 --shell /bin/bash --home-dir /opt/opensearch -m opensearch Then add your normal user to the group: sudo usermod -aG opensearch ewilliam === Set vm.max_map_count === Create <code>/etc/sysctl.d/vm.maxmap_count.conf</code> (as root) and add the following line: vm.max_map_count=262144 Run the following command as root to load the new configuration: sysctl --system === Systemd Unit File === One of the big things missing from the tarball distribution is a systemd unit file. Fortunately, it isn't difficult to create a simple one that will work. Create a file <code>/etc/systemd/system/opensearch.service</code> with the following contents: [Unit] Description=OpenSearch Documentation=<nowiki>https://opensearch.org/docs/</nowiki> Wants=network-online.target After=network-online.target [Service] Type=exec RuntimeDirectory=opensearch PrivateTmp=true Environment=OPENSEARCH_HOME=/opt/opensearch/opensearch Environment=OPENSEARCH_PATH_CONF=/opt/opensearch/opensearch/config Environment=PID_DIR=/opt/opensearch/opensearch Environment=OPENSEARCH_SD_NOTIFY=true EnvironmentFile=-/opt/opensearch/opensearch/opensearch.env WorkingDirectory=/opt/opensearch/opensearch User=opensearch Group=opensearch ExecStart=/opt/opensearch/opensearch/bin/opensearch -p ${PID_DIR}/opensearch.pid --quiet # StandardOutput is configured to redirect to journalctl since # some error messages may be logged in standard output before # elasticsearch logging system is initialized. Elasticsearch # stores its logs in /var/log/elasticsearch and does not use # journalctl by default. If you also want to enable journalctl # logging, you can simply remove the "quiet" option from ExecStart. StandardOutput=journal StandardError=inherit # Specifies the maximum file descriptor number that can be opened by this process LimitNOFILE=65535 # Specifies the maximum number of processes LimitNPROC=4096 # Specifies the maximum size of virtual memory LimitAS=infinity # Specifies the maximum file size LimitFSIZE=infinity # Disable timeout logic and wait until process is stopped TimeoutStopSec=0 # SIGTERM signal is used to stop the Java process KillSignal=SIGTERM # Send the signal only to the JVM rather than its control group KillMode=process # Java process is never killed SendSIGKILL=no # When a JVM receives a SIGTERM signal it exits with code 143 SuccessExitStatus=143 # Allow a slow startup before the systemd notifier module kicks in to extend the timeout TimeoutStartSec=75 [Install] WantedBy=multi-user.target
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information