安装依赖环境
首先要安装RabbitMQ,需要安装ncurses-devel和erlang
[email protected]:~# cd /data/soft/
[email protected]:~#wget ftp://ftp.invisible-island.net/ncurses/ncurses.tar.gz
[email protected]:~#wget http://erlang.org/download/otp_src_22.0.tar.gz #下载很慢 我这里存放到我的网盘下面了
安装ncuress-devel
[email protected]:/data/soft# tar xf ncurses.tar.gz
[email protected]:/data/soft# cd ncurses-6.1/
[email protected]:/data/soft/ncurses-6.1# ./configure --with-shared --without-ada --enable-overwrite
[email protected]:/data/soft/ncurses-6.1# make -j4&& make install
安装erlang
注意版本一定要对应,否则会报错
我这里下载存放到我的网盘:链接: https://pan.baidu.com/s/15xUWT6eZlWdfNVHs8HkSng 提取码: nizt
.
[email protected]:/data/soft#tar xf otp_src_22.0.tar.gz
[email protected]:/data/soft/ncurses-6.1# cd ../otp_src_22.0/
[email protected]:/data/soft/otp_src_22.0#./configure --prefix=/usr/local/erlang --without-javac
[email protected]:/data/soft/otp_src_22.0# make -j4&& make install
.
出现上面的图示 代表configure完毕
[email protected]:/data/soft/otp_src_22.0# cd /usr/local/erlang/
[email protected]:/usr/local/erlang# ls bin/
ct_run dialyzer epmd erl erlc escript run_erl to_erl typer
[email protected]:/usr/local/erlang#
设置环境变量
export PAYTH=/usr/local/erlang/bin:/usr/local/rabbitmq/sbin:$PAT
安装rabbitMQ
[email protected]:/data/soft# wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.15/rabbitmq-server-generic-unix-3.7.15.tar.xz
[email protected]:/data/soft# tar xf rabbitmq-server-generic-unix-3.7.15.tar.xz
[email protected]:/data/soft# mv rabbitmq_server-3.7.15/ /usr/local/rabbitmq
加载环境变量
[email protected]:/data/soft# source /etc/profile
安装web插件和启动rabbitMQ
[email protected]:/data/soft# cd /usr/local/rabbitmq/sbin/
[email protected]:/usr/local/rabbitmq/sbin#./rabbitmq-plugins enable rabbitmq_management
启动rabbitMQ
[email protected]:/usr/local/rabbitmq# ./sbin/rabbitmq-server -detached
查看启动端口
web:15672
rabbitMQ: 5672
登录web
(如果是在其他机器上(不是本机)输入ip:15672访问到Rabbit登录管理界面的不能用guest登录,只能新添加一个用户登录)
./rabbitmqctl add_user admin admin12300.
./rabbitmqctl set_user_tags admin administrator
设置参数
[email protected]:/usr/local/rabbitmq# vim sbin/rabbitmq-server
原文地址:https://blog.51cto.com/9025736/2411183
时间: 2024-10-09 14:40:11