centos中rabbitmq 安装配置步骤

作者:袖梨 2022-06-30

1// 安装预环境
2  yum install gcc gcc-c++
3  yum install zlib zlin-devel
01  // 替换系统默认python2.6-->2.7
02  下载并解压:http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
03  cd Python-2.7.6
04  // 配置安装目录
05  ./configure --prefix=/usr/local/python27
06  // 编译&&安装
07  make && make install
08  // 废弃旧python
09  mv /usr/bin/python /usr/bin/python2.6.6.old
10  // 建立新版本python链接
11  ln -s /usr/local/python27/bin/python /usr/bin/python
12  // 于是现在python -V:
13  Python 2.7.6
14  // 修改yum脚本的声明头: /usr/bin/yum
15  /usr/bin/python ----> /usr/bin/python2.6
01  // Erlang 安装
02  yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel
03  
04  // 下载Erlang:http://www.erlang.org/download/otp_src_R16B02.tar.gz,解压
05  // 配置安装
06   ./configure --prefix=/usr/local/erlang --with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll --enable-hipe --without-javac
07  // 编译安装
08  make && make install
09  // 配置环境变量, vim /etc/profile, 添加:
10  ERLANG_HOME=/usr/local/erlang
11  PATH=$ERLANG_HOME/bin:$PATH
12  export ERLANG_HOME
13  export PATH
14  source /etc/profile
15  输入命令erl检验是否安装成功
1  // rabbitmq-server安装:
2  // 依赖包xmlto
3  yum install xmlto
4  // 下载,解压之
5  http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5.tar.gz
6  // 编译
7  make
8  // 安装
9  make install TARGET_DIR=/opt/rabbitmq SBIN_DIR=/opt/rabbitmq/sbin MAN_DIR=/opt/rabbitmq/man
01  安装web插件管理界面                                                                       mkdir /etc/rabbitmq
02  rabbitmq-plugins enable rabbitmq_management
03  The following plugins have been enabled:
04    mochiweb
05    webmachine
06    rabbitmq_web_dispatch
07    amqp_client
08    rabbitmq_management_agent
09    rabbitmq_management
10  Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
11  [root@rabbitmqmaster sbin]# ls /etc/rabbitmq
12  enabled_plugins
1  // 启动rabbitmq
2  rabbitmq-server start
3  // 有可能报主机名找不到的错误,
4  vim /etc/hosts
5  127.0.0.1 localhost ${hostName}
1  guest/guest 登录localhost:15672

启用 rabbitmq 后台管理

1.首先要确认 rabbitmq-server 是没有运行的

停止 rabbitmq-server 服务的命令

sudo service rabbitmq-server stop

2.把后台的管理插件打开

sudo rabbitmq-plugins enable rabbitmq_management    
  
3.启动 server

rabbitmq-server

4.在浏览器打开网址 http://127.0.0.1:15672

默认用户名: guest

默认密码: guest

相关文章

精彩推荐