centos6安装rabbitmq集群

1、下载源码

openssl

https://www.openssl.org/source/openssl-1.0.1f.tar.gz

 

erlang

http://erlang.org/download/otp_src_R16B03.tar.gz

 

rabbitmq

http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-generic-unix-3.6.6.tar.xz

 

2、编译安装

openssl:

# tar zxvf openssl-1.0.1f.tar.gz

# cd openssl-1.0.1f

# ./config --prefix=/usr/local/ssl

# vim Makefile

注释 CC= gcc 下面的一行 CFLAG= -fPIC -DOPENSSL_THREADS .....

添加下面一行

CFLAG= -fPIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM

# make && make install

 

erlang:

# tar -xf otp_src_R16B03.tar.gz 

# cd otp_src_R16B03

# make clean

# rm -rf /usr/local/erlang

# ./configure --with-ssl=/usr/local/ssl --prefix=/usr/local/erlang

# make && make install

 

rabbitmq:

# tar xf rabbitmq-server-generic-unix-3.6.6.tar.xz 

# mv rabbitmq_server-3.6.6 /usr/local/rabbitmq

 

# vi /etc/profile

export ERLANG_HOME=/usr/local/erlang

export RABBITMQ_HOME=/usr/local/rabbitmq

export PATH=$ERLANG_HOME/bin:$RABBITMQ_HOME/sbin:$PATH

 

# source /etc/profile

 

3、启动服务

查看erlang版本

# erl

Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

 

Eshell V5.10.4  (abort with ^G)

1> 

 

启动rabbitmq

# rabbitmq-server -detached

 

查看rabbitmq服务

# ps -ef | grep rabbitmq

 

创建集群可以参考我之前写的日志做,步骤是一样的

 

4、注意事项

如果不编译erlang,可能会出现erlang版本低的错误

 

如果不编译openssl,可能会出现openssl不兼容的报错。情如下所示:

=ERROR REPORT==== 26-Feb-2019::17:06:11 ===

Unable to load crypto library. Failed with error:

"load_failed, Failed to load NIF library: '/usr/local/erlang/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so: undefined symbol: EC_GROUP_new_curve_GF2m'"

OpenSSL might not be installed on this system.

 

=WARNING REPORT==== 26-Feb-2019::17:06:11 ===

The on_load function for module crypto returned {error,

                                                 {load_failed,

                                                  "Failed to load NIF library: '/usr/local/erlang/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so: undefined symbol: EC_GROUP_new_curve_GF2m'"}}

你可能感兴趣的:(消息队列)