CentOS 몽고DB 서버 설치

(CentOS MongoDB 설치에서 넘어옴)
  다른 뜻에 대해서는 우분투 몽고DB 서버 설치 문서를 참조하십시오.
CentOS 몽고DB 서버 설치
CentOS mongod 설치

1 사전작업[ | ]

2 확인[ | ]

[root@zetawiki ~]# service mongod status
mongod: unrecognized service
[root@zetawiki ~]# mongo --version
-bash: mongo: command not found

3 설치[ | ]

  • 서버(mongodb-server)만 설치해도 되지만, 클라이언트(mongodb)도 함께 설치하자.
[root@zetawiki ~]# yum install mongodb mongodb-server
... (서버)
===========================================================================================
 Package                   Arch              Version                 Repository       Size
===========================================================================================
Installing:
 mongodb                   x86_64            2.4.14-1.el6            epel             35 M
 mongodb-server            x86_64            2.4.14-1.el6            epel            5.1 M

Transaction Summary
===========================================================================================
Install       2 Package(s)

Total download size: 40 M
Installed size: 116 M
Is this ok [y/N]: y
... (생략)
Installed:
  mongodb.x86_64 0:2.4.14-1.el6            mongodb-server.x86_64 0:2.4.14-1.el6           

Complete!

4 서비스 시작[ | ]

[root@zetawiki ~]# service mongod status
mongod is stopped
[root@zetawiki ~]# service mongod start
Starting mongod:                                           [  OK  ]

5 확인 2[ | ]

[root@zetawiki ~]# mongo --version
MongoDB shell version: 2.4.14
[root@zetawiki ~]# netstat -ntlp | grep mongod
tcp        0      0 127.0.0.1:27017             0.0.0.0:*                   LISTEN      29813/mongod
[root@zetawiki ~]# mongo
MongoDB shell version: 2.4.14
connecting to: test
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
> show dbs
local	0.078125GB
> exit
bye
[root@zetawiki ~]#

6 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}