RabbitMQ 部署
作者:互联网
一、 安装依赖
yum install -y gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel git
二、 安装erlang
wget http://erlang.org/download/otp_src_22.1.tar.gz tar -zvxf otp_src_22.1.tar.gz cd otp_src_22.1 ./otp_build autoconf ./configure && make -j4 && sudo make install
验证:erl -version
三、 安装rabbitmq
wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.8.0/rabbitmq-server-generic-unix-3.8.0.tar.xz xz -d rabbitmq-server-generic-unix-3.8.0.tar.xz tar -xvf rabbitmq-server-generic-unix-3.8.0.tar mv rabbitmq_server-3.8.0 /usr/local/rabbitmq-server echo "export PATH=$PATH:/usr/local/lib/erlang/bin:/usr/local/rabbitmq-server/sbin" >> /etc/profile source /etc/profile
四、 启动 rabbitmq
rabbitmq-plugins enable rabbitmq_management rabbitmq-server 或 rabbitmq-server -detached(后台运行) rabbitmqctl shutdown(停止)
五、 添加用户
rabbitmqctl add_user admin admin rabbitmqctl set_user_tags admin administrator
六、 后台页面访问
七、 配置systemd
cat > /usr/lib/systemd/system/rabbitmq-server.service << EOF [Unit] Description=RabbitMQ broker After=syslog.target network.target [Service] User=root Group=root ExecStart=/usr/local/rabbitmq-server/sbin/rabbitmq-server ExecStop=/usr/local/rabbitmq-server/sbin/rabbitmqctl shutdown [Install] WantedBy=multi-user.target EOF
标签:tar,部署,rabbitmq,server,RabbitMQ,otp,devel,3.8 来源: https://www.cnblogs.com/Jupiter-blog/p/16241724.html