安装Rabbitmq脚本
安装RabbitMQ时需要先安装erlang插件
[root@ZHONG-LONG javascripts]# vim 02-erlang.sh #!/bin/sh ######安装erl插件 PRO=/etc/profile yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel mkdir -p /data/local/erlang cd /usr/src/project tar zxvf otp_src_18.2.1.tar.gz cd otp_src_18.2.1 ./configure --prefix=/data/local/erlang --with-ssl --enable-threads --enable-smmp-support --enable-kernel-poll --enable-hipe --without-javac make && make install cat >> $PRO << 'EOF' ERLANG_HOME=/data/local/erlang PATH=$ERLANG_HOME/bin:$PATH export ERLANG_HOME PATH EOF source $PRO
跑完以上脚本后还得source /etc/profile,使环境变量生效,后续待完善,看如何加脚本里面去
做完上面的后再安装RabbitMQ
[root@ZHONG-LONG javascripts]# vim 03-rabbitmq.sh #!/bin/bash #####安装rabbitmq,并启动 cd /usr/src/project tar xvf rabbitmq-server-generic-unix-3.6.11.tar -C /data/local/ cd /data/local/ mv rabbitmq_server-3.6.11 /data/local/rabbitmq-3.6.11 echo "export PATH=$PATH:/data/local/rabbitmq-3.6.16/sbin" >> /etc/profile source /etc/profile rabbitmq-plugins enable rabbitmq_management rabbitmq-server -detached rabbitmqctl add_user admin admin rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*" rabbitmqctl set_user_tags admin administrator rabbitmqctl cluster_status
***************安静学习,屌丝逆袭***************