here 제공된 지침에 따라 Ubuntu에 MongoDB Community Edition을 설치했습니다.우분투 mongoDB의 위치를 변경하면 연결이 실패합니다 (작동이 허용되지 않음)
먼저 서비스를 시작한 다음 클라이언트를 연결하여 연결을 테스트했습니다. (robomongo와 umongo).
이제 내 작업의 유형 때문에 GBs 파일을 내 컴퓨터에 저장할 것입니다. 따라서 mongoDB의 위치를 변경해야했습니다.
1 단계 : 열기 mongod.conf
\etc
2 단계에서 다음 deired 하나
편집 경로 그래서 (물론 here 언급) 아래의 단계를 따라 갔다. 나의 새로운 경로
dbPath: /home/shouman/mongodb
3 단계 다음과 같습니다 새로운 경로로 이전 경로에서 데이터를 복사
4 단계 : 새 디렉토리 권한을 업데이트 재귀 적으로 777
이제 mongoDB를 시작할 수 없습니다. 나는 /var/log/mongodb/mongod.lod
에서 로그 파일을 확인하고 이제 이제 새 위치를보고 그
- 하여 MongoDB에서 몇 가지주의 사항을 알 수 있습니다
/home/shouman/mongodb/WiredTiger.wt
아래에 언급 한 바와 같이 권한 문제가있을 것 같습니다. (그것은 또한 두 개의 잠금 파일을 생성)
- 나는이 특정 파일에 대한 권한을 확인하고는 (마지막 사진을 확인)
- 내가 MongoDB를하지만 여전히 같은 문제가 여기에
가 다시 시작 시도 좋아 보인다 전체 로그 출력
2017-04-17T18:19:59.466+0300 I CONTROL [main] ***** SERVER RESTARTED *****
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] MongoDB starting : pid=3374 port=27017 dbpath=/home/shouman/mongodb 64-bit host=shouman-Lenovo-IdeaPad-Y500
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] db version v3.4.3
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] git version: f07437fb5a6cca07c10bafa78365456eb1d6d5e1
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] allocator: tcmalloc
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] modules: none
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] build environment:
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] distmod: ubuntu1604
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] distarch: x86_64
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] target_arch: x86_64
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/home/shouman/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true } }
2017-04-17T18:19:59.503+0300 I - [initandlisten] Detected data files in /home/shouman/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten]
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3454M,session_max=20000,eviction=(threads_min=4,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),
2017-04-17T18:19:59.507+0300 E STORAGE [initandlisten] WiredTiger error (1) [1492442399:507878][3374:0x7f5379b49cc0], file:WiredTiger.wt, connection: /home/shouman/mongodb/WiredTiger.wt: handle-open: open: Operation not permitted
2017-04-17T18:19:59.508+0300 I - [initandlisten] Assertion: 28595:1: Operation not permitted src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 267
2017-04-17T18:19:59.508+0300 I STORAGE [initandlisten] exception in initAndListen: 28595 1: Operation not permitted, terminating
2017-04-17T18:19:59.508+0300 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2017-04-17T18:19:59.508+0300 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2017-04-17T18:19:59.508+0300 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2017-04-17T18:19:59.508+0300 I CONTROL [initandlisten] now exiting
2017-04-17T18:19:59.508+0300 I CONTROL [initandlisten] shutting down with code:100