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安裝pipCentOS
- CentOS6.5 安裝opensslCentOS
- CentOS6.5安裝ScrapyCentOS
- CentOS 6.5-安裝Python 2.7.11CentOSPython
- 3.1-centos6.5下安裝dockerCentOSDocker
- CentOS6.5安裝python3.7CentOSPython
- CentOS6.5安裝sqlite3CentOSSQLite
- CentOS 6.5下快速安裝MySQL 5.7.17CentOSMySql
- centos6.5上安裝mysql 5.7.20CentOSMySql
- CentOS6.5安裝ElasticSearch6.2.3CentOSElasticsearch
- CentOS7.7安裝mongodbCentOSMongoDB
- CentOS 6.5 php原始碼安裝1.0版CentOSPHP原始碼
- CentOS7.2 安裝 MongoDB 3.4CentOSMongoDB
- CentOS6.5安裝zookeeper-3.4.5(單機)CentOS
- Linux安裝rabbitmq簡單教程(Centos6.5)LinuxMQCentOS
- CentOS6.5安裝kafka-2.10-0.8.2(單機)CentOSKafka
- CentOS 7快速安裝Mongodb詳解CentOSMongoDB
- CentOS 6.5中安裝使用dstat資源統計工具CentOS
- Mysql5.6 for Centos6.5原始碼編譯安裝MySqlCentOS原始碼編譯
- CentOS 7 安裝MongoDB詳細步驟CentOSMongoDB
- Linux – CentOS 7 yum方式快速安裝MongoDBLinuxCentOSMongoDB
- centos7安裝mongodb 4.2社群版CentOSMongoDB
- 在Red Hat和Centos上安裝MongoDBCentOSMongoDB
- Linux Centos 7安裝MongoDB(簡單!詳細!)LinuxCentOSMongoDB
- CentOS6.5二進位制檔案安裝MySQL5.6.39CentOSMySql
- CentOS6.5安裝mysql以及常見問題的解決CentOSMySql
- 在Windows下為CodeBlocks20.3安裝、配置wxWidget3.2.6WindowsBloC
- 安裝mongodbMongoDB
- mongodb 安裝MongoDB
- CentOS6.5源CentOS
- MongoDB | Linux 安裝MongoDBLinux
- 【mongodb安裝配置】MongoDB
- MAC 安裝 MongoDBMacMongoDB
- MongoDB的安裝MongoDB
- Docker安裝mongodbDockerMongoDB
- 記一次在CentOS上安裝GitLab的流程CentOSGitlab
- Ubuntu安裝和解除安裝mongodbUbuntuMongoDB
- centos6.5伺服器安裝Nginx設定服務和開機自啟CentOS伺服器Nginx
- ubuntu透過安裝包安裝MongodbUbuntuMongoDB