更新源
yum install wget -y
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum makecache
安装包
yum install gcc make gcc-c++ xmlto zip unzip ncurses-devel openssl-devel -y
安装python-simplejson & git
yum install python-simplejson -y
yum install git-core -y
安装Erlang
-
下载
www.erlang.org wget http://www.erlang.org/download/otp_src_17.4.tar.gz
-
编译安装
tar zxvf otp_src_17.4.tar.gz cd otp_src_17.4 ./configure make -j 4 make install
安装RabbitMQ
-
下载
www.rabbitmq.com wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.2/rabbitmq-server-3.4.2.tar.gz
-
编译安装
tar zxvf rabbitmq-server-3.4.2.tar.gz cd rabbitmq-server-3.4.2 make TARGET_DIR=/opt/rabbitmq SBIN_DIR=/opt/rabbitmq/sbin MAN_DIR=/opt/rabbitmq/man DOC_INSTALL_DIR=/opt/rabbitmq/doc install
-
建立软链接
ln -s /opt/rabbitmq/sbin/rabbitmq-server /usr/bin/rabbitmq-server ln -s /opt/rabbitmq/sbin/rabbitmq-env /usr/bin/rabbitmq-env ln -s /opt/rabbitmq/sbin/rabbitmq-plugins /usr/bin/rabbitmq-plugins ln -s /opt/rabbitmq/sbin/rabbitmqctl /usr/bin/rabbitmqctl
启用 rabbitmq_management
mkdir -p /etc/rabbitmq
rabbitmq-plugins enable rabbitmq_management
启动
rabbitmq-server -detached
查看安装的插件
rabbitmq-plugins list
停止
rabbitmqctl stop
开放端口
iptables -I INPUT -p tcp --dport 5672 -j ACCEPT
iptables -I INPUT -p tcp --dport 5672 -j ACCEPT
增加用户及加入administrator
rabbitmqctl add_user nate 123123
rabbitmqctl set_user_tags nate administrator
删除用户
rabbitmqctl delete_user guest
修改密码
rabbitmqctl change_password nate 123123
访问管理平台
http://10.211.55.61:15672/