In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Mongodb2.0.5 version installation
One: install PythonVersion:Python2.6 http://www.python.org/ftp/python/tar zxvf Python-2.6.6.tgz./configure-- enable-sharedmakesudo make instalcat / etc/ld.so.conf add / usr/local/lib line sudo ldconfig to / etc/ld.so.conf II: Scons install $tar zxvf scons-2.0.1.tar.gz$ sudo python setup.py installsudo vim / usr/bin/scons or vim / usr/local/bin/scons modify as follows #! / usr/bin/env python2.6sudo yum-y install boost-devel pcre-devel js-devel readline-devel ncurses-devel III: Spider Monkey installs Version:js-1.7.0$ wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz$ cd / home/webuser/software/mongodb/js/src$ export CFLAGS= "- DJS_C_STRINGS_ARE_UTF8" $make-f Makefile.ref$ sudo JS_DIST=/usr make-f Makefile.ref exportsudo Yum remove boost*i386 / / Uninstall 32-bit package rpm-qa View status sudo yum remove pcre*i386 boost*i386 ncurses*i386 readline*i386sudo yum remove ncurses*i386sudo yum remove readline*i386-sudo yum remove pcre-devel / / Uninstall 64-bit Open package sudo yum remove boost-develsudo yum remove ncurses-devel pcre-devel Boost-devel readline-develsudo yum remove readline-devel----sudo yum install pcre-devel*x86* / / install 64-bit development package sudo yum install boost-devel*x86*sudo yum install ncurses-devel*x86* pcre-devel*x86* boost-devel*x86* readline-devel*x86*sudo yum install readline-devel*x86*- -sudo ldconfig- IV: Boost installation and download boost_1_48_0.tar.gz source package tar zxvf boost_1_48_ 0.tar.gzcd boost_1_48_0/./bootstrap.sh generates a b2 compilation file in the current directory Then the successful compilation of. / b2 will appear as follows: the boost C++ Libraries were successfull builtthe following directory should be added to compiler include paths:.the following directory should be added to linker library paths:sudo cp-R boost/ / usr/include-be sure to copy it-copy and paste it during installation Avoid mistakes! Sudo cp stage/lib/* / usr/lib/sudo ldconfig V: installation of Mongodb tar zxvf mongodb-src-r2.0.5.tar.gzscons-64-- extrapath=/usr-- libpath=/usr/lib64-- full-- release-- static allscons-- prefix=/opt/mongodb-- 64-- extrapath=/usr-- libpath=/usr/lib64-- full-- release-- static installmkdir / opt/mongodb/ {etc,log,repair Data} cd / opt/mongodb/etc/ VI: Mongodb configuration file dbpath = / opt/mongodb/data#repairpath = / opt/mongodb/repair use logpath = / opt/mongodb/log/mongodb.logpidfilepath = / opt/mongodb/log/mongodb.pidunixSocketPrefix = / opt/mongodb/logdirectoryperdb = trueauth = true#sysinfo = true#verbose = truelogappend = true#Network and security setnoauth = trueport = 33111maxConns = 1024fork = true#Management#nohttpinterface = truerest = truequota = truequotaFiles = 1024nssize = 16#syncdelay = 5 only if there is a problem with the Mongodb database
Finally: service mongod start starts the mongod service
Netstat view 7: configure Mongodb to launch vim / etc/init.d/mongodchmod Ubunx / etc/init.d/mongodchkconfig-- mongodb startup script is attached to add mongod: #! / bin/bash#&Author:gaohaicang & # Company: dzh & # Date:2013-1-15 & # Version:1 & # & & # description: mongodb server SysV script. / etc/rc.d/init.d/functions# Source networking configuration.. / etc/sysconfig/network#Set PATH ENVPATH=$PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin#Set mongodmongod=/opt/mongodb/bin/mongodprog=mongodlockfile=/opt/mongodb/data/db/mongod.lockpidfile=/opt/mongodb/log/mongodb.pid# config: / opt/mongod/etc/mongodRETVAL=0OPTIONS= "- fork-- logpath=/opt/mongodb/log/mongod.log-- config/ opt/mongodb/etc/mongodb" start () {echo- N $"Starting $prog:" daemon $mongod $OPTIONSdaemon $mongdRETVAL=$?echo [$RETVAL= 0] return $RETVAL} stop () {MONGOPID= `cat "$pidfile" 2 > / dev/null `if [- n "$MONGOPID"] Then/bin/kill "$MONGOPID" > / dev/null 2 > & 1ret=$?if [$ret-eq 0]; thenSTOPTIMEOUT=60 while [$STOPTIMEOUT-gt 0]; do/bin/kill-0 "$MONGOPID" > / dev/null 2 > & 1 | | breaksleep 1let STOPTIMEOUT=$ {STOPTIMEOUT}-1doneif [$STOPTIMEOUT-eq 0] Thenecho "Timeout error occurred trying to stop Mongod Daemon." ret=1 action $"Stopping $prog:" / bin/falseelserm-f / opt/mongod/data/mongod.lockaction $"Stopping $prog:" / bin/truefielseaction $"Stopping $prog:" / bin/falsefielseret=1 action $"Stopping $prog:" / bin/falsefireturn $ret} status () {echo-n $"$prog status is" netstat-tnlp | grep "$prog" > / dev/nullRETVAL=$?if [$RETVAL-eq 0] Thenecho-e "\ 033 [32m running\ 033 [0m" elseecho-e "\ 033 [31m stop\ 033 [0m" fi} case "$1" instart) start;; stop) stop;; restart) stopstart;; status) status-p {lockfile} $mongodRETVAL=$?;; *) echo $"Usage: $prog {start | stop | restart | status |}" exit 1esac
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.