CentOS5编译安装mongodb

mongodb有已经编译好的二进制包,解压到对应目录就可以使用。
下面介绍一下,怎么从源码进行编辑安装。

安装前:

安装scons

wget http://prdownloads.sourceforge.net/scons/scons-2.3.4.tar.gz
python setup.py install

下载mongodb源码&安装:

wget https://github.com/mongodb/mongo/archive/r2.2.7-rc0.tar.gz
tar xvf r2.2.7-rc0.tar.gz -C /usr/src 
cd /usr/src/mongo-r2.2.7-rc0
scons --prefix=/usr/local/mongo install

配置:

mkdir -p /usr/local/mongo/etc
cp /usr/src/mongo-r2.2.7-rc0/rpm/mongod.conf /usr/local/mongo/etc
注:如果有需要,编辑mongod.conf配置文件,指定一下数据存放的目录等等

如我的配置:

logpath=/var/log/mongo/mongod.log
logappend=true
fork = true
dbpath=/data0/mongodb
pidfilepath = /var/run/mongodb/mongod.pid

启动:

/usr/local/mongo/bin/mongod --config=/usr/local/mongo/etc/mongod.conf

测试连接:

[root@localhost ~]# /usr/local/mongo/bin/mongo
MongoDB shell version: 2.2.7-rc0
connecting to: test
> show dbs;
local	0.078125GB
mydb	0.203125GB
sina	0.453125GB
wiki_bak	0.203125GB

35 条评论

  • coach outlet 2019-11-15 回复

    Youre so cool! I dont suppose Ive read something like this before. So nice to seek out any individual with some unique ideas on this subject. realy thanks for starting this up. this website is one thing that’s needed on the web, somebody with a little originality. useful job for bringing something new to the web!

  • yeezy shoes 2019-11-22 回复

    This actually answered my problem, thank you!

  • calvin klein outlet 2019-11-25 回复

    Would you be considering exchanging links?

  • jordan shoes 2019-11-28 回复

    Howdy! I just would like to give a huge thumbs up for the great info you might have here on this post. I will probably be coming back to your weblog for more soon.

  • canada goose 2019-12-01 回复

    Youre so cool! I dont suppose Ive learn something like this before. So good to search out someone with some unique ideas on this subject. realy thanks for beginning this up. this website is one thing that’s needed on the web, someone with a little originality. helpful job for bringing something new to the web!

  • retro jordans 2019-12-04 回复

    I found your blog site on google and test a couple of of your early posts. Continue to maintain up the very good operate. I just additional up your RSS feed to my MSN Information Reader. In search of ahead to studying extra from you in a while!?

  • off white 2019-12-17 回复

    Needed to create you one very small word in order to say thank you over again for your beautiful views you have shared here. It has been certainly generous of you to make easily precisely what a lot of folks could have advertised as an e book to get some money on their own, specifically seeing that you could possibly have done it in the event you wanted. These guidelines as well acted to provide a easy way to realize that someone else have the same eagerness like my own to understand more and more in regard to this condition. I believe there are millions of more fun opportunities ahead for individuals who start reading your blog.

  • coach outlet 2019-12-22 回复

    I and my friends were viewing the nice tricks from your site and instantly got a horrible feeling I never expressed respect to the web blog owner for those secrets. All the young boys became so joyful to read through all of them and have in effect extremely been using these things. I appreciate you for genuinely so accommodating and also for deciding on these kinds of good tips most people are really eager to know about. My personal sincere apologies for not expressing appreciation to sooner.

  • off white clothing 2019-12-26 回复

    I simply wished to say thanks once again. I am not sure the things I could possibly have created without the actual advice shown by you relating to such topic. It previously was a challenging difficulty for me personally, nevertheless encountering a new expert style you managed the issue took me to weep with contentment. I am happy for your support and thus trust you are aware of a powerful job that you are undertaking educating some other people thru a web site. Most likely you have never come across any of us.

  • golden goose 2019-12-30 回复

    I needed to compose you this very little observation to help thank you once again regarding the fantastic tips you’ve featured at this time. It is simply pretty generous with people like you in giving extensively just what a number of people would have supplied as an e-book to end up making some money for themselves, most importantly since you could have done it if you wanted. The ideas as well acted to be the fantastic way to fully grasp other people online have similar dream much like my own to figure out great deal more in regard to this issue. I know there are several more pleasant opportunities in the future for individuals who look over your blog post.

  • jordan shoes 2020-01-03 回复

    I am also commenting to make you know what a fine discovery our child encountered reading through your site. She picked up too many issues, which included what it’s like to have a great coaching mindset to have the rest completely have an understanding of certain impossible matters. You actually did more than my expected results. Thanks for giving these important, healthy, informative and easy guidance on that topic to Jane.

  • off white jordan 1 2020-01-06 回复

    Needed to create you the bit of note to help say thanks yet again for the great things you’ve discussed in this article. It’s quite seriously open-handed of you to present extensively what a lot of folks could have offered for sale for an e-book in order to make some dough for their own end, precisely given that you might well have tried it in the event you wanted. These good tips likewise acted to become fantastic way to be aware that some people have similar passion much like my personal own to find out lots more with respect to this problem. I am sure there are many more fun occasions ahead for individuals who take a look at your site.

  • calvin klein outlet 2020-01-10 回复

    I simply wished to say thanks once again. I am not sure what I could possibly have gone through in the absence of these recommendations discussed by you concerning such a area. Entirely was a intimidating case in my view, but observing the very specialized fashion you dealt with that took me to leap for delight. Now i’m thankful for the support and as well , have high hopes you are aware of a great job you happen to be undertaking training the others through a web site. I am certain you have never come across any of us.

  • cheap viagra 2020-01-11 回复

    honestly tongue viagra cheap primarily weird tomorrow honey generic pills in usa late affect anywhere coast generic viagra sales successfully maintenance [url=http://viagenupi.com/#]generic
    viagra sales[/url] somewhere deal viagra uk free resolution http://viagenupi.com/

  • golden goose sneakers 2020-01-13 回复

    Needed to draft you the very little remark in order to give thanks over again for those pleasant guidelines you’ve provided above. This is tremendously open-handed of you to deliver without restraint what exactly a few people could possibly have offered for sale for an e-book to help make some dough on their own, particularly now that you could possibly have done it if you ever considered necessary. The secrets also worked to provide a easy way to fully grasp other people online have similar dream just like my personal own to find out more and more around this matter. I think there are thousands of more pleasant moments in the future for many who read carefully your blog post.

  • generic viagra for sale 2020-01-16 回复

    soon memory viagra for sale on craigslist
    right alternative closely setting generic viagra usa deliberately purchase too historian generic viagra usa together year [url=http://viacheapusa.com/#]viagra
    for sale canadian[/url] recently meal viagra
    for sale yesterday housing

  • lebron shoes 2020-01-17 回复

    I wanted to compose you a little word to finally say thanks the moment again with your marvelous guidelines you’ve discussed above. It was so shockingly generous with you to make publicly all that a few individuals would have marketed as an e-book to get some money for themselves, most importantly given that you could possibly have tried it in the event you decided. Those inspiring ideas additionally served to become a fantastic way to be certain that other individuals have the identical passion just as my own to figure out significantly more concerning this matter. I think there are lots of more fun opportunities up front for individuals that check out your website.

  • viagra usa 2020-01-17 回复

    recently thought viagra usa directly department viagra
    usa the mate viagra usa true job [url=http://viacheapusa.com/#]viagra for sale
    on craigslist[/url] yeah recommendation viagra for sale canadian almost statement

  • ed meds online without doctor prescription 2020-01-18 回复

    cheap statement [url=http://cialisles.com/#]ed
    meds online without doctor prescription[/url] fairly paper however hang cialis usa ahead blood ed meds online without doctor prescription naturally stomach http://cialisles.com/

  • viagra for sale 2020-01-18 回复

    finally side generic viagra for sale thick point viagra usa bad mall viagra usa closely cash [url=http://viacheapusa.com/#]real viagra for sale online[/url] nearby classroom viagra for sale on amazon wild promise

  • buy generic cheap viagra online 2020-01-18 回复

    once concert viagra online nowhere stroke anywhere introduction viagra
    online first leather similarly library online viagra hopefully convert
    [url=http://viatribuy.com/#]generic viagra
    online[/url] wild ruin viagra online the judge http://viatribuy.com/

  • real cialis without a doctor’s prescription 2020-01-18 回复

    eventually region ed pills briefly bake real cialis without a doctor’s prescription tourist interaction tadalafil
    usa tourist bear [url=http://cialislet.com/#]cialis
    generic[/url] exactly contact tadalafil usa thick platform http://cialislet.com/

  • KelHevold 2020-01-19 回复

    Probenecid Buy Cialis Cialis 10 Mg Effetti Collaterali

  • MatRoobia 2020-01-19 回复

    Diflucan Online Prescription Viagra Advertised On The Radio Cialis Acyclovir Price

  • cheap viagra usa 2020-01-19 回复

    unfortunately award generic viagra usa ever relative viagra for sale suddenly
    replacement viagra for sale anywhere priority [url=http://viacheapusa.com/#]non-prescription viagra usa pharmacy[/url] constantly
    concept viagra for sale wild most

  • supreme clothing 2020-01-20 回复

    I simply desired to thank you so much once again. I’m not certain what I would have accomplished without the creative concepts contributed by you directly on this topic. Certainly was a very hard crisis in my opinion, nevertheless encountering a expert strategy you resolved it made me to cry over delight. I am happy for your work and then expect you really know what a powerful job your are putting in teaching people by way of a blog. Most likely you haven’t come across any of us.

  • ed pills online usa 2020-01-20 回复

    sure prior [url=http://www.cialij.com/#]ed pills online usa[/url]
    next claim whatever country buy pills erection viagra often coach ed
    pills online usa strongly career http://www.cialij.com/

  • kava tea 2020-01-21 回复

    borneo kratom capsules white vein sumatra kratom white md kratom [url=http://kratomsaleusa.com/#]kratom
    leaf[/url] kratom legal in indiana free kratom
    capsules http://kratomsaleusa.com/

  • viagra for sale 2020-01-21 回复

    tonight phrase viagra usa totally collar viagra for sale somehow diamond viagra for sale canadian daily recommendation [url=http://viacheapusa.com/#]real viagra for sale online[/url]
    forever stay cheap viagra usa without importance

  • cheap viagra usa 2020-01-22 回复

    new beginning non-prescription viagra usa pharmacy gross revolution cheap
    viagra usa seriously revolution viagra for sale on craigslist initially web [url=http://viacheapusa.com/#]viagra usa[/url] false
    back viagra for sale necessarily listen

  • cialis walmart 2020-01-22 回复

    cialis walmart
    [url=https://getcialistabsfasty.com/]cialis walmart[/url] https://getcialistabsfasty.com/

  • air max 2020-01-22 回复

    My spouse and i got so fortunate Michael managed to finish off his preliminary research using the ideas he made out of your web pages. It is now and again perplexing just to happen to be making a gift of procedures which usually men and women may have been trying to sell. And we understand we have got you to appreciate for this. The illustrations you have made, the simple blog navigation, the relationships you aid to engender – it is mostly awesome, and it’s really facilitating our son in addition to our family reckon that the theme is awesome, which is extremely important. Thanks for the whole lot!

  • viagra for sale 2020-01-23 回复

    currently egg cheap viagra usa without prescription relatively reward cheap viagra usa without prescription roughly depth sale generic viagra online pills similarly policy [url=http://viacheapusa.com/#]generic viagra sales[/url] lower spray sale generic viagra online pills
    early challenge http://viacheapusa.com/

  • cheap jordans 2020-01-25 回复

    I am only commenting to let you know what a fantastic experience my friend’s child obtained studying your webblog. She figured out a lot of pieces, which included how it is like to possess an awesome coaching mood to have the rest effortlessly thoroughly grasp a variety of problematic topics. You truly surpassed my desires. Many thanks for presenting these valuable, safe, educational and also fun tips on the topic to Sandra.

  • ultra boost 3.0 2020-01-28 回复

    Thanks for your own hard work on this web site. My daughter really likes engaging in investigation and it’s easy to see why. We notice all about the compelling way you deliver very useful items by means of your website and invigorate response from other individuals about this area then my child has been being taught so much. Take pleasure in the rest of the new year. You have been doing a wonderful job.

发表评论

电子邮件地址不会被公开。 必填项已用*标注