Linux-Ubuntu14.04下mongodb安装部署
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安装部署的更多相关文章
- Ubuntu14.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 说在前面的话 首先,查看下你的操作系统的版本. root@zhouls-virtual-machine:~# cat /etc/issue Ubuntu LTS \n \l r ...
- Ubuntu14.04下Mongodb数据库可视化工具安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐) Ubuntu14.04下Mongodb官网安装部署步骤(图 ...
- Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 在这篇博客里,我采用了非官网的安装步骤,来进行安装.走了弯路,同时,也是不建议.因为在大数据领域和实际生产里,还是要走正规的为好. Ubuntu14.04下Mongodb(离线安 ...
- Ubuntu14.04下Ambari安装搭建部署大数据集群(图文分五大步详解)(博主强烈推荐)
不多说,直接上干货! 写在前面的话 (1) 最近一段时间,因担任我团队实验室的大数据环境集群真实物理机器工作,至此,本人秉持负责.认真和细心的态度,先分别在虚拟机上模拟搭建ambari(基于CentO ...
- Ubuntu14.04下Mongodb官网卸载部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐) https://docs.mongodb.com/manual/tutorial/ins ...
- Ubuntu14.04下Mongodb的Java API编程实例(手动项目或者maven项目)
不多说,直接上干货! 若大家,不会安装的话,则请移步,随便挑选一种. Ubuntu14.04下Mongodb(在线安装方式|apt-get)安装部署步骤(图文详解)(博主推荐) Ubuntu14.04 ...
- Ubuntu14.04 Django Mysql安装部署全过程
Ubuntu14.04 Django Mysql安装部署全过程 一.简要步骤.(阿里云Ubuntu14.04) Python安装 Django Mysql的安装与配置 记录一下我的部署过程,也方便 ...
- ubuntu14.04下编译安装ambari-2.4.2.0
ubuntu14.04下编译安装ambari-2.4.2.0 编译前的准备工作 准备工作有: 系统参数 系统依赖(编译环境) 离线安装包 java环境 maven环境 Nodejs环境 git环境 a ...
- ubuntu14.04下手动安装eclipse
ubuntu14.04下手动安装eclipse 第一步: 安装jdk 第二步: 下载eclipse,假设下载的文件文件名为eclipse.tar.gz 第三步: 解压 sudo -zxvf ./ecl ...
随机推荐
- [py]一些搜集到的问题
过滤爬虫爬取下来的关键字 v1,来不及了,先上车 content = ['哈士奇', '二哈', '哈士奇图片','哈士奇图片', '哈士奇美丽价格', '哈士奇是个大傻逼', '猫咪图片', '猫咪 ...
- 实习培训——Java基础(2)
实习培训——Java基础(2) 1 Java 变量类型 在Java语言中,所有的变量在使用前必须声明.声明变量的基本格式如下: type identifier [ = value][, identi ...
- 人活着系列之开会(Floy)
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2930 题意:所有点到Z点的最短距离.因为岛名由 ...
- nodejs加WebSocket,聊天工具
1.WebSocket必须要与服务器连接,所以这里采用node起服务,这里用到了ws,,也有人用nodejs-websocket 2.首先 npm install ws 3.新建一个server.js ...
- 下载YouTube视频的方法
这个网站就可以: http://www.clipconverter.cc/ 更多的网站及介绍参考知乎:http://www.zhihu.com/question/19964181
- win10安装激活与关闭自动更新
1.安装时即使选择了不保留任何文件,也不会删除掉非c盘里的东西 2.安装后需要执行KMS10_Crack2激活下 3.关闭自动更新. 在服务中禁用 https://zhidao.baidu.com/q ...
- Linux命令: 在线使用linux命令环境
https://www.tutorialspoint.com/unix_terminal_online.php
- python pip list 命令列出所有安装包和版本信息
c:\Python27\Scripts>pip listDEPRECATION: The default format will switch to columns in the future. ...
- Java EE企业应用发展
新形式下的企业应用特点企业应用系统从封闭走向开放,由局域网转到互联网,随着涉众面的极大扩展,新的企业应用要求多浏览器支持,国际化支持,全球业务的互联互通.企业需求提升.除了功能性需求,客户对于安全,性 ...
- 修改MySQL数据库中表和表中字段的编码方式的方法
今天向MySQL数据库中的一张表添加含有中文的数据,可是老是出异常,检查程序并没有发现错误,无奈呀,后来重新检查这张表发现表的编码方式为latin1并且原想可以插入中文的字段的编码方式也是latin1 ...