Mongodb学習(インストール編):centosでのインストール
-
-
- ###
- [root@192 lamp]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-
-
- 2.2.2.tgz
- ###
- [root@192 lamp]# tar zxvf mongodb-linux-i686-2.2.2.tgz
-
- ###
- [root@192 lamp]# ls
- mongodb-linux-i686-2.2.2 mongodb-linux-i686-2.2.2.tgz
-
- [root@192 lamp]# cd mongodb-linux-i686-2.2.2
- [root@192 mongodb-linux-i686-2.2.2]# ls
- bin GNU-AGPL-3.0 README THIRD-PARTY-NOTICES
- [root@192 mongodb-linux-i686-2.2.2]# cd bin/
- [root@192 bin]# pwd
- /lamp/mongodb-linux-i686-2.2.2/bin
-
- ### /lamp/mongodb-linux-i686-2.2.2/bin /usr/local/mongodb
- [root@192 bin]# cd ..
- [root@192 mongodb-linux-i686-2.2.2]# ls
- bin GNU-AGPL-3.0 README THIRD-PARTY-NOTICES
-
- [root@192 mongodb-linux-i686-2.2.2]# rsync -a bin /usr/local/mongodb
-
- ### :
- [root@192 mongodb-linux-i686-2.2.2]cd /usr/local/mongodb
- [root@192 mongodb]# mkdir data
- [root@192 mongodb]# ls
- bin data
- [root@192 mongodb]# touch dblogs
- [root@192 mongodb]# ls
- bin data dblogs
-
- ### ( Daemon )
- [root@192 mongodb]# cd bin/
- [root@192 bin]# ./mongod --dbpath=/usr/local/mongodb/data/ --
-
- logpath=/usr/local/mongodb/dblogs --fork
-
- ### mongod
- [root@192 bin]# pstree -p ¦grep mongod
-
- ### ( )
- [root@192 bin]# vi /etc/rc.local
- :
- /usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data/ --
-
- logpath=/ur/local/mongodb/dblogs --fork
-
-
- cat /etc/rc.local
-
- :( )
- pkill mongod
- killall mongod
-
-
- ps -ef ¦grep mongod
- !ps
-
- mongodb
- [root@192 ~]# cd /urs/local/mongodb/data
- [root@192 data]rm -rf mongod.lock
転載は明記してください Mongodb学習(インストール編):centosでのインストール