您的位置:首页 > 其它

源码编译aerospike-server-3.6.4

2015-12-19 21:17 357 查看
生产环境一直使用3.5.3这个版本,和开发商量了一下,在测试环境使用3.6.4搭建集群,如果运行稳定就找机会将生产环境的集群升级。

aerospike QQ群:419183757

从github上下载源码包

wget https://github.com/aerospike/aerospike-server/archive/3.6.4.zip
编译前将依赖包安装全

yum install -y openssl openssl-devel openssl-static lua lua-devel lua-static 

忘记安装依赖包就会提示找不到静态库文件,例如下面就是找不到libcrypto.a这个库文件了

make[1]: Leaving directory `/home/work/src/aerospike-server-3.6.4/modules/common'

make -C /home/work/src/aerospike-server-3.6.4/cf

make[1]: Entering directory `/home/work/src/aerospike-server-3.6.4/cf'

make -C src all

make[2]: Entering directory `/home/work/src/aerospike-server-3.6.4/cf/src'

../../make_in/Makefile.in:73: *** Cannot find "libcrypto.a".  Stop.

make[2]: Leaving directory `/home/work/src/aerospike-server-3.6.4/cf/src'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/work/src/aerospike-server-3.6.4/cf'

make: *** [all] Error 2

tudou http://blog.csdn.net/ylqmf/article/details/50359676

看了下文档如果是下载的zip,则不包含子模块,需要手动下载。

Note: As
this project uses submodules, the source archive downloadable via GitHub's 
Download ZIP
 button
will not build unless the correct revision of each submodule is first manually installed in the appropriate 
modules
 subdirectory.

此时,解压3.6.4.zip,进入modules目录,发现里面的只有子模块目录没有源码,手动将这些源码一一下载。如果你配置了git就简单了一个命令搞定。

$ git submodule update --init


不想在服务器上安装git,所以选择手动下载,逐个解压并覆盖掉原来的目录
https://github.com/aerospike/asmalloc/archive/master.zip https://github.com/aerospike/aerospike-common/archive/master.zip https://github.com/aerospike/jansson/archive/master.zip https://github.com/aerospike/jemalloc/archive/master.zip https://github.com/aerospike/aerospike-lua-core/archive/master.zip https://github.com/aerospike/luajit/archive/master.zip https://github.com/aerospike/aerospike-mod-lua/archive/master.zip
编译

make all

在target目录下就是已经编译好的asd 

再多说两句,编译好后修改配置文件,初始化数据目录

$ make init

最后启动asd,我喜欢在启动服务的时候明确制定配置文件

$ target/Linux-x86_64/bin/asd --config-file as/etc/aerospike_dev.conf
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: