EPEL的MongoDB将不会启动对亚马逊EC2 AMI亚马逊、MongoDB、EPEL、AMI

2023-09-11 08:24:51 作者:來去皆江湖

使用亚马逊的Linux AMI 2013年9月2日 - AMI-bba18dd2​​(64位)

Using Amazon Linux AMI 2013.09.2 - ami-bba18dd2 (64-bit)

我希望使用EPEL提供的MongoDB的,因为它是编译SSL支持。

I want to use the mongodb provided by EPEL because it is compiled with SSL support.

[root@domU-12-31-39-02-19-B8 ec2-user]# yum install mongodb-server
Installed:
  mongodb-server.x86_64 0:2.4.6-1.el6                                           

Dependency Installed:
<snip>
Complete!

现在看来似乎没有错误安装。

It seems like it installs with no errors.

当我启动mongod的,我得到的是这种神秘的错误。

When I start the mongod, all I get is this cryptic error.

[root@domU-12-31-39-02-19-B8 ec2-user]# mongod
mongod --help for help and startup options
mongod: symbol lookup error: mongod: undefined symbol: _ZN7pcrecpp2RE4InitEPKcPKNS_10RE_OptionsE

我看到的唯一的方向是直接从MongoDB中下载的二进制文件。同样,我将preFER的EPEL版本,因为它包含SSL支持

The only direction I see is to download the binaries directly from mongodb. Again, I would prefer the EPEL version because it contains ssl support

http://askubuntu.com/questions/180319/mongod-fails-to-start-with-error-mongod-symbol-lookup-error-mongod-undefined

有没有办法让EPEL版本一起工作?

Is there a way to get the EPEL version to work?

推荐答案

最大的一点是,我想启用SSL选项。我找不到任何简单的答案,所以我希望这可以帮助其他人冒险沿着这条道路。

The biggest point was that I wanted the SSL option enabled. I couldn't find any simple answers, so I hope this helps anyone else venturing down this road.

从EPEL版本启用是建立与PCRE-devel软件包亚马逊的AMI从amzn1 Linux的回购获得的不兼容版本的选项。

The version from EPEL with the option enabled is built with an incompatible version of pcre-devel the Amazon AMI gets from the amzn1 linux repo.

我只是重建从EPEL源RPM MongoDB的二进制文件,并安装所产生的转速和正常工作。

I simply rebuilt the mongodb binary from the EPEL source RPM and the resulting RPM installed and worked fine.

只好拉下其它软件包做到这一点。

Had to pull down other packages to do it.

yum install rpm-build redhat-rpm-config gcc  gcc-c++ make yum install openssl-devel snappy-devel v8-devel boost-devel python-devel python-nose scons pcre-devel readline-devel libpcap-devel gperftools-devel –y

rpmbuild --rebuild mongodb-2.4.6-1.el6.src.rpm
rpmbuild --rebuild python-pymongo-2.5.2-3.el6.src.rpm 
rpmbuild --rebuild v8-3.14.5.10-3.el6.src.rpm 

该包为别人谁与这一点,并留在AGPL许可证一致的斗争公开发布。

The packages are posted publicly for anyone else who struggles with this and to stay consistent with the AGPL license.

花了将近45分钟,它重建,所以我提出了一个小的回购协议,这样我就不必重建每一个新的实例,以及一些说明,如果其他人想使用它的任何。

It took almost 45 minutes for it to rebuild, so I put up a small repo so that I don't have to rebuild every new instance as well as some instructions if others want to use any of it.

说明: http://mongodb.ssl.amzn1.bauman.in

wget http://mongodb.ssl.amzn1.bauman.in/mongodb.ssl.amzn1.bauman.in.repo
sudo mv mongodb.ssl.amzn1.bauman.in.repo /etc/yum.repos.d/mongodb.ssl.amzn1.bauman.in.repo
sudo yum install mongodb-server mongodb python-pymongo python-pymongo-gridfs -y

回购文件: HTTP://mongodb.ssl .amzn1.bauman.in / mongodb.ssl.amzn1.bauman.in.repo