码迷,mamicode.com
首页 > 其他好文 > 详细

cenos 下手动安装rabbitmq—server

时间:2015-04-09 20:00:02      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:安装rabbitmq   centos安装rabbitmq   rabbitmq   

1、编译环境安装
yum install gcc gcc-c++
yum install zlib zlin-devel


2、python安装


//下载并解压:
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
cd Python-2.7.6
// 配置安装目录
./configure --prefix=/usr/local/python27
// 编译&&安装
make && make install
// 废弃旧python
mv /usr/bin/python /usr/bin/python2.6.6.old 
// 建立新版本python链接
ln -s /usr/local/python27/bin/python /usr/bin/python
// 于是现在python -V:
Python 2.7.6
// 修改yum脚本的声明头: /usr/bin/yum
/usr/bin/python ----> /usr/bin/python2.6




3、 Erlang 安装
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel


// 下载Erlang: 
wget http://www.erlang.org/download/otp_src_R16B02.tar.gz
//解压 
tar zxvf otp_src_R16B02.tar.gz
//进入
cd otp_src_R16B02
// 配置安装
 ./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检验是否安装成功




4、rabbitmq-server安装:
// 依赖包xmlto,如果yum安装失败,可以直接下载源葆编译,这个很简单,这里就不再详细说了
yum install xmlto
// 下载
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.4/rabbitmq-server-3.4.4.tar.gz
//解压
tar -zxvf rabbitmq-server-3.4.4.tar.gz
//进入
 cd rabbitmq-server-3.4.4
// 编译
make
// 安装
make install TARGET_DIR=/opt/rabbitmq SBIN_DIR=/opt/rabbitmq/sbin MAN_DIR=/opt/rabbitmq/man
安装web插件管理界面
//创建进入
mkdir /etc/rabbitmq


//安装插件
rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
  mochiweb
  webmachine
  rabbitmq_web_dispatch
  amqp_client
  rabbitmq_management_agent
  rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
[root@rabbitmqmaster sbin]# ls /etc/rabbitmq
enabled_plugins


// 启动rabbitmq
rabbitmq-server start
// 有可能报主机名找不到的错误,
vim /etc/hosts
127.0.0.1 localhost ${hostName}






配置mq用户
//进入
cd cd /opt/rabbitmq/sbin


//创建用户
./rabbitmqctl add_user mqadmin mqadmin


//添加权限组
./rabbitmqctl set_user_tags mqadmin administrator


//登录web
http://rabbitmq-server:15672/#/

cenos 下手动安装rabbitmq—server

标签:安装rabbitmq   centos安装rabbitmq   rabbitmq   

原文地址:http://blog.csdn.net/totxian/article/details/44962761

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!