我使用命令/bin/mongodb啟動以后,最終的提示是:
NETWORK [initandlisten] waiting for connections on port 27017
而且一直停頓在這條訊息。
我查了一下相關貼,都說這條資訊表示,mongo server正常啟動了;
只要另起一個terminal,輸入$mongo就可以了;但我輸入mongo命令后,提示command not found。
我是Linux作業系統,在bin目錄下找了一下,發現根本就沒有mongo這個命令檔案,所以提示command not found;
然后在整個磁盤都搜遍了,也沒找到這個mongo命令檔案。
以下是我啟動mongodb的Log:
[oracle@dbtest ~]$ /bin/mongod
2019-08-23T12:10:16.706+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] MongoDB starting : pid=41457 port=27017 dbpath=/data/db 64-bit host=dbtest
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] db version v4.2.0
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] allocator: tcmalloc
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] modules: none
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] build environment:
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] distmod: rhel70
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] distarch: x86_64
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] target_arch: x86_64
2019-08-23T12:10:16.710+0800 I CONTROL [initandlisten] options: {}
2019-08-23T12:10:16.712+0800 I STORAGE [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2019-08-23T12:10:16.712+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=2239M,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-08-23T12:10:17.500+0800 I STORAGE [initandlisten] WiredTiger message [1566533417:500143][41457:0x7fe362b8bc00], txn-recover: Recovering log 4 through 5
2019-08-23T12:10:17.574+0800 I STORAGE [initandlisten] WiredTiger message [1566533417:574300][41457:0x7fe362b8bc00], txn-recover: Recovering log 5 through 5
2019-08-23T12:10:17.706+0800 I STORAGE [initandlisten] WiredTiger message [1566533417:706771][41457:0x7fe362b8bc00], txn-recover: Main recovery loop: starting at 4/4480 to 5/256
2019-08-23T12:10:17.707+0800 I STORAGE [initandlisten] WiredTiger message [1566533417:707472][41457:0x7fe362b8bc00], txn-recover: Recovering log 4 through 5
2019-08-23T12:10:17.826+0800 I STORAGE [initandlisten] WiredTiger message [1566533417:826448][41457:0x7fe362b8bc00], txn-recover: Recovering log 5 through 5
2019-08-23T12:10:17.911+0800 I STORAGE [initandlisten] WiredTiger message [1566533417:911203][41457:0x7fe362b8bc00], txn-recover: Set global recovery timestamp: (0,0)
2019-08-23T12:10:17.955+0800 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2019-08-23T12:10:17.962+0800 I STORAGE [initandlisten] Timestamp monitor starting
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten]
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten]
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten]
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten]
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2019-08-23T12:10:17.967+0800 I CONTROL [initandlisten]
2019-08-23T12:10:17.983+0800 I SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
2019-08-23T12:10:17.984+0800 I STORAGE [initandlisten] Flow Control is enabled on this deployment.
2019-08-23T12:10:17.984+0800 I SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>
2019-08-23T12:10:17.984+0800 I SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
2019-08-23T12:10:17.985+0800 I SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>
2019-08-23T12:10:17.985+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2019-08-23T12:10:17.987+0800 I SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
2019-08-23T12:10:17.987+0800 I SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>
2019-08-23T12:10:17.987+0800 I NETWORK [initandlisten] Listening on /tmp/mongodb-27017.sock
2019-08-23T12:10:17.988+0800 I NETWORK [initandlisten] Listening on 127.0.0.1
2019-08-23T12:10:17.988+0800 I NETWORK [initandlisten] waiting for connections on port 27017
uj5u.com熱心網友回復:
下載一個mongo客戶端就可以了uj5u.com熱心網友回復:
which mongo 看看在哪兒,找不到則下載一個轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/49938.html
標籤:MongoDB
上一篇:MongoDB首次查詢很慢的問題
