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. [py]str list切片-去除字符串首尾空格-递归思想

    取出arr的前几项 #方法1 print([arr[0], arr[1]]) #方法2 arr2 = [] for i in range(2): arr2.append(arr[i]) print(a ...

  3. 配置apache实现对网站某一目录的访问自动跳转到指定目录

    访问www.baidu.com/Hello目录,实际访问/new_balance/hello2 Alias /Hello/ /new_balance/hello2 <Directory /new ...

  4. Log4net 乱码问题解决

    在将log4net输出到UdpAppender会出现乱码问题,当然,丢到第三方日志分析工具glaylog下,也出现中文乱码. <?xml version="1.0"?> ...

  5. Android下基于线程池的网络访问基础框架

    引言 现在的Android开发很多都使用Volley.OkHttp.Retrofit等框架,这些框架固然有优秀的地方(以后会写代码学习分享),但是我们今天介绍一种基于Java线程池的网络访问框架. 实 ...

  6. iqueryable lambda表达式

    1.groupby 1.group by var newLaborDtos = laborDtos.GroupBy(s => new { s.FinancingAmount, s.Company ...

  7. 护眼:我的DIY电脑护眼妙招

    每天对着电脑,埋头敲代码,一段时间之后.总是觉得眼睛很涩很难受,所以找到一些对抗的视疲劳的方法.不用花费任何钱,可以让眼睛享受地看着我们的屏幕,方法很简单,过来看看(小伎俩,大牛勿笑~) 一.WIN7 ...

  8. Impala与Hive的比较

    1. Impala架构        Impala是Cloudera在受到Google的Dremel启发下开发的实时交互SQL大数据查询工具,Impala没有再使用缓慢的Hive+MapReduce批 ...

  9. charles 手机抓包 unknown

    设置通配符即可 需要注意的点: 手机配置好电脑的服务器ip和端口号后,下载证书和安装好,然后电脑也需要安装证书.再配置可允许ssl 本地域名.

  10. bzoj1638 / P2883 [USACO07MAR]牛交通Cow Traffic

    P2883 [USACO07MAR]牛交通Cow Traffic 对于每一条边$(u,v)$ 设入度为0的点到$u$有$f[u]$种走法 点$n$到$v$(通过反向边)有$f2[v]$种走法 显然经过 ...