Ubuntu 18.04下 MongoDB的安装与基本配置

Ubuntu 18.04 安装 MongoDB:apt、systemd 与 ufw 深度配置指南 MongoDB 是一种面向文档的 NoSQL 数据库,其 Linux 部署核心依赖包管理器(如 apt)、服务管理框架(如 systemd)和网络访问控制(如 ufw)。在 Ubuntu 18.04 这一 systemd 过渡期发行版中,apt 源选择错误易导致安装弃用包,systemd 单元配置缺失或权限不当将引发服务启动失败,而 ufw 规则缺位则直接暴露数据库于公网风险。掌握这三者的协同机制,是实现 MongoDB 稳定运行、安全加固与生产就绪的关键前提。本文聚焦 Ubuntu 18.04 环境,详解 阅读详情

Ubuntu 18.04下 MongoDB的安装与基本配置

MongoDB的安装

MongoDB的安装我们通常会使用命令行的方式来安装,你需要注意的就是保持网络畅通~:

  1. 导入公钥
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

2.创建源列表文件MongoDB

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
  1. 更新源
 sudo apt update
  1. 安装MongoDB Server
sudo apt install mongodb-org
  1. 对mongoDB Server的管理
sudo systemctl enable mongod  # 加入mongod服务
sudo systemctl start mongod   # 开启mongod服务
sudo systemctl stop mongod  # 停止mongod服务

至此,mongodb安装完成!!!

Mongodb配置文件

在ubuntu下安装完成后,mongodb的配置文件存放在 /etc/mongodb.conf
用vim编辑器打开配置文件,我们可以清楚的看见各项配置。

权限设置

默认情况下,mongodb的监听端口为27017,无认证,这样很不安全,很容易被勒索的。所以,我们需要设置用户名密码和数据库的访问权限。
打开登录认证,需要修改mongodb服务文件。

vi  /lib/systemd/system/mongod.service

在ExecStart=/usr/bin/mongod –auth –config /etc/mongod.conf这一行后面加上 --auth。
重新加载服务:

systemctl daemon-reload

重启mongod服务。

MongoDB的用户分为两种,一种是admin用户,另一种是特定数据库用户。admin用户拥有最高的权限,而特定数据库用户则只能访问特定的数据库。当MongoDB的admin库里没有任何用户的时候,也就是说整个MongoDB没有一个MongoDB用户的时候,即便–auth权限需求打开了,用户还是可以通过localhost界面进入MongoDB进行用户设置,否则的话整个MongoDB就完全没法访问了。而当这个用户创建完成之后,之后的用户登录和操作就需要授权了,不是直接登录就能使用的了。

MongoDB有一个比较奇怪的设置是,即便是一个admin用户,授权也必须在admin数据库下进行,而不能在其他数据库下进行。而授权之后admin用户就可以在任何数据库下进行任何操作了。当然数据库级别的用户在他自己的数据库下授权之后是不能到其他数据库进行操作的。
启动mongod服务,在sehll中输入命令:

mongo   # 进入mongo shell
show dbs   # 显示所有数据库
use admin  # 进入admin数据库
db.createUser(
  {
    user: "admin",
    pwd: "abc123",
    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
  }
)     # 创建一个用户,身份是超级管理员

这时我们创建好了超级管理员,现在退出shell,重新进入mongo shell,输入命令:

db.auth("admin","abc123")

若返回为1,则认证成功!现在,我们超级管理员也创建好了,可以为其他数据库创建用户了。

为数据库创建用户

输入命令:

use test  # 切换至test数据库
db.createUser(
  {
    user: "myTester",
    pwd: "xyz123",
    roles: [ { role: "readWrite", db: "test" }
  }
)    # 创建用户,用户myTester对数据库test的权限为读写

MongoDB基本的角色:
1.数据库用户角色:read、readWrite;
2.数据库管理角色:dbAdmin、dbOwner、userAdmin;
3.集群管理角色:clusterAdmin、clusterManager、clusterMonitor、hostManager;
4.备份恢复角色:backup、restore;
5.所有数据库角色:readAnyDatabase、readWriteAnyDatabase、userAdminAnyDatabase、dbAdminAnyDatabase
6.超级用户角色:root
还有几个角色间接或直接提供了系统超级用户的访问(dbOwner 、userAdmin、userAdminAnyDatabase)

其中MongoDB默认是没有开启用户认证的,也就是说游客也拥有超级管理员的权限。userAdminAnyDatabase:有分配角色和用户的权限,但没有查写的权限

ubuntu18.4安装MongoDB、启动、配置 第1步: 导入公钥 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 第2步:创建源列表文件MongoDB echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-o... 阅读详情

相关推荐

STM32F103模拟SSI时序解析:实现高精度绝对式编码器位置读取

本文详细解析了如何在STM32F103微控制器上通过软件模拟SSI协议时序,实现高精度绝对式编码器的位置读取。文章从项目驱动出发,深入剖析了SSI通信原理、硬件电平转换连接、核心软件模拟代码实现及关键时序参数调试方法,并提供了使用示波器进行波形对齐与优化的实战指南,为成本敏感型工业控制与机器人项目提供了高性价比的解决方案。

weixin_29196315的博客 141

ubuntu18.04下安装MongoDB步骤

1.第1步 – 导入公钥 Ubuntu软件包管理器apt(高级软件包工具)需要软件分销商的GPG密钥来确保软件包的一致性和真实性。 运行此命令将MongoDB密钥导入到服务器。 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 第2步 ...

一个有梦想的小码农的博客 685

ArcGIS基础:点要素分割线要素和提取线要素的交点

第一个实验:【点要素分割线要素】看下原始数据:下图所示,2个红点和一条绿线,用2个点去分割这条线。 找到【数据管理工具】,在找到【要素】,再找到【在点处分割线】,如下图所示。 输入线、点要素,然后在【搜索半径】里输入5米,查看一下结果。 查看结果发现,线段被分割了2段,我们查看一下原因。 发现第2个点与线有一段距离,肯定是大于5米的,所以分割没有成功。可以量测一下距离,重新输入搜索半径。 我们把搜索半径改为200米,勘察结果,被点分割了3段。 接下来使用另外一个工具【在折点处分割线】,如下所示。

yuanYW7556的博客 1万+

如何在 Ubuntu 上安装 MongoDB 并确保其安全性

MongoDB是一个开源的、跨平台的、分布式的NoSQL(非SQL或非关系型)数据库系统。与传统SQL数据库不同,MongoDB不使用表格存储数据,而是使用灵活的文档来存储各种数据形式。MongoDB使用二进制JSON格式BSON来存储数据。MongoDB是一个具有内置高可用性、自动故障转移和数据冗余的分布式NoSQL数据库,通过在分布式集群中进行分片来实现水平扩展。它支持多区域地理部署,并提供支持CRUD操作(读写)、数据聚合管道、文本搜索和地理空间查询的查询API。

weixin_53510183的博客 1849

用PyTorch实战清华SSVEP数据集:手把手教你搭建第一个脑机接口分类模型(附完整代码)

本文详细介绍了如何使用PyTorch实战清华大学SSVEP数据集,从数据预处理到CNN模型构建的全流程。通过手把手教学,帮助读者搭建第一个脑机接口分类模型,特别针对数据维度转换等关键难点提供可视化解析,并附完整代码实现。

weixin_42566121的博客 352

SC8F073单片机串口通信保姆级教程:从寄存器配置到完整收发Demo(附避坑指南)

本文详细解析了SC8F073单片机串口通信的寄存器配置与调试技巧,涵盖TXSTA、RCSTA和SPBRG寄存器的逐位设置,提供精确的波特率计算方法和工业级抗干扰策略。通过完整的收发Demo和避坑指南,帮助开发者快速掌握底层串口通信技术,适用于工业控制等严苛环境。

weixin_33724046的博客 486

Ubuntu18.04下Mongodb的安装与配置

一、安装 1.导入公钥 Ubuntu软件包管理器apt需要软件分销商的GPG密钥来确保软件包的一致性和真实性。运行此命令将MongoDB密钥导入到服务器 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 2. 修改源文件列表 使用以下命令在/etc/apt/sources.list.d/中添加一个Mon...

weixin_43795522的博客 784

STM32 USB2.0 转 Type-C 接口设计与实现

本文详细介绍了STM32 USB2.0转Type-C接口的设计与实现方案,涵盖硬件电路设计、软件配置及调试技巧。重点解析Type-C接口的CC引脚配置和电源管理,提供设备模式、主机模式及双角色模式的实现方法,帮助开发者解决实际应用中的连接稳定性和ESD防护等问题,提升产品可靠性和兼容性。

blockchain9miner的博客 1020

阿里云 ubuntu 18.04安装 mongodb 及权限配置

ubuntu安装mongodb

qq_38918754的博客 387

SAP FICO应付票据平台开发说明书(包括测试样例、程序代码仅作参考,不保证一定可以运行)

SAP FICO应付票据平台开发说明书(包括测试样例、程序代码仅作参考,不保证一定可以运行)

我好像病了的博客 379

OCR文字识别基础

ocr文字识别

m0_47405013的博客 1755

Ubuntu18.04安装MongoDB,并配置远程访问

Ubuntu18.04安装MongoDB,并配置远程访问 1.导入公钥 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 2.创建源列表文件MongoDB 使用以下命令在/etc/apt/sources.list.d/中创建一个Mon...

you_just的博客 1764

Jetson Orin 上拉取 GMSL 相机流并保存在 DMA 内存中

本文介绍了在NVIDIA Jetson Orin平台上实现GMSL相机DMA内存共享的低延迟采集方案。通过V4L2+NvBufSurface技术,将相机数据直接存入DMA缓冲区,避免传统流程中的CPU拷贝开销。文章详细说明了设备初始化、DMA缓冲区分配、V4L2绑定等关键步骤,并展示了调用示例。该方案支持零拷贝访问,适用于AI推理、硬件编码等场景,能显著提升车载视觉系统的实时性能,为多路GMSL相机接入和低延迟处理提供了高效解决方案。

J。 696

step17. MongoDB Ubuntu18.04安装配置(转)

MongoDB Ubuntu18.04安传配置

weixin_46964107的博客 296

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

ubuntu18.04安装和配置mongodb

来源于mongodb官方网站 1、导入key wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add - 2、建立源list echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb...

ximen120的专栏 967

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

【MongoDB】Ubuntu18.04单机安装配置

为了方便,以下命令都是在root用户下执行的 安装Mongodb 更新软件包列表以获取最新版本的存储库列表: apt update 安装MongoDB包: apt install -y mongodb 检查是否安装成功 systemctl status mongodb 状态为active则安装成功 启用远程连接 修改mongodb.conf文件 vi /etc/mongodb.conf 将...

瘦熊的博客 418

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

ubuntu18.04安装mongo环境配置及遇到BUG!

因项目需要使用MongoDB数据库,安装到配置遇到很多问题,花费了一上午时间,在脑细胞大量付出的情况下顺利解决! MongoDB官网下载地址 https://docs.mongodb.com/manual/ Ubuntu中安装与配置 Ubuntu18.04版本直接输入MongoDB的安装命令会出现一个问题 sudo apt-get install mongodb 输入Mongo进不...

SooKie_p的博客 522

Ubuntu18.04安装mongodb

Ubuntu18.04安装mongodb 一.sudo apt-get install mongodb 二.进入mongodb命令行 mongo 三.创建一 用户名为 admin 密码为 adminl23 的用户,赋予最高权限 use admin db.createUser({user:‘admin’,pwd:‘admin123’,roles:[{role:‘root’,db:‘admin’}]}) 四.启动、关闭、重启 sudo service mongodb stop sudo service m

太阳上的雨天 3169

在Ubuntu 18.04上安装MongoDB

安装MongoDB社区版 请按照以下步骤使用apt程序包管理器安装MongoDB Community Edition 。 1、导入包管理系统使用的公钥。在终端上,输入以下命令https://www.mongodb.org/static/pgp/server-4.2.asc导入MongoDB公共GPG密钥: wget -qO - https://www.mongodb.org/static/pgp/...

AndyYang2017的博客 753

Ubuntu18.04下安装配置MongoDB4.0.6

搭建MongoDB环境 安装MongoDB 1.下载安装包 MongoDB 提供了 linux 各发行版本 64 位的安装包,你可以在官网下载安装包。 下载地址:https://www.mongodb.com/download-center#community     注意:package选择TGZ 2.移动目录并解压 因为我的应用程序都放在/opt目录下,所以先...

581

在linux上安装Mongodb,服务器是Ubuntu18.04

第一步:输入命令 这句话的意思使在root路径下,也就是在你服务器路径下创建一个soft的文件,文件下在创建一个mongodb的文件,这一步其实就是放你之后下载的压缩包的,你也可以起别的名字。第八步:我们依次输入这些命令,记得输入一个命令按一次回车,这些命令就是在mongodb文件下创建一个名为data的文件,然后在data文件下创建一个名为db的文件和一个名为logs的文件。第四步:在这个路径下输入ls,可以查看你这个路径下有那些文件,如果按照我上述操作完成你可以在这个路径下看到这两个文件。

weixin_56859776的博客 567

ubuntu18.04安装mongodb 4.2社区版

ubuntu18.04安装mongodb 4.2社区版 官方文档地址 https://docs.mongodb.com/v4.2/tutorial/install-mongodb-on-ubuntu/ 安装MongoDB 社区版 导入包管理系统使用的公钥 wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add - 在终端执行后应该会返回OK 但是如果你收到提示gnupg..

leihenshang的博客 801

mongodb的安装并配置远程连接

环境准备 ubutnu18.04 mongodb 1. 下载mongdb.deb包 下载网址 打开linux终端 wget https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/4.2/multiverse/binary-amd64/mongodb-org-server_4.2.5_amd64.deb 2. 安装 由于下...

暮阳的博客 433

mongodb 4 配置文件_Mongodb使用指南

Mongodb使用指南在ubuntu18.04上安装mongodb的tarball步骤1 下载tarball到https://www.mongodb.com/try/download/community 选择version:4.4.2(current) platform:Ubuntu 18.04 Package:tgz或者直接wget https://fastdl.mongodb.or...

weixin_32487755的博客 1098

Ubuntu 18.0.4安装Mongodb

2.21更新: 安装后本地通过robo 3T连接正常,但是其它机器通过IP连接时报错,继续查找,解决方案在这里(传送门),原因是mongodb安装完成后默认监听本地地址,也就是127.0.0.1,这样只能通过localhost或127.0.0.1连接,通过其它IP就不行了,改下配置文件即可。在/etc目录下的mongod.conf文件中,修改bindIp为0.0.0.0,如下: 这样就能通...

weixin_30697239的博客 402
下一篇: Python操作MongoDB---连接
Torres Ye
博客等级 码龄9年 13粉丝 18原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值