MongoDB 7.0 on OpenSUSE 15.5 (X86-64) with support by Hfami
AWS-Marketplace
https://aws.amazon.com/marketplace/pp/prodview-zxygatp5r24wq
Usage Instructions
1. Use mongodb
Go to the mongodb directory:
cd /usr/local/mongodb/bin
Start the database directly:
sudo ./mongod -f mongodb.conf
The console outputs the following:
about to fork child process, waiting until server is ready for connections.
forked process: 21512
child process started successfully, parent exiting
Go to the mongosh directory:
cd /usr/local/mongodb/bin/mongosh/bin
Launch an interactive command line interface (CLI) tool:
sudo ./mongosh
The console outputs the following:
Current Mongosh Log ID: 666a5ef9d25249bf75400396
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.0
Using MongoDB: 7.0.8
Using Mongosh: 1.6.0
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
The server generated these startup warnings when booting
2024-06-13T02:46:17.873+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
2024-06-13T02:46:17.873+00:00: You are running this process as the root user, which is not recommended
2024-06-13T02:46:17.873+00:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never' in this binary version
2024-06-13T02:46:17.873+00:00: Soft rlimits for open file descriptors too low
test>
Find mongodb related processes:
ps -ef | grep mongodb.conf
The console outputs the following:
mongodb 12345 1 0 08:30 ? 00:00:01 /usr/bin/mongod --config /etc/mongodb.conf
user 12346 5678 0 08:31 pts/0 00:00:00 grep --color=auto mongodb.conf
Stop mongodb:
sudo kill 12345
2.Configuration mongodb.conf
Go to the mongodb directory:
cd /usr/local/mongodb/bin
sudo vi mongodb.conf
mongodb data file storage path (specify database directory)
- dbpath = /usr/local/mongodb/data
mongod's log path (specifying the log file directory)
- logpath = /usr/local/mongodb/logs/mongodb.log
The log uses appends instead of overwrites
- logappend=true
prot
- port = 27017
Enabled as a daemon, that is, it runs in the background
- fork = false
Authentication mode
Here is true, need to set the account and password (next step)
- auth=true
Remote connection
- bind_ip=0.0.0.0