From 54b943fbf30720beda435ebeb1ad5bcb2877f0d7 Mon Sep 17 00:00:00 2001 From: sc516 Date: Sun, 24 May 2026 00:21:36 +0900 Subject: [PATCH] Fix systemd service example --- documentation/deployment/systemd.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/documentation/deployment/systemd.md b/documentation/deployment/systemd.md index 95ea07ea4..789c64ebf 100644 --- a/documentation/deployment/systemd.md +++ b/documentation/deployment/systemd.md @@ -1,12 +1,12 @@ --- title: Launch QuestDB with systemd sidebar_label: systemd -description: This document describes how to launch QuestBD using systemd. +description: This document describes how to launch QuestDB using systemd. --- Use systemd to run QuestDB as a system or user service. This guide will demonstrate an initial configuration which you can use as the basis for your -installation scripts. It will also demonstrate how to setup and start a QuestDB +installation scripts. It will also demonstrate how to set up and start a QuestDB systemd service. ## Prerequisites @@ -37,6 +37,7 @@ export PATH=$JAVA_HOME/bin:$PATH # Download and set up QuestDB curl -s https://dl.questdb.io/snapshots/questdb-latest-no-jre-bin.tar.gz -o questdb.tar.gz mkdir -p ~/questdb/binary +mkdir -p ~/bin ~/var/lib/questdb tar -xzf questdb.tar.gz -C ~/questdb/binary --strip-components 1 mv ~/questdb/binary/questdb.jar ~/bin/ ``` @@ -45,7 +46,7 @@ mv ~/questdb/binary/questdb.jar ~/bin/ Your QuestDB configuration is done in a `server.conf` file. The `server.conf` file is populated with safe defaults on first startup if it does not exist. It -is common for user's of QuestDB to stick with the default configuration. +is common for users of QuestDB to stick with the default configuration. However, should you choose to update your own and serve it via a scripted method or similar, you may do so. @@ -76,14 +77,15 @@ Restart=always RestartSec=2 # Adjust java path to match requirements of a given distro ExecStart=/home/[USER_NAME]/jdk/bin/java \ +-XX:+UnlockExperimentalVMOptions \ +-XX:+AlwaysPreTouch \ +-XX:+UseParallelGC \ +-DQuestDB-Runtime-66535 \ +-Dcontainerized=false \ +-ea -Dnoebug \ --add-exports java.base/jdk.internal.math=io.questdb \ -p /home/[USER_NAME]/bin/questdb.jar \ -m io.questdb/io.questdb.ServerMain \ --DQuestDB-Runtime-66535 \ --ea -Dnoebug \ --XX:+UnlockExperimentalVMOptions \ --XX:+AlwaysPreTouch \ --XX:+UseParallelOldGC \ -d /home/[USER_NAME]/var/lib/questdb ExecReload=/bin/kill -s HUP $MAINPID @@ -166,4 +168,4 @@ You can check the status of the timers using: ```bash systemctl list-timers --all | grep apt -``` \ No newline at end of file +```