Skip to content

Instantly share code, notes, and snippets.

@supersonictw
Last active November 26, 2024 00:42
Show Gist options
  • Save supersonictw/ec050c5b000bd3c0ac81d6c15a6c407c to your computer and use it in GitHub Desktop.
Save supersonictw/ec050c5b000bd3c0ac81d6c15a6c407c to your computer and use it in GitHub Desktop.
The simplest YugabyteDB single host systemd file. https://docs.yugabyte.com/stable/quick-start
[Install]
WantedBy=multi-user.target
[Unit]
Description=YugabyteDB is a high-performance transactional distributed SQL database.
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
Restart=always
RestartSec=5
User=yugabyte
WorkingDirectory=/opt/yugabyte
ExecStart=/opt/yugabyte/bin/yugabyted start --background=false
PermissionsStartOnly=True
TimeoutStartSec=30
LimitCORE=infinity
LimitNOFILE=1048576
LimitNPROC=12000
LimitMEMLOCK=64
@supersonictw
Copy link
Author

To create the system user, type in root:

useradd -r -U -M -d "/opt/yugabyte" yugabyte

@supersonictw
Copy link
Author

supersonictw commented Nov 24, 2024

The installation should install the YugabyteDB at /opt/yugabyte (a local cluster on a single host).

To correct the permissions of the directory:

chown -R yugabyte:yugabyte "/opt/yugabyte"

The yugabyted.service file should be located at /lib/systemd/system/yugabyted.service.

To enable and start the server:

systemctl enable --now yugabyted.service

@supersonictw
Copy link
Author

These codes are licensed by SPDX-License-Identifier: MIT.
License: https://ncurl.xyz/s/o_o6DVqIR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment