mkdir /rabbitmq
cd /rabbitmq
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget
安装erlang 语言环境
wget http://www.erlang.org/download/otp_src_20.3.tar.gz
tar -xzvf otp_src_20.3.tar.gz //解压
cd otp_src_18.3/ //切换到安装路径
./configure --prefix=/usr/local/erlang //生产安装配置
make && make install //编译安装
vi /etc/profile //在底部添加以下内容
#set erlang environment
ERL_HOME=/usr/local/erlang
PATH=$ERL_HOME/bin:$PATH
export ERL_HOME PATH
source /etc/profile //生效
cd /usr/local //切换到计划安装RabbitMQ的目录,我这里放在/usr/local
wget http://www.rabbitmq***/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz //下载RabbitMQ安装包
xz -d rabbitmq-server-generic-unix-3.6.1.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.6.1.tar
mv rabbitmq_server-3.6.1/ rabbitmq
vi /etc/profile
#set rabbitmq environment
export PATH=$PATH:/usr/local/rabbitmq/sbin
source /etc/profile
./configure --with-php-config=/usr/local/php/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c
make -j4
make install
./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config
/usr/local/php/lib/php/extensions/no-debug-non-zts-20180731/
rabbitmq-server start
rabbitmq-server status
参考 https://www.cnblogs.com/fengyumeng/p/11133924.html