ArchLinux64ビットでのMongoDbの使用。真新しいインストール。ルートとして試す:
/etc/rc.d/mongodb start
ログによると:
***** SERVER RESTARTED *****
Thu Mar 15 12:00:18 BackgroundJob starting: DataFileSync
Thu Mar 15 12:00:18 versionCmpTest passed
Thu Mar 15 12:00:18 versionArrayTest passed
Thu Mar 15 12:00:18 shardObjTest passed
Thu Mar 15 12:00:18 shardKeyTest passed
Thu Mar 15 12:00:18 isInRangeTest passed
Thu Mar 15 12:00:18 [initandlisten] MongoDB starting : pid=580 port=27017 dbpath=/data/db 64-bit host=(none)
Thu Mar 15 12:00:18 [initandlisten] db version v2.0.3, pdfile version 4.5
Thu Mar 15 12:00:18 [initandlisten] git version: nogitversion
Thu Mar 15 12:00:18 [initandlisten] build info: Linux brynhild.archlinux.org 3.2.6-1-ARCH #1 SMP PREEMPT Tue Feb 14 09:11:26 CET 2012 x86_64 BOOST_LIB_VERSION=1_49
Thu Mar 15 12:00:18 [initandlisten] options: { config: "/etc/mongodb.conf", dbpath: "/data/db", fork: true, journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", port: 27017, rest: "true", vvvv: "true" }
Thu Mar 15 12:00:18 [initandlisten] User Assertion: 10309:Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?
Thu Mar 15 12:00:18 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
Thu Mar 15 12:00:18 dbexit:
Thu Mar 15 12:00:18 [initandlisten] shutdown: going to close listening sockets...
Thu Mar 15 12:00:18 [initandlisten] shutdown: going to flush diaglog...
Thu Mar 15 12:00:18 [initandlisten] shutdown: going to close sockets...
Thu Mar 15 12:00:18 [initandlisten] shutdown: waiting for fs preallocator...
Thu Mar 15 12:00:18 [initandlisten] shutdown: lock for final commit...
Thu Mar 15 12:00:18 [initandlisten] shutdown: final commit...
Thu Mar 15 12:00:18 [initandlisten] shutdown: closing all files...
Thu Mar 15 12:00:18 [initandlisten] closeAllFiles() finished
Thu Mar 15 12:00:18 [initandlisten] shutdown: removing fs lock...
Thu Mar 15 12:00:18 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
Thu Mar 15 12:00:18 dbexit: really exiting now
ディレクトリとファイルの許可:
[root@(none) ~]# ls -lisa /data/db/
total 12
262711 4 drwxr-xr-x 3 root root 4096 Mar 15 11:43 .
262710 4 drwxr-xr-x 3 root root 4096 Mar 15 11:25 ..
262714 4 drwxr-xr-x 2 root root 4096 Mar 15 11:43 journal
261775 0 -rwxr-xr-x 1 root root 0 Mar 15 11:43 mongod.lock
MongoDB conf:
port = 27017
dbpath = /data/db
logpath = /var/log/mongodb/mongodb.log
logappend = true
vvvv = true
journal = true
rest = true
によってMongoDBインスタンスを開始できますがmongod
、上記のようにバックグラウンドで開始することはできません。どんな助けでも素晴らしいでしょう、ありがとう。