CentOS compilation and installation of MongoDB

Source: Internet
Author: User
The installation error of the local machine has not been solved yet. Hope you can give me some advice. Error 1. sconsall: usrlocal1_depcrecpp. h

The installation error of the local machine has not been solved yet. Hope to give some advice by the passing man. Error 1. the following error is prompted by scons all:/usr/local/include/pcrecpp. h

Preface:
Local Machine installation error alwaysUnsolvedIn the middle of the page, hope that the passing man will give you some advice. The error is as follows:
1. the following error is prompted for scons all:
/Usr/local/include/pcrecpp. h: 493: undefined reference to 'pcrecpp: RE: no_arg '# path of the pcre Library added
/Usr/local/include/boost/thread/tss. hpp: 105: undefined reference to 'boost: detail: set_tss_data (void const *, boost: shared_ptr
2. yum installation is successful, startup reports error (pcretest-C execution has UTF-8 support Unicode properties support ")
[Root @ localhost ~] # Cat/var/log/mongodb. log
/Usr/bin/consumer D: symbol lookup error:/usr/bin/consumer D: undefined symbol: _ ZN7pcrecpp2RE4InitEPKcPKNS_10RE_OptionsE
3. If you want to upgrade boost-devel
Yum install prompts "No package boost-devel available ."

Installation steps:

Install epel
Wget
Rpm-ivh epel-release-5-4.noarch.rpm

Install the pcre Library
Wget
Wget
Tar zxf pcre-8.12.tar.gz
Cd pcre-8.12
./Configure -- enable-utf8 -- enable-unicode-properties
./Configure -- prefix =/usr/local/pcre -- enable-utf8 -- enable-unicode-properties

Make
Make install
Cp/usr/local/pcre/include/*/usr/include/
Echo '/usr/local/pcre/lib'>/etc/ld. so. conf
Ldconfig

Install scons
Wget
Tar zxvf scons-2.1.0.alpha.20101125.tar.gz
Cd scons-2.1.0.alpha.20101125
Python setup. py install

Install dependency Library
Yum install pcre-devel
Yum install scons boost-devel
Yum install libpcre ++-dev libboost-dev

Install js Library
Wget
Tar zxvf js-1.7.0.tar.gz
Cd js/src/
Export CFLAGS = "-DJS_C_STRINGS_ARE_UTF8"
Make-f Makefile. ref
JS_DIST =/usr gmake-f Makefile. ref export

Install mongodb
Wget
Tar zxvf mongodb-src-r1.8.1.tar.gz
Cd mongodb-src-r1.8.1

Vi/etc/ld. so. conf
Echo '/usr/local/pcre/lib'>/etc/ld. so. conf
Ldconfig

Vi/etc/profile
Export LD_LIBRARY_PATH =/usr/local/pcre/lib
Export PATH = "$ PATH:/usr/local/pcre/lib"

Vi SConstruct
Search
"Linux2" = OS. sys. platform
Env. append (LIBPATH = ["/usr/lib64", "/lib64", "/usr/local/pcre/lib"]) # specify the lib of pcre ,, then the error is reported directly by env. append (LIBPATH = ["/usr/local/pcre/lib"])
Env. Append (LIBS = ["pthread"])
Env. Append (LIBS = ["libpcrecpp"]) # specify the pcrecpp library name

Scons all
Scons -- prefix =/usr/local/mongodb -- full install
Mkdir-p/usr/local/mongodb/etc/usr/local/mongodb/data/usr/local/mongodb/log // usr/local/mongodb/repair

Vi/usr/local/mongodb/etc/mongodb. conf

Dbpath =/usr/local/mongodb/data
Logpath =/usr/local/mongodb. log
Repairpath =/usr/local/mongodb/repair
Pidfilepath =/usr/local/mongodb. pid
Directoryperdb = true # A database uses a directory
Logappend = true
Bind_ip = 192.168.1.36
Port = 27017
Auth = true
MaxConns = 1024
Fork = true
Rest = true
Quota = true
QuotaFiles = 1024.
Nssize = 16
Master = true
Slave = true
Source = master.example.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.