https://github.com/uditkarode/void-mongod
MongoDB (mongod) for Void Linux
https://github.com/uditkarode/void-mongod
linux mongo mongo-db mongo-runit mongod mongod-static mongodb runit static statically-linked void void-linux void-mongo-runit void-runit
Last synced: about 2 months ago
JSON representation
MongoDB (mongod) for Void Linux
- Host: GitHub
- URL: https://github.com/uditkarode/void-mongod
- Owner: uditkarode
- Created: 2021-11-13T14:34:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-13T17:47:25.000Z (almost 4 years ago)
- Last Synced: 2025-04-19T02:26:24.814Z (6 months ago)
- Topics: linux, mongo, mongo-db, mongo-runit, mongod, mongod-static, mongodb, runit, static, statically-linked, void, void-linux, void-mongo-runit, void-runit
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# void-mongod
The `mongod` binary in releases was generated using [staticx](https://github.com/JonathonReinhart/staticx) on the official Docker container of mongodb.
I've included a runit service to start it.# Instructions
Make sure you have `git` and `wget` installed.
If not, you can do it with `xbps-install -S git wget`.Run the following to install `mongod` with the service:
```bash
# or your own binary
wget https://github.com/uditkarode/void-mongod/releases/download/v5.0.3/mongodchmod +x mongod
sudo mv mongod /usr/local/bin
cd /tmp
git clone --depth 1 https://github.com/uditkarode/void-mongod
cd void-mongod
sudo mv mongod.conf /etc/mongod.conf
sudo mv mongod /etc/sv
sudo ln -sv /etc/sv/mongod /var/service
sudo sv start mongod
```
If you see something like `warning: mongod: unable to open supervise/ok: file does not exist`, you can ignore it.
`mongod` is now running!
It will also autostart on every system boot.
The logs will be saved to `/tmp/sv/log/mongod/current`.# Configuration
The config file is at `/etc/mongod.conf`. If you make any changes that involve logging/storing in new directories, make sure whatever directories you use exist on the filesystem. You can also add a line like `mkdir -p $YOUR_CUSTOM_FOLDER` in `/etc/sv/mongod/run`, just like and after the second line of that file just to be sure.
Note that mongod by default only accepts connections from localhost. If you want it to accept connections from anywhere, change the `127.0.0.1` in the configuration file to `0.0.0.0`.