官网连接地址:https://www.mongodb.com/download-center?jmp=nav#community

列表中没有CentOS!!我选的是这个Linux 64-bit legacy x64版本的。

下载mongo:

wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.2.tgz

解压:

tar zxvf mongodb-linux-x86_64-4.0.2.tgz

解压后的目录移到/usr/local下:

mv mongodb-linux-x86_64-4.0.2 /usr/local

在mongodb下创建data 和logs 目录

mkdir -p data/db

mkdir logs && touch logs/mongodb.log

加到profile

export PATH=/usr/local/mongodb-linux-x86_64-4.0.2/bin:$PATH

创建启动时的配置文件mongodb.conf

# 数据存储文件目录
dbpath=/usr/local/mongodb-linux-x86_64-4.0./data/db
# 日志文件
logpath=/usr/local/mongodb-linux-x86_64-4.0./logs/mongodb.log
# 后台运行
fork=true
auth=true
bind_ip=0.0.0.0

然后就成功启动了~

用mongo命令来连接一下服务:

References:

https://blog.csdn.net/gcalan/article/details/81066582 (这个不建议,用最后的命令启动有点问题)

https://www.2cto.com/net/201611/565439.html(推荐使用这个,赞)

centos 7 64安装mongodb的更多相关文章

  1. Linux系统运维笔记(四),CentOS 6.4安装 MongoDB

    Linux系统运维笔记(四),CentOS 6.4安装 MongoDB 1,下载 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6 ...

  2. CentOS 6.5安装MongoDB 2.6(多yum数据源)

    下面我们在CentOS 6.5 x64系统上安装最新的MongoDB 2.6.5版. 在MongoDB v2.6.5版的软件仓库一共有五个包: 1)mongodb-org此包是元数据包,它可以实现自动 ...

  3. Centos 使用yum安装MongoDB 4.0

    1.配置MongoDB的yum源 创建yum源文件: #cd /etc/yum.repos.d #vim mongodb-org-4.0.repo 添加以下内容:(我们这里使用阿里云的源) [mngo ...

  4. Centos 7.x 安装 MongoDB

    官方安装资料:点击直达 本次以Centos为安装主机 1:首先先导入MongoDB的yum源,因为Centos默认是没有MongoDB的yum源,创建文件:/etc/yum.repos.d/mongo ...

  5. CentOS 6.5 安装 MongoDB

    1. 配置 yum 新建 /etc/yum.repos.d/mongodb-org-3.4.repo 文件,使用以下配置:(适用于 MongoDB 3.0 以后版本) [mongodb-org-3.4 ...

  6. Centos环境下安装mongoDB

    安装前注意: 此教程是通过yum安装的.仅限64位centos系统 安装步骤: 1.创建仓库文件: vi /etc/yum.repos.d/mongodb-org-3.4.repo 然后复制下面配置, ...

  7. CentOS 6.5安装MongoDB

    1.创建mongodb.repo文件在/etc/yum.repos.d/目录下创建文件mongodb.repo,它包含MongoDB仓库的配置信息,内容如下: [mongodb] name=Mongo ...

  8. CentOS 7 服务器配置--安装MongoDB

    #下载MongoDB源文件: wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.4.7-tgz 注意:wget此处 ...

  9. centos 7.5 安装mongodb

    MongoDB安装和启动 从官网下载最新对应的版本然后解压,本文以3.6.9为例,将文件拷贝到opt目录下,然后解压: [root@localhost opt]# tar zxvf mongodb-l ...

随机推荐

  1. 跟我学SharePoint 2013视频培训课程——理解SharePoint网站的体系结构(3)

    课程简介 第三天,理解SharePoint 2013 网站的体系结构 视频 SharePoint 2013 交流群 41032413

  2. J2EEweb开发中的缓存问题的研究

    一般情况下,浏览器都会缓存已经访问过的页面内容,关于如何禁止浏览器缓存的介绍,在网上到处都有相关的文章,但是,关于浏览器如何利用缓存,如何处理缓存的讲解,却鲜有人谈及 .浏览器在访问已缓存过的资源时, ...

  3. 摘抄JPA官方文档原文 防呆

    Spring Data JPA - Reference Documentation Oliver GierkeThomas DarimontChristoph StroblMark PaluchVer ...

  4. springboot 中使用Druid 数据源提供数据库监控

    一.springboot 中注册 Servlet/Filter/Listener 的方式有两种,1 通过代码注册 ServletRegistrationBean. FilterRegistration ...

  5. Starting with neural network in matlab[zz]

    转自:http://matlabbyexamples.blogspot.com/2011/03/starting-with-neural-network-in-matlab.html The neur ...

  6. Windows 上 怎么安装 install elasticsearch plugin

    D:\elasticsearch-5.2.1\bin>elasticsearch-plugin install file:///D:/elasticsearch -5.2.1/bin/elast ...

  7. 如何在Google Play商店发布多个版本apk

    原文:http://android.eoe.cn/topic/android_sdk 多种apk的支持是一个特点在Google Play,它允许你发布不同的APKs为你的应用匹配不同尺寸的设备.每个A ...

  8. ubuntu for win10 里运行net core

    花了点时间在ubuntu for win10里运行net core 按官网上ubuntun10.14装的net core指令 ...... ...... sudo apt-get install do ...

  9. Atitit 转移特效attilax总结

    Atitit 转移特效attilax总结 总结一般从按钮,转移到大点的方框上回比较好看点.. <!--jq ui--> <style type="text/css" ...

  10. vue2.x 路由懒加载 优化打包体积

    当打包构建应用时,Javascript 包会变得非常大,影响页面加载.如果我们能把不同路由对应的组件分割成不同的代码块,然后当路由被访问的时候才加载对应组件,这样就更加高效了. 结合 Vue 的异步组 ...