mongodb centos7 安装

 
https://www.mongodb.com/try/download/community

centos7 
wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/7.0/x86_64/RPMS/mongodb-org-server-7.0.4-1.el7.x86_64.rpm

rpm -ivh mongodb-org-server-7.0.4-1.el7.x86_64.rpm

# which mongod
/usr/bin/mongod

mkdir -p /opt/app/mongodb/{data,log}

mongod --port=27017 --dbpath=/opt/app/mongodb/data --logpath=/opt/app/mongodb/log/mongodb.log --bind_ip=0.0.0.0 --fork


# netstat -tunlp |grep mongo
tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN      201/mongod          


connecting to: mongodb://127.0.0.1:27017

客户端 compass
https://www.mongodb.com/products/tools/compass
https://www.mongodb.com/try/download/shell
https://downloads.mongodb.com/compass/mongosh-2.1.1-x64.msi

命令行版
wget https://downloads.mongodb.com/compass/mongodb-mongosh-2.1.1.x86_64.rpm
yum localinstall mongodb-mongosh-2.1.1.x86_64.rpm 

[root@nd ~]# 
[root@nd ~]# mongosh
Current Mongosh Log ID:	6572d8e7f2aa0e8293805e94
Connecting to:		mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1
Using MongoDB:		7.0.4
Using Mongosh:		2.1.1

For mongosh info see: https://docs.mongodb.com/mongodb-shell/

------
   The server generated these startup warnings when booting
   2023-12-08T03:01:12.236-05:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
   2023-12-08T03:01:12.236-05:00: You are running this process as the root user, which is not recommended
   2023-12-08T03:01:12.236-05:00: vm.max_map_count is too low
------

Deprecation warnings:
  - Using mongosh on the current operating system is deprecated, and support may be removed in a future release.
See https://www.mongodb.com/docs/mongodb-shell/install/#supported-operating-systems for documentation on supported platforms.
test> db
test
test> show dbs
admin              40.00 KiB
bnew-development    8.00 KiB
config            108.00 KiB
local              40.00 KiB

创建数据库 
test> use bnew-development
switched to db bnew-development

bnew-development> db
bnew-development

参考
    sklearn2pmml github

    PMML讲解及使用