安装epel源
rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/epel-release-latest-6.noarch.rpm vi /etc/yum.repos.d/epel.repo
编辑https改成http
在更改:
[epel] name=Extra Packages for Enterprise Linux 6 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
在执行:
yum install erlang xsltproc 如果执行错误,哪么需要执行:yum install wxGTK unixODBC tk SDL 这个必须要用系统光盘才可以的
之后下载 Binary包,即可:http://www.rabbitmq.com/download.html
解析文件,之后移到/opt/目录下,即可
设置环境变量(LINUX的二进行包,直接在/opt/rabbitmq/etc/rabbitmq/下建立一个rabbitmq-env.conf):
vi /opt/rabbitmq/etc/rabbitmq/rabbitmq-env.conf RABBITMQ_MNESIA_BASE=/data/rabbitmq/data RABBITMQ_LOG_BASE=/data/rabbitmq/logs
后台启动:
./rabbitmq-server -detached
设置权限:
rabbitmqctl add_user admin abcd1234 rabbitmqctl set_user_tags admin administrator rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
通过 rabbitmqctl add_vhosts命令新建一个virtual host : rabbitmqctl add_vhosts test_host
我们通过 rabbitmqctl list_vhosts命令看看现在系统有几个vhost了。可以看到有两个,一个是系统默认的 ‘/’, 还有一个就是我们新建的 test_host
接着,使用rabbitmq-plugins.bat list查看已安装的插件列表,如上图。
接下来使用 rabbitmq-plugins.bat enable rabbitmq_management 命令开启网页版控制台。
使用上面增加的帐号,密码,进行登陆即可。
变量配置:
参考说明:http://www.rabbitmq.com/relocate.html
Unix Default Locations
In the following table the ${install_prefix} to some paths is indicated. Macports installations use the installation-prefix set when Macports is installed. By default this is /opt/local.
Deb / RPM package installations use an empty ${install_prefix}.
Name | Location |
---|---|
RABBITMQ_BASE | (Not used) |
RABBITMQ_CONFIG_FILE | ${install_prefix}/etc/rabbitmq/rabbitmq |
RABBITMQ_MNESIA_BASE | ${install_prefix}/var/lib/rabbitmq/mnesia |
RABBITMQ_MNESIA_DIR | $RABBITMQ_MNESIA_BASE/$RABBITMQ_NODENAME |
RABBITMQ_LOG_BASE | ${install_prefix}/var/log/rabbitmq |
RABBITMQ_LOGS | $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME.log |
RABBITMQ_SASL_LOGS | $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME-sasl.log |
RABBITMQ_PLUGINS_DIR | $RABBITMQ_HOME/plugins |
RABBITMQ_PLUGINS_EXPAND_DIR | $RABBITMQ_MNESIA_BASE/$RABBITMQ_NODENAME-plugins-expand |
RABBITMQ_ENABLED_PLUGINS_FILE | ${install_prefix}/etc/rabbitmq/enabled_plugins |
RABBITMQ_PID_FILE | $RABBITMQ_MNESIA_DIR.pid |