기본 콘텐츠로 건너뛰기

CentOS mongodb 설치 실행 방법 & mongodb 매뉴얼 사이트

https://docs.mongodb.com/manual/tutorial/getting-started/


7. mongod 설치 (CentOS 기준)
확인
service mongod status
mongo --version
설치
yum install mongodb mongodb-server
시작
systemctl start  mongod
systemctl status  mongod
[root@localhost mosquitto]# mongo --version
MongoDB shell version: 2.6.12
[root@localhost mosquitto]# netstat -ntlp | grep mongod
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      26060/mongod
[root@localhost mosquitto]# mongo
MongoDB shell version: 2.6.12
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
Server has startup warnings:
2018-07-05T15:21:20.756+0900 [initandlisten]
2018-07-05T15:21:20.756+0900 [initandlisten] ** WARNING: Readahead for /var/lib/mongodb is set to 4096KB
2018-07-05T15:21:20.756+0900 [initandlisten] **          We suggest setting it to 256KB (512 sectors) or less
2018-07-05T15:21:20.756+0900 [initandlisten] **          http://dochub.mongodb.org/core/readahead
> show dbs
admin  (empty)
local  0.078GB
> exit
bye
[root@localhost mosquitto]#

외부 접속
vi /etc/mongod.conf
bind_ip = 127.0.0.1 => 0.0.0.0
재시작

설치 완료
테스트해보기
[root@localhost mosquitto]# mongo

insert
> db.users.insert({_id:"terry",city:"seoul"})

Select
> db.users.find({_id:"terry"})

Delete
> db.users.remove({_id:"terry"})

속성 확인
db.users.validate()


댓글

이 블로그의 인기 게시물

UltraEdit Professional Version 18.20.0.1014 라이센스 키 넣기

Step 1: unpack rar archive      Step 2: run the setup   Step 3: Use the given keygen to activate    Add the line   127.0.0.1 licensing.ultraedit.com         to your %WINDOWS%\system32\drivers\etc\hosts file                 Enter any data for license-id and password (license-id must be a         number)                 Choose Offline activation and generate corresponding activation         codes for your user codes   Step 4: Enjoy and Support Developers, Buy It, They Deserved It!

gsjava WeGuardia™ SSLplus 특징(퓨쳐시스템 => 퓨쳐텍정보통신으로 이관)

☎ 문의 :  010-3240-0041 김성은 소장 01.   웹기반   인터페이스   제공 ……. –  웹기반   인터관리   및   사용   편리성을   제공 ……. –  실시간 터널수, 실시간 위반 사용자 등   복잡   정교한   정보   표시를   구현 02.   사용자를   위한   다양한   클라이언트   제공 ……. –  윈도우 , IOS,MAC, 안드로이드   및   리눅스   클라이언트   제공 ……. –  항시   암호화된   네트워크   연결성 ,  보안성   및   단말  Compliance  등  NAC  기능 03.   사용자   친화적   앱   목록 ……. – OS 별 앱 목록을 등록후 사용 가능 ……. –  사용자는   접속   정보   기억   불필요 ,  접속   후 ,  앱   목록에서   원하는   앱을   선택하여   클릭 ……. –  기업   필수   앱   배포   가능 04.   효율적인  VPN Tunneling ……. – Non Split Tunneling 과  Split Tunneling 을   지원 ,  업무   트래픽과   일반   인터넷   트래픽   분리   처리   가능 ……. – WeGuardia™SSLplus  보안설정을 ...