Project

General

Profile

Task #25067

Test install from tarball

Added by Natalia Ratnikova about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Start date:
10/12/2020
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:
Duration:

History

#1 Updated by Natalia Ratnikova about 1 month ago

Install from tarball steps

1. Login to mysql@mariadbwp-d3
2.

cd /home/mysql/natalia/MONGODB 
wget  https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel80-4.4.1.tgz

3. Check dependencies:
[mysql@mariadbwp-d3 MONGODB]$ rpm -qa > rpm-qa
[mysql@mariadbwp-d3 MONGODB]$ for p in libcurl openssl xz-libs; do echo ===== Checking $p ;grep $p rpm-qa ; done
===== Checking libcurl
libcurl-7.61.1-12.el8.x86_64
===== Checking openssl
openssl-libs-1.1.1c-15.el8.x86_64
openssl-1.1.1c-15.el8.x86_64
openssl-pkcs11-0.4.10-2.el8.x86_64
xmlsec1-openssl-1.2.25-4.el8.x86_64
===== Checking xz-libs
xz-libs-5.2.4-3.el8.x86_64
[mysql@mariadbwp-d3 MONGODB]$ 

4. Extract the archive:
[mysql@mariadbwp-d3 MONGODB]$ tar -xzvf mongodb-linux-x86_64-rhel80-4.4.1.tgz 
mongodb-linux-x86_64-rhel80-4.4.1/LICENSE-Community.txt
mongodb-linux-x86_64-rhel80-4.4.1/MPL-2
mongodb-linux-x86_64-rhel80-4.4.1/README
mongodb-linux-x86_64-rhel80-4.4.1/THIRD-PARTY-NOTICES
mongodb-linux-x86_64-rhel80-4.4.1/bin/install_compass
mongodb-linux-x86_64-rhel80-4.4.1/bin/mongo
mongodb-linux-x86_64-rhel80-4.4.1/bin/mongod
mongodb-linux-x86_64-rhel80-4.4.1/bin/mongos
[mysql@mariadbwp-d3 MONGODB]$ 

5. Set the environment:
[mysql@mariadbwp-d3 MONGODB]$ export PATH=$PATH:`pwd`/mongodb-linux-x86_64-rhel80-4.4.1/bin/
[mysql@mariadbwp-d3 MONGODB]$ echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/puppetlabs/bin:/home/mysql/natalia/MONGODB/mongodb-linux-x86_64-rhel80-4.4.1/bin/
[mysql@mariadbwp-d3 MONGODB]$

#2 Updated by Natalia Ratnikova about 1 month ago

Run MongoDB community Edition

1) Prerequisites:

Note: 

Starting in MongoDB 4.4, a startup error is generated if the ulimit value for number of open files is under 64000.

Check our value:
[mysql@mariadbwp-d3 MONGODB]$ ulimit
unlimited

2. Adjust to non-default locations:

See https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat-tarball/#to-use-non-default-directories

[mysql@mariadbwp-d3 MONGODB]$  cat mongod.conf 

#    storage.dbPath to specify a new data directory path (e.g. /some/data/directory)
#    systemLog.path to specify a new log file path (e.g. /some/log/directory/mongod.log)

storage.dbPath /home/mysql/natalia/MONGODB/data/db
systemLog.path /home/mysql/natalia/MONGODB/logs/mongod.log
[mysql@mariadbwp-d3 MONGODB]$ mkdir -p /home/mysql/natalia/MONGODB/data/db /home/mysql/natalia/MONGODB/logs
[mysql@mariadbwp-d3 MONGODB]$ 

3. Start the server:

[mysql@mariadbwp-d3 MONGODB]$ mongod --dbpath /home/mysql/natalia/MONGODB/data/db  --logpath /home/mysql/natalia/MONGODB/logs/mongod.log --fork
about to fork child process, waiting until server is ready for connections.
forked process: 3168097
child process started successfully, parent exiting
[mysql@mariadbwp-d3 MONGODB]$ 

4. Check that server has started properly:

[mysql@mariadbwp-d3 MONGODB]$ tail -5 logs/mongod.log 
{"t":{"$date":"2020-10-12T17:54:35.925-05:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
{"t":{"$date":"2020-10-12T17:54:35.925-05:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"127.0.0.1"}}
{"t":{"$date":"2020-10-12T17:54:35.925-05:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
{"t":{"$date":"2020-10-12T17:54:35.932-05:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"LogicalSessionCacheRefresh","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"config.system.sessions","index":"_id_","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2020-10-12T17:54:35.932-05:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"LogicalSessionCacheRefresh","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"config.system.sessions","index":"lsidTTLIndex","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}}
[mysql@mariadbwp-d3 MONGODB]$ 

5. Start mongo client shell:

[mysql@mariadbwp-d3 MONGODB]$ mongo
MongoDB shell version v4.4.1
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("19b75d11-7b74-4db3-88cb-3110ccb69e28") }
MongoDB server version: 4.4.1
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
    https://docs.mongodb.com/
Questions? Try the MongoDB Developer Community Forums
    https://community.mongodb.com
---
The server generated these startup warnings when booting: 
        2020-10-12T17:54:35.912-05:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
        2020-10-12T17:54:35.912-05:00: This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip <address> to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning
        2020-10-12T17:54:35.913-05:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'
        2020-10-12T17:54:35.913-05:00: Soft rlimits too low
        2020-10-12T17:54:35.913-05:00:         currentValue: 1024
        2020-10-12T17:54:35.913-05:00:         recommendedMinimum: 64000
---
---
        Enable MongoDB's free cloud-based monitoring service, which will then receive and display
        metrics about your deployment (disk utilization, CPU, operation statistics, etc).

        The monitoring data will be available on a MongoDB website with a unique URL accessible to you
        and anyone you share the URL with. MongoDB may use this information to make product
        improvements and to suggest MongoDB products and deployment options to you.

        To enable free monitoring, run the following command: db.enableFreeMonitoring()
        To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
---
> 

#3 Updated by Natalia Ratnikova about 1 month ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved

Also available in: Atom PDF