Centos VMにmongoDbをインストールしようとしており、次のWebサイトに従いました。 https://linuxize.com/post/how-to-install-mongodb-on-centos-7/、https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-centos-7 ただし、Cliでmongodコマンドを実行すると、MongoDBに接続/入力できません。誰でもこれについてどんな考えを持っていますか?よろしくお願いします。
出力mongod
:
-460f-4bb5-a5d7-0bbe48f3246a") }
2019-08-26T15:21:13.417+0530 I INDEX [initandlisten] index build: done building index _id_ on ns admin.system.version
2019-08-26T15:21:13.417+0530 I SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
2019-08-26T15:21:13.417+0530 I COMMAND [initandlisten] setting featureCompatibilityVersion to 4.2
2019-08-26T15:21:13.421+0530 I SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
2019-08-26T15:21:13.421+0530 I STORAGE [initandlisten] Flow Control is enabled on this deployment.
2019-08-26T15:21:13.422+0530 I SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>
2019-08-26T15:21:13.422+0530 I STORAGE [initandlisten] createCollection: local.startup_log with generated UUID: 660f8f2a-c6d0-4a0c-a4bb-0f975d1f207e and options: { c485760 }
2019-08-26T15:21:13.426+0530 I INDEX [initandlisten] index build: done building index _id_ on ns local.startup_log
2019-08-26T15:21:13.427+0530 I SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>
2019-08-26T15:21:13.427+0530 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2019-08-26T15:21:13.428+0530 I SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
2019-08-26T15:21:13.428+0530 I NETWORK [initandlisten] Listening on /tmp/mongodb-27017.sock
2019-08-26T15:21:13.428+0530 I NETWORK [initandlisten] Listening on 127.0.0.1
2019-08-26T15:21:13.428+0530 I NETWORK [initandlisten] waiting for connections on port 27017
2019-08-26T15:21:13.428+0530 I CONTROL [LogicalSessionCacheReap] Sessions collection is not set up; waiting until next sessions reap interval: config.system.sessions
2019-08-26T15:21:13.429+0530 I STORAGE [LogicalSessionCacheRefresh] createCollection: config.system.sessions with provided UUID: 45ed25cc-1dbb-4f38-8333-cf36ae8bd473 UUID("45ed25cc-1dbb-4f38-8333-cf36ae8bd473") }
2019-08-26T15:21:13.433+0530 I INDEX [LogicalSessionCacheRefresh] index build: done building index _id_ on ns config.system.sessions
2019-08-26T15:21:13.438+0530 I INDEX [LogicalSessionCacheRefresh] index build: starting on config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lnfig.system.sessions", expireAfterSeconds: 1800 } using method: Hybrid
2019-08-26T15:21:13.439+0530 I INDEX [LogicalSessionCacheRefresh] build may temporarily use up to 500 megabytes of RAM
2019-08-26T15:21:13.439+0530 I INDEX [LogicalSessionCacheRefresh] index build: collection scan done. scanned 0 total records in 0 seconds
2019-08-26T15:21:13.439+0530 I INDEX [LogicalSessionCacheRefresh] index build: inserted 0 keys from external sorter into index in 0 seconds
2019-08-26T15:21:13.440+0530 I INDEX [LogicalSessionCacheRefresh] index build: done building index lsidTTLIndex on ns config.system.sessions
2019-08-26T15:26:13.428+0530 I SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>
答え1
実際に何をしたいのか分かりません。走るとmongod
モンゴルが始まる仕える人現在のシェルから。 MongoDBサーバーに接続するには、以下を使用する必要があります。mongo
答え2
まだ明確ではありませんが、コマンドを介してMarking collection...
到達すると、MongoDBはすでに起動しています。mongod
タスクを開始するには、新しいターミナルウィンドウを開き、binフォルダに移動してを実行しますmongo
。混乱した部分は(bashで)中断されているように見えますが、本当ではありません。入力help
すると動作します。
答え3
私も同じ問題があります。 MongoDBをインストールしようとしています。 ./mongod コマンドを呼び出しましたが、インストールを完了できませんでした。同じコマンドが実行されます。
2019-09-21T21:45:17.039+0600 I SHARDING [LogicalSessionCacheReap] config.transactions コレクションをコレクションバージョンとして表示します。
Mac OS Mojave 10.14私のすべての追跡:
MacBook-Pro-dns:mongo user$ ./mongod
2019-09-21T21:45:16.178+0600 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] MongoDB starting : pid=8310 port=27017 dbpath=/data/db 64-bit host=MacBook-Pro-dns.local
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] db version v4.2.0
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] allocator: system
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] modules: none
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] build environment:
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] distarch: x86_64
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] target_arch: x86_64
2019-09-21T21:45:16.187+0600 I CONTROL [initandlisten] options: {}
2019-09-21T21:45:16.189+0600 W STORAGE [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
2019-09-21T21:45:16.189+0600 I STORAGE [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2019-09-21T21:45:16.189+0600 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.
2019-09-21T21:45:16.189+0600 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=7680M,cache_overflow=(file_max=0M),session_max=33000,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),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
2019-09-21T21:45:16.699+0600 I STORAGE [initandlisten] WiredTiger message [1569080716:699859][8310:0x10e6245c0], txn-recover: Recovering log 1 through 2
2019-09-21T21:45:16.762+0600 I STORAGE [initandlisten] WiredTiger message [1569080716:762524][8310:0x10e6245c0], txn-recover: Recovering log 2 through 2
2019-09-21T21:45:16.825+0600 I STORAGE [initandlisten] WiredTiger message [1569080716:825486][8310:0x10e6245c0], txn-recover: Main recovery loop: starting at 1/22912 to 2/256
2019-09-21T21:45:16.826+0600 I STORAGE [initandlisten] WiredTiger message [1569080716:826288][8310:0x10e6245c0], txn-recover: Recovering log 1 through 2
2019-09-21T21:45:16.884+0600 I STORAGE [initandlisten] WiredTiger message [1569080716:884735][8310:0x10e6245c0], txn-recover: Recovering log 2 through 2
2019-09-21T21:45:16.932+0600 I STORAGE [initandlisten] WiredTiger message [1569080716:932134][8310:0x10e6245c0], txn-recover: Set global recovery timestamp: (0,0)
2019-09-21T21:45:17.002+0600 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2019-09-21T21:45:17.019+0600 I STORAGE [initandlisten] Timestamp monitor starting
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten]
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten]
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten]
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten]
2019-09-21T21:45:17.020+0600 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2019-09-21T21:45:17.031+0600 I SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
2019-09-21T21:45:17.034+0600 I STORAGE [initandlisten] Flow Control is enabled on this deployment.
2019-09-21T21:45:17.034+0600 I SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>
2019-09-21T21:45:17.034+0600 I SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
2019-09-21T21:45:17.035+0600 I SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>
2019-09-21T21:45:17.036+0600 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2019-09-21T21:45:17.039+0600 I SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
2019-09-21T21:45:17.039+0600 I NETWORK [initandlisten] Listening on /tmp/mongodb-27017.sock
2019-09-21T21:45:17.039+0600 I NETWORK [initandlisten] Listening on 127.0.0.1
2019-09-21T21:45:17.039+0600 I NETWORK [initandlisten] waiting for connections on port 27017
2019-09-21T21:45:17.039+0600 I SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>```