mongo 下载:https://www.mongodb.com/download-center/community?jmp=nav

创建目录,将下载的文件放在如下位置

xxx@ubuntu:/usr/local$ sudo mkdir mongo
xxx@ubuntu:/usr/local$ ls
bin etc games include lib man mongo sbin share src
xxx@ubuntu:/usr/local$ cd mongo/
xxx@ubuntu:/usr/local/mongo$ ls
mongodb-linux-x86_64-ubuntu1404-4.0..tgz

解压

xxx@ubuntu:/usr/local/mongo$ sudo tar -xvf mongodb-linux-x86_64-ubuntu1404-4.0..tgz
xxx@ubuntu:/usr/local/mongo$ ls
mongodb-linux-x86_64-ubuntu1404-4.0.
mongodb-linux-x86_64-ubuntu1404-4.0..tgz

创建数据库目录以及日志文件

xxx@ubuntu:/usr/local/mongo$ cd mongodb-linux-x86_64-ubuntu1404-4.0.5
xxx@ubuntu:/usr/local/mongo/mongodb-linux-x86_64-ubuntu1404-4.0.5$ sudo mkdir data 
xxx@ubuntu:/usr/local/mongo/mongodb-linux-x86_64-ubuntu1404-4.0.5$ sudo touch logs
xxx@ubuntu:/usr/local/mongo/mongodb-linux-x86_64-ubuntu1404-4.0.5$ ls 
bin logs MPL-2 data logs.2019-01-14T08-18-21 README LICENSE-Community.txt logs.2019-01-14T08-25-22 THIRD-PARTY-NOTICES

安装客户端

先下载这个文件,然后安装

sudo dpkg -i mongodb-org-shell_4..5_amd64.deb

进入到mongodb下面的bin里面查看mongodb帮助文档

./mongod -h

找到参数

--fork

--dbpath arg

--logpath arg

--nohttpinterface

--dbpath=/usr/local/mongodb/data/ 用于指定存放的mongodb数据库

--fork 是后台执行,不然一直在前台

--logpath=/usr/local/mongodb/logs 用于指定mongodb的日志记录文件

启动数据库

sudo ./mongod --dbpath=/usr/local/mongo/mongodb-linux-x86_64-ubuntu1404-4.0.5/data/ --logpath=/usr/local/mongo/mongodb-linux-x86_64-ubuntu1404-4.0.5/logs

即可通过mongo命令进入数据库。

xxx@ubuntu:~/Desktop$ mongo
MongoDB shell version v4.0.5
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("0783a892-c57e-4dee-94af-c3746762298a") }
MongoDB server version: 4.0.
Server has startup warnings:
--14T16::44.102+ I STORAGE [initandlisten]
--14T16::44.102+ I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
--14T16::44.102+ I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
--14T16::44.839+ I CONTROL [initandlisten]
--14T16::44.839+ I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
--14T16::44.839+ I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
--14T16::44.839+ I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
--14T16::44.839+ I CONTROL [initandlisten]
--14T16::44.839+ I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
--14T16::44.839+ I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
--14T16::44.839+ I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
--14T16::44.839+ I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
--14T16::44.839+ I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
--14T16::44.839+ I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
--14T16::44.839+ I CONTROL [initandlisten]
--14T16::44.839+ I CONTROL [initandlisten]
--14T16::44.839+ I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
--14T16::44.839+ I CONTROL [initandlisten] ** We suggest setting it to 'never'
--14T16::44.839+ I CONTROL [initandlisten]
--14T16::44.840+ I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
--14T16::44.840+ I CONTROL [initandlisten] ** We suggest setting it to 'never'
--14T16::44.840+ I CONTROL [initandlisten]
---
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()
--- >

Linux-Ubuntu14.04下mongodb安装部署的更多相关文章

  1. Ubuntu14.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐)

    不多说,直接上干货! 说在前面的话  首先,查看下你的操作系统的版本. root@zhouls-virtual-machine:~# cat /etc/issue Ubuntu LTS \n \l r ...

  2. Ubuntu14.04下Mongodb数据库可视化工具安装部署步骤(图文详解)(博主推荐)

    不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐) Ubuntu14.04下Mongodb官网安装部署步骤(图 ...

  3. Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐)

    不多说,直接上干货! 在这篇博客里,我采用了非官网的安装步骤,来进行安装.走了弯路,同时,也是不建议.因为在大数据领域和实际生产里,还是要走正规的为好. Ubuntu14.04下Mongodb(离线安 ...

  4. Ubuntu14.04下Ambari安装搭建部署大数据集群(图文分五大步详解)(博主强烈推荐)

    不多说,直接上干货! 写在前面的话 (1) 最近一段时间,因担任我团队实验室的大数据环境集群真实物理机器工作,至此,本人秉持负责.认真和细心的态度,先分别在虚拟机上模拟搭建ambari(基于CentO ...

  5. Ubuntu14.04下Mongodb官网卸载部署步骤(图文详解)(博主推荐)

    不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐) https://docs.mongodb.com/manual/tutorial/ins ...

  6. Ubuntu14.04下Mongodb的Java API编程实例(手动项目或者maven项目)

    不多说,直接上干货! 若大家,不会安装的话,则请移步,随便挑选一种. Ubuntu14.04下Mongodb(在线安装方式|apt-get)安装部署步骤(图文详解)(博主推荐) Ubuntu14.04 ...

  7. Ubuntu14.04 Django Mysql安装部署全过程

    Ubuntu14.04 Django Mysql安装部署全过程   一.简要步骤.(阿里云Ubuntu14.04) Python安装 Django Mysql的安装与配置 记录一下我的部署过程,也方便 ...

  8. ubuntu14.04下编译安装ambari-2.4.2.0

    ubuntu14.04下编译安装ambari-2.4.2.0 编译前的准备工作 准备工作有: 系统参数 系统依赖(编译环境) 离线安装包 java环境 maven环境 Nodejs环境 git环境 a ...

  9. ubuntu14.04下手动安装eclipse

    ubuntu14.04下手动安装eclipse 第一步: 安装jdk 第二步: 下载eclipse,假设下载的文件文件名为eclipse.tar.gz 第三步: 解压 sudo -zxvf ./ecl ...

随机推荐

  1. [py]django模板继承

    参考 1.展示arr,d等数据类型 2.逻辑for if / url获取 3.获取内置变量 django模板继承 通过搞一个base.html 这个base.html可以包含两类 block片断 其他 ...

  2. 第22章 CLR寄宿和AppDomain

    22.1 CLR寄宿 CLR Hosting(CLR 宿主)的概念:初始启动.Net Application时,Windows进程的执行和初始化跟传统的Win32程序是一样的,执行的还是非托管代码,只 ...

  3. js 俄罗斯方块源码,简单易懂

    1.自己引入jquery <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> ...

  4. 轮廓的查找、表达、绘制、特性及匹配(How to Use Contour? Find, Component, Construct, Features & Match)

    http://www.cnblogs.com/xrwang/archive/2010/02/09/HowToUseContour.html 作者:王先荣 前言    轮廓是构成任何一个形状的边界或外形 ...

  5. http协议基础(九)响应首部字段

    响应首部字段: 服务器向客户端返回响应报文中所使用的字段,用于补充的附加信息.服务器信息.以及对客户端的附加要求等 1.Accept-Ranges 告知客户端服务器能否处理范围请求,以指定获取服务器的 ...

  6. 013-安装VNC服务

    (1)#001-安装#光盘iso文件安装mount /dev/cdrom /mntcd /mnt/Packagesrpm -ivh tigervnc*rpm -ivh tigervnc按两次tab键 ...

  7. 27. Remove Element(双指针)

      Given an array nums and a value val, remove all instances of that value in-place and return the ne ...

  8. Trove系列(七)——Trove的Mysql的复制功能介绍

    描述提供各种复制功能的支持对于Trove来说是很关键的.本章节将描述各种使用案例和相关的用户需求.并依次提出了MySQL的初始阶段的实现.Mysql的复制功能介绍概述先介绍一下MySQL的复制功能原理 ...

  9. WebStorm使用快速入门

    WebStorm建立在开源IntelliJ平台之上,JetBrains已经开发和完善了超过15年.其提供了统一的UI,可与许多流行的版本控制系统配合使用,确保在git,GitHub,SVN,Mercu ...

  10. python 星号*使用方法

    1.乘号 2.表示倍数 def T(msg,time=1): print((msg+',,')*time) >>>T('hi',3) hi,,hi,,hi 3.单个星号* --1-- ...