1. ErLang运行环境安装

//安装预环境

yum install gcc gcc-c++

yum install zlib zlin-devel

// Erlang安装

yum -y install make gcc gcc-c++ kernel-devel m4ncurses-devel openssl-devel

//下载Erlang:http://www.erlang.org/download/otp_src_R16B02.tar.gz,解压

//配置安装

cd otp_src_19.1

cd..

mv ./otp_src_19.1 ./_erlang

chmod a+xrw -R .

cd _erlang

./configure –prefix=/usr/local/erlang –with-ssl-enable-threads -enable-smmp-support -enable-kernel-poll –enable-hipe –without-javac

//编译安装

make && make install

//配置环境变量,vim /etc/profile,添加:

ERLANG_HOME=/usr/local/erlang

PATH=ERLANG_HOME/bin:PATH

export ERLANG_HOME

export PATH

source /etc/profile

输入命令erl检验是否安装成功

2. RabbitMQ安装

// rabbitmq-server安装:

yum install xmlto     #依赖包xmlto

//解压离线文件并复制文件到相应位置

mv rabbitmq_server-3.6.5 /usr/local/rabbitmq

cd /usr/local/rabbitmq/

cd sbin/

chmod a+x *

./rabbitmq-plugins enable rabbitmq_management

./rabbitmq-plugins enabled_plugins

./rabbitmq-server start &

//有可能报主机名找不到的错误,

vim /etc/hosts

127.0.0.1 localhost ${hostName}

例如:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

127.0.0.1  localhost bogon

如果出现:

RabbitMQ 3.6.5. Copyright (C) 2007-2016 Pivotal Software,Inc.

####Licensed under the MPL.Seehttp://www.rabbitmq.com/

####

##########Logs:/usr/local/rabbitmq/var/log/rabbitmq/rabbit@localhost.log

########/usr/local/rabbitmq/var/log/rabbitmq/rabbit@localhost-sasl.log

##########

Startingbroker…

completed with 6plugins.

使用浏览器登录http://localhost:15672

常见错误处理:

1. No curses library functions found

        yum install ncurses-devel

2. odbc : ODBC library – link check failed

        yum installunixODBC unixODBC-devel

3. wx : wxWidgets not found, wx will NOT be usable

  1. 安装依赖库

        yum -y install gtk2-devel binutils-devel  

  1. 下载 wxWidgets-3.1.0.tar.bz2 并解压之,然后编译与安装

        cd wxWidgets-3.1.0

        make 

        make install

3. 设置其动态库目录

        cd /etc/ld.so.conf.d/

        sudo touch wxWidgets.conf

        sudo gedit wxWidgets.conf   #增加其内容为/usr/local/lib

  1. 重新加载动态库配置信息

        sudo ldconfig

文章来源于互联网,如有雷同请联系站长删除:CentOS 安装 RabbitMQ

发表评论