mongodb安装_mongodb-org-shell-程序员宅基地

技术标签: mongo  MONGO  mongod  

mongodb下载地址:

https://docs.mongodb.com/manual/installation/

其中server仅包含mongodb server,shell仅包含mongo客户端命令mongo

rpm可以用yum或者rpm安装,tgz直接解压并配置path就可以使用

最后那个tgz包包含了所有组件(mongos,shell和server),直接解压就可以使用

 

我这次是server和shell分开安装的

1.安装server

[root@lzl soft]# rpm -ivh mongodb-server-4.4.2-el6x86.rpm

warning: EasyConnectPlugin.dmg: Header V3 RSA/SHA1 Signature, key ID 90cfb1f5: NOKEY

Preparing...               ########################################### [100%]

   1:mongodb-org-server    ########################################### [100%]

 

[root@lzl mongo]# ls -lrt /usr/bin/mongo*

-rwxr-xr-x 1 root root 82214928 Nov 17 00:12 /usr/bin/mongod

 

2.启动server

[root@lzl ~]# mongod -f /etc/mongod.conf &

[1] 4901

about to fork child process, waiting until server is ready for connections.

forked process: 4903

 

[root@lzl ~]# child process started successfully, parent exiting

 

[1]+  Done                    mongod -f /etc/mongod.conf

[root@lzl ~]# ps -ef|grep mongo

root      4903    1 17 11:54 ?        00:00:01 mongod -f /etc/mongod.conf

root      4938 4808  0 11:54 pts/9    00:00:00 grep mongo

 

3.安装mongo shell

 

[root@lzl soft]# rpm -ivh mongodb-org-shell-4.4.2-1.el6.x86_64.rpm

warning: mongodb-org-shell-4.4.2-1.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 90cfb1f5: NOKEY

Preparing...               ########################################### [100%]

   1:mongodb-org-shell     ########################################### [100%]

 

[root@lzl soft]# which mongo

/usr/bin/mongo

[root@lzl soft]# which mongod

/usr/bin/mongod

[root@lzl soft]# 

 

[root@lzl soft]# mongo
MongoDB shell version v4.4.2
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("8840dd6e-4c7b-4369-a2f7-7ecc9028b571") }
MongoDB server version: 4.4.2
---
The server generated these startup warnings when booting: 
        2020-12-02T11:56:39.219+08:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
        2020-12-02T11:56:41.256+08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
        2020-12-02T11:56:41.256+08:00: You are running this process as the root user, which is not recommended
        2020-12-02T11:56:41.265+08:00: Soft rlimits too low
        2020-12-02T11:56:41.265+08:00:         currentValue: 1024
        2020-12-02T11:56:41.265+08: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()
---

> show dbs
admin   0.000GB
config  0.000GB
local   0.000GB

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_40687433/article/details/110484597

智能推荐

open vswitch研究:openflow I_live for fast failover group-程序员宅基地

文章浏览阅读9.6k次。关于openflow的规范不是本文讨论范畴,这篇主要讨论OVS对openflow的支持,代码基本都在ofproto/目录下struct ofproto代表了一个openflow switch的模型,是一个"接口类"struct ofproto { struct hmap_node hmap_node; /* In global 'all_ofprotos' hmap. */_live for fast failover group

Lua 打乱数组顺序_lua数组打断顺序-程序员宅基地

文章浏览阅读9.3k次。function shuffle(t) if type(t)~="table" then return end local l=#t local tab={} local index=1 while #t~=0 do local n=math.random(0,#t) if t[n]~=nil then_lua数组打断顺序

企业级静态代码分析工具清单_源码扫描 商业软件-程序员宅基地

文章浏览阅读4.1k次。如果要选择一款企业级静态源代码安全扫描工具,那么Gartner 2021应用程序安全测试 (AST) 魔力象限,就可以给我们在产品选型提供很重要的参考。本文整理的是一份商业静态源代码分析工..._源码扫描 商业软件

【汽修帮手】数据采集,爬虫,根据pdf文件流合并pdf文件-程序员宅基地

文章浏览阅读1.6k次,点赞35次,收藏11次。【代码】【汽修帮手】数据采集,爬虫,根据pdf文件流合并pdf文件。

异质图综述 - Graph Neural Networks for Graphs with Heterophily: A Survey(CoRR 2022)-程序员宅基地

文章浏览阅读3.4k次,点赞6次,收藏31次。异质图综述 - Graph Neural Networks for Graphs with Heterophily: A Survey(CoRR 2022)_graph neural networks for graphs with heterophily: a survey

【有向目标检测】SCRDet_什么是有向目标检测-程序员宅基地

文章浏览阅读858次,点赞24次,收藏18次。引入 IoU 常数因子∣−logIoU∣∣Lregvjvj∣∣Lreg​vj​vj​∣∣−logIoU∣​在Smooth L1 Loss中,如下面公式中的回归部分在边界情况下,新的损失函数近似等于0,消除了损失的突增。新的回归损失可分为两部分,smooth L1回归损失函数取单位向量确定梯度传播的方向,而IoU表示梯度的大小,这样loss函数就变得连续。_什么是有向目标检测

随便推点

sklearn学习之使用sklearn进行特征选择_sklearn。feature_selection-程序员宅基地

文章浏览阅读7.7k次,点赞4次,收藏42次。在本节中我们将使用sklearn.feature_selection模块中的类在高维度的样本集上进行特征选择、降维来提升估计器的性能。1. Removing features with low variance方差选择法sklearn.feature_selection.VarianceThreshold(threshold=0.0)方差选择法是一种进行特征选择的简单的baseline方法,..._sklearn。feature_selection

IOT开发中,什么时候选择RTOS系统?_iot要用到rtos吗-程序员宅基地

文章浏览阅读93次。大部分主流MCU都是支持的,例如:stm32、ESP32,但实际开发中,也见过不支持的MCU,例如上海博通集成的蓝牙芯片:BK3633,该芯片在实际开发中,因为使用了第三方开发的蓝牙内核:RivieraWaves,它本身是一个实时操作系统,但是对于开发者来讲,它的内核因为不是开源的,所以无法像FreeRTOS那样,随时开辟线程。_iot要用到rtos吗

notes-程序员宅基地

文章浏览阅读416次,点赞9次,收藏8次。轻量级锁升级为重量级锁:这个时候,只要我们的线程发生了竞争,并且CAS替换失败,就会发起锁膨胀,升级为重量级锁 (针对的是一个对象实例)真正的锁升级,是依赖于 class的,而并不是依赖于 某一个new出来的对象 (偏向锁升级为轻量级锁)真正的锁升级,是依赖于 当前new出来的对象的 (轻量级锁升级为重量级锁)轻量级锁 ---> 重量级锁:释放锁 (前4步)并唤醒等待线程。如果是调用join方法的锁对象,则释放。让出CPU时间片,进入等待队列。具体要看当前的锁对象是谁。

解决WKWebView加载本地HTML页面ajax请求跨域的问题_allowuniversalaccessfromfileurls-程序员宅基地

文章浏览阅读1.2w次。一、创建WKWebView的时候设置WKWebViewConfiguration的属性_allowUniversalAccessFromFileURLs为YES,代码如下 WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init]; [configuration setValue..._allowuniversalaccessfromfileurls

推荐一个基于Springboot+Vue的开源博客系统-程序员宅基地

文章浏览阅读7.4k次,点赞7次,收藏63次。简介这是一个基于Springboot2.x,vue2.x的前后端分离的开源博客系统,提供 前端界面+管理界面+后台服务 的整套系统源码。响应式设计,手机、平板、PC,都有良好的视觉效果!你可以拿它作为前端Vue2.0学习的练手教程;你也可以把它作为springboot技术的学习项目;你还可以将其视为一个前后端分离的项目实践;...站点演示www.dblearn.cn模块分层后..._vue开源博客项目

jsp验证码刷新_jsp 怎么刷新验证码-程序员宅基地

文章浏览阅读2.5k次。今天弄了一下JSP 验证码的问题 外加刷新。 把原代码共享一下:image.jsp(生成图片页面)Color getRandColor(int fc,int bc){//给定范围获得随机颜色 Random random = new Random(); if(fc>255) fc=255; if(bc>255) bc=255; _jsp 怎么刷新验证码