运用后台+配置文件方式启动。

条件

下载mongodb-linux-x86_64-rhel62-3.6.3.tar

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

依赖openssl-1.0.1e-57.el6.x86_64.rpm

安装

下载后是这个格式的包包
mongodb-linux-x86_64-rhel62-3.6.3.tgz

第一次解压

gzip -d mongodb-linux-x86_64-rhel62-3.6.3.tgz

第二次解压

tar -xvf mongodb-linux-x86_64-rhel62-3.6.3.tar

重命名

mv mongodb-linux-x86_64-rhel62-3.6.3  mongodb

步骤+

mv mongodb /usr/local

cd /usr/local/mongodb/

mkdir -p data logs

vim mongodb.conf

mongodb.conf

dbpath=/usr/local/mongodb/data
port=27017
logpath=/usr/local/mongodb/logs/mongodb.log
logappend=true
fork=true

1.数据库目录

2.端口

3.日志路径文件

4.日志追加末尾

5.后台子进程运行

启动

cd /usr/local/mongodb/bin

./mongod -f ../mongodb.conf

报错

./mongod: /usr/lib64/libssl.so.10: no version information available (required by ./mongod)
./mongod: /usr/lib64/libcrypto.so.10: no version information available (required by ./mongod)
./mongod: /usr/lib64/libcrypto.so.10: no version information available (required by ./mongod)
./mongod: relocation error: ./mongod: symbol TLSv1_2_server_method, version libssl.so.10 not defined in file libssl.so.10 with link time reference

解决

问题出在openssl, 经过检验, 发现openssl版本过低, 没办法, 提升版本吧!

验证一下, 发现

[root@localhost bin]# rpm -qa|grep openssl
openssl-1.0.0-27.el6.i686
openssl-1.0.0-27.el6.x86_64

一起干掉

[root@localhost bin]# rpm -e openssl-1.0.0-27.el6.x86_64 openssl-1.0.0-27.el6.i686
error: Failed dependencies:
libcrypto.so.10()(64bit) is needed by (installed) gnome-vfs2-2.24.2-6.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) libssh2-1.4.2-1.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) mysql-libs-5.1.66-2.el6_3.x86_64
libcrypto.so.10()(64bit) is needed by (installed) fipscheck-1.2.0-7.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) python-2.6.6-36.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) m2crypto-0.20.2-9.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) pyOpenSSL-0.10-2.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) openssh-5.3p1-84.1.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) cyrus-sasl-2.1.23-13.el6_3.1.x86_64
libcrypto.so.10()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
libcrypto.so.10()(64bit) is needed by (installed) openssh-server-5.3p1-84.1.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) gnome-vfs2-2.24.2-6.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) libssh2-1.4.2-1.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) mysql-libs-5.1.66-2.el6_3.x86_64
libssl.so.10()(64bit) is needed by (installed) python-2.6.6-36.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) m2crypto-0.20.2-9.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) python-rhsm-1.1.8-1.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) pyOpenSSL-0.10-2.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
openssl is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64

完蛋...(好像没辙)

没事, 继续来, 终极大招

rpm -e openssl-1.0.0-27.el6.i686 openssl-1.0.0-27.el6.x86_64 --nodeps

再查一下

rpm -qa | grep openssl

没有了。

安装新版的openssl, 我这里用的新版是:openssl-1.0.1e-57.el6.x86_64.rpm

[root@localhost test]# rpm -ivh openssl-1.0.1e-57.el6.x86_64.rpm
warning: openssl-1.0.1e-57.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
make is needed by openssl-1.0.1e-57.el6.x86_64

没办法,强行安装

[root@localhost test]# rpm -ivh openssl-1.0.1e-57.el6.x86_64.rpm --nodeps
warning: openssl-1.0.1e-57.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:openssl ########################################### [100%]
[root@localhost test]# rpm -qa | grep openssl
openssl-1.0.1e-57.el6.x86_64

再启动, 启动成功!!

验证

查进程
[root@localhost bin]# ps aux | grep mongo
root 2044 12.2 4.8 1058116 56024 ? Sl 01:08 0:00 ./mongod -f ../mongodb.conf
root 2072 0.0 0.0 6372 688 pts/0 S+ 01:08 0:00 grep mongo 查端口
[root@localhost bin]# netstat -tlnp | grep mongod
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 2044/./mongod 客户端验证
[root@localhost bin]# ./mongo
MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.6.3
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2018-03-06T01:08:44.032+0800 I STORAGE [initandlisten]
2018-03-06T01:08:44.032+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-03-06T01:08:44.032+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten]
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten]
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten]
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten]
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten]
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-03-06T01:08:44.941+0800 I CONTROL [initandlisten]
> use test;
switched to db test
> exit
bye

成功!

Redhat6.4安装MongoDBv3.6.3的更多相关文章

  1. redhat6.3安装MySQL-server-5.6.13-1.el6.x86_64.rpm

    redhat6.3安装MySQL-server-5.6.13-1.el6.x86_64.rpm   首先下载下面三个文件:   [plain]  MySQL-client-5.6.13-1.el6.x ...

  2. RedHat6.6安装Oracle11gR2

    RedHat6.6安装Oracle11gR2 一.Centos6.6的安装配置 1-       选择安装模式 2-       选择“skip”,跳过检查. 3-       选择“下一步” 4-  ...

  3. Redhat6下安装QEMU

    Redhat6下安装QEMU 1.下载QEUM:http://wiki.qemu.org/Download 2.解压qemu-1.6.1.tar.bz2到/tmp目录(也可以是其他目录)下,并进入解压 ...

  4. redhat6.3安装matlab运行时MCR7.8,初步测试ok

    redhat6.3安装完matlab2008a后在目录$MATLAB_HOME/toolbox/compiler/deploy/glnxa64中有MCRInstaller.bin 使用这个安装MCR即 ...

  5. RedHat6.5安装kafka集群

    版本号: Redhat6.5    JDK1.8     zookeeper-3.4.6   kafka_2.11-0.8.2.1 1.软件环境 1.3台RedHat机器,master.slave1. ...

  6. RedHat6.5安装kafka单机

    版本号: Redhat6.5    JDK1.8     zookeeper-3.4.6   kafka_2.11-0.8.2.1 1.软件环境 已经搭建好的zookeeper:  RedHat6.5 ...

  7. Redhat6.8安装Oracle11g下遇到两个问题记录

    问题一: 刚刚安装完毕Oracle之后,尝试sqlplus登陆报错,TNS:net service name is incorrectly specified 参考文章:关于环境变量ORACLE_SI ...

  8. Redhat6.5安装DB2 Express-C版本

    Linux Redhat6.5安装DB2 Express-C版本: 创建相关用户和组 创建用户组: groupdel db2iadm1 groupadd -g 999 db2iadm1 groupad ...

  9. redhat6.5安装postgresql8.4数据库

    Redhat6.5安装postgresql8.4数据库 step1 先移除原有的postgresql数据库(如果有),否则直接跳过 rpm -qa | grep postgresql* rpm -ev ...

随机推荐

  1. php二维数组搜索

    $ar = array(     2 => array(         'catid' => 2,         'catdir' => 'notice',     ),     ...

  2. cycript使用

    cycript的原理是动态库注入,但是其动态库注入的原理,与我们常见的通过LC_LOAD_DYLIB在可执行文件中注入动态库不同. cycript的操作是 : 抓取到要挂载的应用, 由于越狱机上拥有权 ...

  3. chrome\IE\Firefox驱动下载地址

    安装三大浏览器驱动driver 1.chromedriver 下载地址:https://code.google.com/p/chromedriver/downloads/list 2.Firefox的 ...

  4. IDEA2017及DataGrip2017注册码

    访问http://idea.lanyus.com/,网页中有相关说明,最简单的方式是将“0.0.0.0 account.jetbrains.com”添加到hosts文件中,然后点击页面底部的“获得注册 ...

  5. Dapper基础入门

    Dapper是一个轻量级的ORM.之前最常用的ORM是EF,其实EF底层是Ado.net实现的. 现在基本上已经远离SqlHelper时代了. Dapper是开源的  https://github.c ...

  6. java的运行机制及初步相关配置(jdk)

    java的运行机制: 计算机高级语言的类型主要有编译型和解释型两种,而java语言是两种类型的结合. java首先利用文本编译器编写java源程序,源文件的后缀名为.java:再利用编译器(javac ...

  7. Android -- 自定义ViewGroup实现FlowLayout效果

    1,在开发的时候,常在我们的需求中会有这种效果,添加一个商品的一些热门标签,效果图如下: 2,从上面效果可以看得出来,这是一个自定义的ViewGroup,然后实现换行效果,让我们一起来实现一下 自定义 ...

  8. arm trustzone

    arm的trustzone并不涉及到具体的crypto算法,只是实现: 1) 敏感信息的安全存储: 2) 控制bus和debug的安全访问,保证信息不被泄露: trustzone是system_lev ...

  9. 08 集合[11,22,33,44,55,66,77,88,99],将所有<66的值保存至字典的第一个key中,将所有>=66的值保存至字典的第二个key中。即:{'k1':<66的所有值,'k2':>=66的所有值}

    li = [11,22,33,44,55,66,77,88,99]dict = {'k1':[],'k2':[]}for i in li:    if i < 66:        dict[& ...

  10. 如何删除Sitecore CMS中的项目

    在此“如何”帖子中,我将介绍如何删除项目以及如何在Sitecore CMS中恢复已删除的项目. 删除项目 有多种方便的方法可以删除Sitecore中的项目. 从功能区 在内容树中选择您要删除的项目. ...