Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mongodb Learning (installation): installation under centos

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Installation # download the unzipped file [root@192 lamp] # wget http://fastdl.mongodb.org/linux/mongodb-linux-i686- 2.2.2.tgz### extracted file [root@192 lamp] # tar zxvf mongodb-linux-i686-2.2.2.tgz### view the extracted file [root@192 lamp] # lsmongodb-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] # lsbin 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### copy the / lamp/mongodb-linux-i686-2.2.2/bin directory to / usr/local/mongodb [root@192 bin] # cd. [root@192 mongodb-linux-i686-2.2.2] # lsbin GNU-AGPL-3.0 README THIRD-PARTY-NOTICES [root@192 mongodb-linux-i686-2.2.2] # rsync-a bin / usr/local/mongodb### create data storage and log files: [root@192 mongodb-linux-i686-2.2.2] cd / usr/local/mongodb [root@192 mongodb] # mkdir data [root@192 mongodb ] # lsbin data [root@192 mongodb] # touch dblogs [root@192 mongodb] # lsbin data dblogs### startup process (running the service as background Daemon) [root@192 mongodb] # cd bin/ [root@192 bin] #. / mongod-- dbpath=/usr/local/mongodb/data/-- logpath=/usr/local/mongodb/dblogs-- fork### View mongod process [root@192 bin] # pstree-p write grep mongod### to computer startup File (start with the computer) [root@192 bin] # vi / etc/rc.local add the following: / usr/local/mongodb/bin/mongod-- dbpath=/usr/local/mongodb/data/-- logpath=/ur/local/mongodb/dblogs-- fork view cat / etc/rc.local shutdown service: (kill the process) pkill mongodkillall mongod view the process ps-ef kill the lock file of mongodb [root@192 ~] # cd / urs/local / mongodb/data [root@192 data] rm-rf mongod.lock

Reprint please note: Mongodb Learning (installation): installation under centos | Tang Wenboke

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report