"CentOS 몽고DB 서버 설치"의 두 판 사이의 차이

56번째 줄: 56번째 줄:
</source>
</source>
<source lang='cli'>
<source lang='cli'>
[root@zetaweb ~]# mongo
[root@zetawiki ~]# mongo
MongoDB shell version: 2.4.14
MongoDB shell version: 2.4.14
connecting to: test
connecting to: test

2015년 12월 8일 (화) 16:45 판

CentOS 몽고DB 서버 설치

1 설치

  • 서버(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
Installing for dependencies:
 boost-filesystem              x86_64              1.41.0-27.el6              base               47 k
 boost-iostreams               x86_64              1.41.0-27.el6              base               39 k
 boost-thread                  x86_64              1.41.0-27.el6              base               43 k
 gperftools-libs               x86_64              2.0-11.el6.3               epel              246 k
 libunwind                     x86_64              1.1-3.el6                  epel               55 k

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

Total download size: 41 M
Installed size: 117 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                 

Dependency Installed:
  boost-filesystem.x86_64 0:1.41.0-27.el6            boost-iostreams.x86_64 0:1.41.0-27.el6           
  boost-thread.x86_64 0:1.41.0-27.el6                gperftools-libs.x86_64 0:2.0-11.el6.3            
  libunwind.x86_64 0:1.1-3.el6                      

Complete!

2 서비스 시작

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

3 확인

[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 ~]#

4 같이 보기