CentOS 6.5 MongoDB 3.2.6安裝流程
建立使用者
[root@localhost ~]# useradd mongo
建立軟體安裝目錄
[root@localhost install]# mkdir /mongo
[root@localhost install]# chown -R mongo:mongo /mongo/
建立資料目錄
[root@localhost mongo]# mkdir -p /data/db
[root@localhost mongo]# chown -R mongo:mongo /data/
去官網下載安裝包
[root@localhost mongo]# cp /home/fire/Desktop/mongodb-linux-x86_64-rhel62-3.2.11.gz /install/
[root@localhost mongo]# chown -R mongo:mongo /install/
解壓安裝包到軟體安裝目錄
[mongo@localhost install]$ tar -zxvf mongodb-linux-x86_64-rhel62-3.2.11.gz -C /mongo/
mongodb-linux-x86_64-rhel62-3.2.11/README
mongodb-linux-x86_64-rhel62-3.2.11/THIRD-PARTY-NOTICES
mongodb-linux-x86_64-rhel62-3.2.11/MPL-2
mongodb-linux-x86_64-rhel62-3.2.11/GNU-AGPL-3.0
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongodump
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongorestore
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongoexport
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongoimport
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongostat
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongotop
mongodb-linux-x86_64-rhel62-3.2.11/bin/bsondump
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongofiles
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongooplog
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongoperf
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongosniff
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongod
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongos
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongo
配置環境變數
[root@localhost ~]# su - mongo
[mongo@localhost ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/mongo/mongodb-linux-x86_64-rhel62-3.2.11/bin
export PATH
啟動MongoDB
[mongo@localhost mongodb-linux-x86_64-rhel62-3.2.11]$ mongod &
[1] 2821
[mongo@localhost mongodb-linux-x86_64-rhel62-3.2.11]$ 2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] MongoDB starting : pid=2821 port=27017 dbpath=/data/db 64-bit host=localhost.localdomain
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] db version v3.2.11
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] git version: 009580ad490190ba33d1c6253ebd8d91808923e4
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] allocator: tcmalloc
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] modules: none
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] build environment:
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] distmod: rhel62
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] distarch: x86_64
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] target_arch: x86_64
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] options: {}
2016-12-10T03:06:09.665-0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.837-0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2016-12-10T03:06:09.838-0800 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-12-10T03:06:09.878-0800 I NETWORK [initandlisten] waiting for connections on port 27017
[mongo@localhost mongodb-linux-x86_64-rhel62-3.2.11]$ mongo
MongoDB shell version: 3.2.11
connecting to: test
2016-12-10T03:06:33.292-0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:38549 #1 (1 connection now open)
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
Questions? Try the support group
Server has startup warnings:
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
>
[root@localhost ~]# useradd mongo
建立軟體安裝目錄
[root@localhost install]# mkdir /mongo
[root@localhost install]# chown -R mongo:mongo /mongo/
建立資料目錄
[root@localhost mongo]# mkdir -p /data/db
[root@localhost mongo]# chown -R mongo:mongo /data/
去官網下載安裝包
[root@localhost mongo]# cp /home/fire/Desktop/mongodb-linux-x86_64-rhel62-3.2.11.gz /install/
[root@localhost mongo]# chown -R mongo:mongo /install/
解壓安裝包到軟體安裝目錄
[mongo@localhost install]$ tar -zxvf mongodb-linux-x86_64-rhel62-3.2.11.gz -C /mongo/
mongodb-linux-x86_64-rhel62-3.2.11/README
mongodb-linux-x86_64-rhel62-3.2.11/THIRD-PARTY-NOTICES
mongodb-linux-x86_64-rhel62-3.2.11/MPL-2
mongodb-linux-x86_64-rhel62-3.2.11/GNU-AGPL-3.0
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongodump
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongorestore
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongoexport
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongoimport
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongostat
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongotop
mongodb-linux-x86_64-rhel62-3.2.11/bin/bsondump
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongofiles
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongooplog
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongoperf
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongosniff
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongod
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongos
mongodb-linux-x86_64-rhel62-3.2.11/bin/mongo
配置環境變數
[root@localhost ~]# su - mongo
[mongo@localhost ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/mongo/mongodb-linux-x86_64-rhel62-3.2.11/bin
export PATH
[mongo@localhost mongodb-linux-x86_64-rhel62-3.2.11]$ mongod &
[1] 2821
[mongo@localhost mongodb-linux-x86_64-rhel62-3.2.11]$ 2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] MongoDB starting : pid=2821 port=27017 dbpath=/data/db 64-bit host=localhost.localdomain
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] db version v3.2.11
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] git version: 009580ad490190ba33d1c6253ebd8d91808923e4
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] allocator: tcmalloc
2016-12-10T03:06:09.622-0800 I CONTROL [initandlisten] modules: none
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] build environment:
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] distmod: rhel62
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] distarch: x86_64
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] target_arch: x86_64
2016-12-10T03:06:09.623-0800 I CONTROL [initandlisten] options: {}
2016-12-10T03:06:09.665-0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.837-0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2016-12-10T03:06:09.838-0800 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-12-10T03:06:09.878-0800 I NETWORK [initandlisten] waiting for connections on port 27017
[mongo@localhost mongodb-linux-x86_64-rhel62-3.2.11]$ mongo
MongoDB shell version: 3.2.11
connecting to: test
2016-12-10T03:06:33.292-0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:38549 #1 (1 connection now open)
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
Questions? Try the support group
Server has startup warnings:
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-12-10T03:06:09.836-0800 I CONTROL [initandlisten]
>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2106303/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS6.5安裝MongoDBCentOSMongoDB
- CentOS6.5下安裝mongodbCentOSMongoDB
- CentOS 6.5 Xtrabackup 2.4.2安裝流程CentOS
- php 5.6原始碼安裝流程(CentOS 6.5)PHP原始碼CentOS
- CentOS 6.5安裝Oracle 11.2.0.4------CentOS 6.5安裝CentOSOracle
- MariaDB 10.1原始碼安裝流程(CentOS 6.5)原始碼CentOS
- centos 6.5 安裝chromeCentOSChrome
- CentOS6.5安裝pipCentOS
- CentOS6.5 安裝opensslCentOS
- CentOS6.5安裝ScrapyCentOS
- CentOS 6.5 tree命令安裝CentOS
- Centos6.5 Docker安裝CentOSDocker
- centos6.5安裝gitCentOSGit
- CentOS 6.5安裝Nginx (一)CentOSNginx
- CentOS6.5安裝RHBaseCentOS
- CentOS6.5安裝RHiveCentOSHive
- CentOS 6.5 安裝影像介面CentOS
- centos安裝mongodbCentOSMongoDB
- CentOS 6.5/6.6 安裝mysql 5.7CentOSMySql
- CentOS 6.5 下安裝 Redis 2.8.7CentOSRedis
- VMWare安裝CentOS 6.5圖解CentOS圖解
- CentOS6.5安裝VMware ToolsCentOS
- CentOS6.5安裝RHadoopCentOSHadoop
- Centos6.5 IPython安裝CentOSPython
- CentOS 6.5下安裝MySQL 5.5CentOSMySql
- CentOS 6.5系統安裝配置CentOS
- CentOS 6.5 下安裝 Redis 2.8.13CentOSRedis
- 3.1-centos6.5下安裝dockerCentOSDocker
- CentOS6.5安裝sqlite3CentOSSQLite
- CentOS 6.5下快速安裝MySQL 5.7.17CentOSMySql
- CentOS6.5安裝ElasticSearch6.2.3CentOSElasticsearch
- CentOS6.5 安裝Zookeeper叢集CentOS
- CentOS6.5安裝Elasticsearch5.3.0CentOSElasticsearchH5
- CentOS release 6.5 yum安裝報錯CentOS
- centos6.5下安裝配置hudsonCentOS
- centos6.5安裝php5.6.0CentOSPHP
- 在Centos6.5上安裝ossfsCentOS
- CentOS6.5安裝JDK1.8CentOSJDK