标签:plugin lib 创建 后台 ble sbin prefix plain etc
1、安装所有依赖包
yum install -y gcc ncurses ncurses-base ncurses-devel ncurses-libs ncurses-static ncurses-term ocaml-curses ocaml-curses-devel openssl-devel zlib-devel openssl-devel perl xz xmlto kernel-devel m4
2、安装Erlang
tar zxvf otp_src_18.3.tar.gz
cd otp_src_18.3
./configure --prefix=/data/erlang --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac
make && make install
4、安装RabbitMQ
xz -d rabbitmq-server-generic-unix-3.6.2.tar.xz
tar xvf rabbitmq-server-generic-unix-3.6.2.tar
mv rabbitmq_server-3.6.2 rabbitmq
mv rabbitmq /data/
#编辑环境变量
vim /etc/profile
#set erlang environment
export PATH=$PATH:/data/erlang/bin
#set rabbitmq environment
export PATH=$PATH:/data/rabbitmq/sbin
source /etc/profile
#启动rabbitmq服务
/usr/local/rabbitmq/sbin/rabbitmq-server
#后台启动
/usr/local/rabbitmq/sbin/rabbitmq-server -detached
#关闭rabbitmq服务
/usr/local/rabbitmq/sbin/rabbitmqctl stop
或
ps -ef | grep rabbit 和 kill -9 xxx
#开启插件管理页面
/usr/local/rabbitmq/sbin/rabbitmq-plugins enable rabbitmq_management
#创建用户
/usr/local/rabbitmq/sbin/rabbitmqctl add_user rabbitadmin 123456
/usr/local/rabbitmq/sbin/rabbitmqctl set_user_tags rabbitadmin administrator
#WEB登录
http://10.10.3.63:15672
WEB管理界面的默认用户名和密码都是guest,浏览器访问地址:http://host:15672,会要求输入用户名和密码,用默认的guest/guest即可(guest/guest用户只能从localhost地址登录,如果要配置远程登录,必须另创建用户),
添加新用户的方法:
1
2
3
4
5
6
|
$ cd /usr/lib/rabbitmq/bin/ #用户名与密码 $ sudo rabbitmqctl add_user webadmin 123456 #用户设置为administrator才能远程访问 $ sudo rabbitmqctl set_user_tags webadmin administrator $ sudo rabbitmqctl set_permissions -p / webadmin ".*" ".*" ".*" |
标签:plugin lib 创建 后台 ble sbin prefix plain etc
原文地址:http://www.cnblogs.com/liqing1009/p/7976023.html