我正在尝试安装MEAN堆栈组件。所以我试着安装mongodb。存储库中的软件包安装正确但运行它似乎有问题。
安装后我尝试过:
sudo systemctl enable mongodb
导致:
● mongodb.service
Loaded: masked (/dev/null)
Active: failed (Result: exit-code) since Thu 2016-10-27 15:22:36 EDT; 17min ago
Main PID: 22947 (code=exited, status=14)
Hint: Some lines were ellipsized, use -l to show in full.
然后我尝试了:sudo systemctl enable mongodb
Executing /usr/sbin/update-rc.d mongodb defaults
Executing /usr/sbin/update-rc.d mongodb enable
Failed to execute operation: Operation not supported
知道为什么不开始吗?我无法弄明白。我正在使用Xubuntu 15.04。
日志文件说:
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] MongoDB starting : pid=26138 port=27017 dbpath=/var/lib/mongodb 64-bit host=System-Product-Name
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] db version v3.2.10
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] git version: 79d9b3ab5ce20f51c272b4411202710a082d0317
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] allocator: tcmalloc
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] modules: none
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] build environment:
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] distmod: ubuntu1404
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] distarch: x86_64
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] target_arch: x86_64
2016-10-27T15:47:02.747-0400 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2016-10-27T15:47:02.764-0400 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=4G,session_max=20000,eviction=(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),
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten]
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten]
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten]
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-10-27T15:47:02.883-0400 I CONTROL [initandlisten]
2016-10-27T15:47:02.884-0400 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongodb/diagnostic.data'
2016-10-27T15:47:02.884-0400 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-10-27T15:47:02.918-0400 I NETWORK [initandlisten] waiting for connections on port 27017
2016-10-27T15:48:23.409-0400 I CONTROL [signalProcessingThread] got signal 2 (Interrupt), will terminate after current cmd ends
2016-10-27T15:48:23.409-0400 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
2016-10-27T15:48:23.413-0400 I CONTROL [signalProcessingThread] now exiting
2016-10-27T15:48:23.413-0400 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...
2016-10-27T15:48:23.413-0400 I NETWORK [signalProcessingThread] closing listening socket: 6
2016-10-27T15:48:23.413-0400 I NETWORK [signalProcessingThread] closing listening socket: 7
2016-10-27T15:48:23.413-0400 I NETWORK [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
2016-10-27T15:48:23.413-0400 I NETWORK [signalProcessingThread] shutdown: going to flush diaglog...
2016-10-27T15:48:23.413-0400 I NETWORK [signalProcessingThread] shutdown: going to close sockets...
2016-10-27T15:48:23.413-0400 I STORAGE [signalProcessingThread] WiredTigerKVEngine shutting down
2016-10-27T15:48:23.511-0400 I STORAGE [signalProcessingThread] shutdown: removing fs lock...
2016-10-27T15:48:23.512-0400 I CONTROL [signalProcessingThread] dbexit: rc: 0