centos7使用yum 安装rabbitmq
安装wxWidgets环境
由于rabbitmq是erlang语言编写的,安装rabbitmq之前,需要先安装erlang,安装erlang之前需要安装wxWidgets,安装wxWidgets之前需要安装gtk2-devel与binutils-devel,废话不多说赶紧开始吧。
首先我们先更新系统
yum update
安装依赖
yum -y install gtk2-devel binutils-devel
yum install wxWidgets-devel
yum install wxBase
yum install fop.noarch
创建软连接
cd /usr/bin
ln -s wx-config-3.0 wx-config
安装成功,执行如下命令
wx-config
显示如下,则表示成功
wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--release] [--version-full]
[--list] [--selected-config] [--host=HOST] [--toolkit=TOOLKIT]
[--universal[=yes|no]] [--unicode[=yes|no]] [--static[=yes|no]]
[--debug[=yes|no]] [--version[=VERSION]] [--basename] [--cc] [--cxx]
[--cppflags [base]] [--cxxflags [base]] [--cflags]
[--rescomp] [--linkdeps] [--ld] [--utility=UTIL]
[--libs [LIBS...]] [--optional-libs [LIBS...]]
wx-config returns information about the wxWidgets libraries available on
your system. It may be used to retrieve the information required to build
applications using these libraries using --cppflags, --cxxflags, --cflags,
and --libs options. And you may query the properties of this configuration
using --query-{host,toolkit,widgetset,chartype,debugtype,version,linkage}.
NOTE: Usage of --debug and --query-debugtype are only relevant if you
have any versions prior to 2.9 installed and use the --version option to
select an earlier version.
If multiple builds of wxWidgets are available, you can use the options
--prefix, --host, --toolkit, --unicode, --static, --universal or --version
to select from them. The --selected-config option shows the name of the
current configuration and --list shows available alternatives which match
specified criteria. The --utility option returns the correct version of
UTIL to use with the selected build. The --linkdeps option returns only
static libraries for your makefile link rule dependencies.
The LIBS arguments (comma or space separated) may be used to specify the
wxWidgets libraries that you wish to use. The "std" label may be used to
import all libraries that would be used by default if none were specified
explicitly, e.g. wx-config --libs core,base. The "all" label may be used
to import all libraries that have been compiled which are shown in the
list below. The --optional-libs parameter should be followed by a list
of libs that should be linked to, but only if they are available.
Available libraries in this build are:
xrc webview stc richtext ribbon propgrid aui gl html qa adv core xml net base
开始安装 erlang相关依赖项
yum install -y make gcc gcc-c++ m4 openssl openssl-devel ncurses-devel unixODBC unixODBC-devel java java-devel
yum install -y epel-release
yum install erlang.x86_64 -y
安装erlang一定要跟后面的rabbit版本相对应,不然启动不了
由于Rabbit-3.8.2版本只支持erlang版本【21.3至22.x】,而yum源只有3.3版本的,所以我们下载erlang/otp-22.2压缩包,然后再说明一点,erlang下载地址太难找了,我找了一个小时,这里将附上erlang下载地址
wget http://erlang.org/download/otp_src_22.0.tar.gz
tar -xvf otp_src_22.2.tar.gz -C /opt
cd /opt/otp_src_22.2/
/opt/otp_src_22.2/configure --prefix=/usr/local/erlang
make && make install
vim /etc/profile
保存内容到profile
export ERLPATH=/usr/local/erlang
export PATH=$ERLPATH/bin:$PATH
source /etc/profile
ps:安装erlang,安装过程比较漫长请耐心等待
安装rabbitmq
rpm -ivh rabbitmq-server-3.6.8-1.el6.noarch.rpm
启动rabbitmq
systemctl start rabbitmq-server