From cfa9aa8ed6d39cf587c743e273cc9414847a27ab Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:36:06 -0300 Subject: [PATCH 1/2] Update installation instructions for MongoDB --- docs/install/tarball.md | 71 +++++++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/docs/install/tarball.md b/docs/install/tarball.md index af6f31399..5ba17a39f 100644 --- a/docs/install/tarball.md +++ b/docs/install/tarball.md @@ -84,15 +84,61 @@ The following steps show how to install Percona Server for MongoDB from a tarbal ```bash sudo mkdir -p /data/db ``` - - 5. The new TCMalloc requires [Restartable Sequences (rseq) :octicons-link-external-16:](https://github.com/google/tcmalloc/blob/master/docs/design.md#restartable-sequences-and-per-cpu-tcmalloc) to implement [per-CPU caches :octicons-link-external-16:](https://www.mongodb.com/docs/upcoming/reference/glossary/#std-term-per-CPU-cache). To ensure that TCMalloc can use rseq, prevent glibc from registering an rseq structure. To do this, set the following environment variable: - ```bash - GLIBC_TUNABLES=glibc.pthread.rseq=0 - export GLIBC_TUNABLES + 5. Create a user and group for mongod + + ```bash + $ groupadd -r mongod + $ useradd -M -r -g mongod -d /var/lib/mongo -s /bin/false -c mongod mongod + ``` + + 6. The new TCMalloc requires [Restartable Sequences (rseq) :octicons-link-external-16:](https://github.com/google/tcmalloc/blob/master/docs/design.md#restartable-sequences-and-per-cpu-tcmalloc) to implement [per-CPU caches :octicons-link-external-16:](https://www.mongodb.com/docs/upcoming/reference/glossary/#std-term-per-CPU-cache). To ensure that TCMalloc can use rseq, prevent glibc from registering an rseq structure. To do this, set the following environment variable: + + ```bash + GLIBC_TUNABLES=glibc.pthread.rseq=0 + export GLIBC_TUNABLES + ``` - 6. Make sure that you have read and write permissions for the data - directory and run `mongod`. + 7. (Optional) Create a systemd unit file. Specify the following configuration: + + ```bash + tee /usr/lib/systemd/system/mongod.service < Date: Tue, 23 Jun 2026 08:05:03 -0300 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/install/tarball.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/install/tarball.md b/docs/install/tarball.md index 5ba17a39f..daa3cfedf 100644 --- a/docs/install/tarball.md +++ b/docs/install/tarball.md @@ -88,8 +88,8 @@ The following steps show how to install Percona Server for MongoDB from a tarbal 5. Create a user and group for mongod ```bash - $ groupadd -r mongod - $ useradd -M -r -g mongod -d /var/lib/mongo -s /bin/false -c mongod mongod + sudo groupadd -r mongod + sudo useradd -M -r -g mongod -d /var/lib/mongo -s /bin/false -c mongod mongod ``` 6. The new TCMalloc requires [Restartable Sequences (rseq) :octicons-link-external-16:](https://github.com/google/tcmalloc/blob/master/docs/design.md#restartable-sequences-and-per-cpu-tcmalloc) to implement [per-CPU caches :octicons-link-external-16:](https://www.mongodb.com/docs/upcoming/reference/glossary/#std-term-per-CPU-cache). To ensure that TCMalloc can use rseq, prevent glibc from registering an rseq structure. To do this, set the following environment variable: @@ -101,8 +101,8 @@ The following steps show how to install Percona Server for MongoDB from a tarbal 7. (Optional) Create a systemd unit file. Specify the following configuration: - ```bash - tee /usr/lib/systemd/system/mongod.service < /dev/null [Unit] Description=MongoDB Database Server instance After=time-sync.target network.target @@ -136,6 +136,8 @@ The following steps show how to install Percona Server for MongoDB from a tarbal [Install] WantedBy=multi-user.target EOF + sudo systemctl daemon-reload + sudo systemctl enable --now mongod ``` 8. Make sure that you have read and write permissions for the data directory and run `mongod`.