기본 콘텐츠로 건너뛰기

NoSQL MongoDB 설치

1.mongoDB 다운로드 링크

2. 윈도우에서 설치
Next->동의->Complete->Next

MongoDB compass 체크 해제 (오류 검사 기능)->next->install -> finish



3.Windows에서 mongoDB 실행
윈도우의 C드라이브에 설치 한 경로로 이동




mongoDB 실행문 : mongod.exe --dbpath D:\test\mongodb

실행확인 : waiting for connection on port 27017

CMD 새 창 실행

명령문
db 확인  명령어 : db
db status 확인 명령어 : db.stats()
몽고DB 종료 명령어 : Ctrl C

-------------------------------------

4.linux에서 mongoDB 실행
-----

4-1. 압축해제
-----
4-2. 압축파일을 /usr/local/mongodb로 이동

-----
4-3. 워크스페이스 만들기 : mkdir mongo_data
-----

4-4. 환경설정 : vi /etc/profile
-----
4-5. 환경설정 실행 한 후 cd mongodb bin으로 이동
-----
4-6.mongoDB 실행하기 
-----
        
4-7 mongoDB 실행 확인



설치 끝!


댓글

이 블로그의 인기 게시물

[DATA STRUCTURE] 큐 QUEUE

큐[QUEUE]의개념 Queue is an abstract data structure, somewhat similar to Stacks.  Unlike stacks, a queue is open at both its ends. One end is always used to insert data (enqueue) and the other is used to remove data (dequeue).  Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first. First In First Out Basic Operation Queue operations may involve initializing or defining the queue, utilizing it, and then completely erasing it from the memory. Here we shall try to understand the basic operations associated with queues − enqueue() − add (store) an item to the queue. dequeue() − remove (access) an item from the queue. Few more functions are required to make the above-mentioned queue operation efficient. These are − peek() − Gets the element at the front of the queue without removing it. isfull() − Checks if the queue is full.[Boolean] isempty() − Checks if the queue is empty.[Boolean] 큐의사용 예 너비 우선 탐색(BFS, Breadth-First Search) 구현 처리해야 할 노...

기본적인 MongoDB 사용/자바연동

mongoDB 명령어 db: 현재 사용 중인 데이터베이스 확인 -test :Default로 들어가 있는 test 테이블 show dbs : DB의 리스트 확인 show collections : collection 리스트 확인, collection = table in mongoDB show tables : 위 명령어와 같음 db.stats() : 데이터베이스 상태 확인 db.(db명).drop(): 안에 있는 데이터 삭제 mongod --version => mongodb 확인 mongo -version => shell 확인 use 테이블 명: 테이블 생성 db.dropDatabase() : 접속된 테이블 삭제 -테이블 확인 필요!! db.createCollection(“테이블 명”): 테이블 생성 db.테이블 명.drop(): 테이블 지움 db.blog[테이블 명].insert({“name ” : “ nodejs”}) : 내용(Document)을 추가 db.테이블 명.insert([ {“ ” : “ ”},{“ ” : “ ”}]); -여러 Documents를 하나의 테이블에 넣는 방법 db.blog[테이블 명].find() : 내용 확인 db.테이블 명.find().pretty() : 보기 좋게 검색 id : primary key를 자동으로 부여해줌 db.테이블 명.remove({“name” : “book01”}) : 특정한 Documents를 지우는 법 insert 문 count 문 연산자 몽고디비 비교 연산자 $eq 2. $gt 3. $gte 4. $lt 5. $lte ne : 주어진 값과 일치 하지 않는 값 in: 주어진 배열 안에 속하는 값 nin: 주어진 배열 안에 속하지 않는 값 몽고디비 논리연산자 1.$or: 주어진 조건 중 하나라도 tr...

CentOs7 설치

1.새로 만들기에서 Hadoop01 (임의)가상머신 만들기     *insert로 centOS7 삽입. 2.키보드 레이아웃 설정 -설치도중 키보드 레이아웃 영어[미국]선택 3.소프트웨어 선택에서 개발 및 창조를 위한 워크스테이션 선택-> 완료 4.네트워크 설정에서 이더넷 0s3을 선택 오른쪽 윗편에 켬을 클릭하고 완료 5. 설치대상에서 파티션 설정 6.자동으로 생성을 클릭 7.수동으로 파티션 설정에서 “swap”와 “/”를 일단 제거 6.새 마운트 지점 추가에서 “swap”를 용량 5g로 추가 7.새 마운트 추가에서 “/”를 추가 용량을 빈 상태로 두면 나머지 용량이 할당. 8.아래와 같이 설정되면 완료를 클릭 9.변경 사항 적용 클릭 10. 상기를 다 설정하면 전체 시작을 클릭 11. root암호와 사용자 생성 설정 12.아래와 같이 사용자 설정.     *이 사용자를 관리자로 합니다. 꼭 체크 13.설치 완료 클릭 --------------------------------------centOS 7 네트워크 설정------------------------------------------ 1.CentOs7 network 설정 [ cd /etc/sysconfig/network-scripts/ ] 로 이동 2.[ vi ifcfg-enp0s8 ]입력해서 아래와 같이 Edit    reboot 3.service network restart입력 후 ifconfig로 확인 4.JAVA 1.8을 설치해야함! JAVA SE Development Kit 8u161을 다운 받아야지 워닝 경고창이 안뜸! 5.JAVA 환경 설정 vi /etc/profile export JAVA_HOME=/usr/loc...