1、从源码安装最新的otperlang17,版本(otp_src_17.1.tar.gz); ./configure make make install
2、有可能要安装 和simplebean
3、下载rabbitmq源码(rabbitmq-server-3.3.5.tar.gz),
make TARGET_DIR=/usr/local/rabbitmq SBIN_DIR=/usr/local//rabbitmq/sbin MAN_DIR=/usr/local//rabbitmq/man DOC_INSTALL_DIR=/usr/local/rabbitmq/man
make install TARGET_DIR=/usr/local/rabbitmq SBIN_DIR=/usr/local/rabbitmq/sbin MAN_DIR=/usr/local/rabbitmq/man DOC_INSTALL_DIR=/usr/local/rabbitmq/man
4、配置mq
建立目录:/etc/rabbitmq
5、启动
/usr/local/rabbitmq/sbin
./rabbitmq-server -detached
./rabbitmqctl stop
6、配置web监控
rabbitmq-plugins enable rabbitmq_management
然后重启rabbitmq
rabbitmq-plugins enable rabbitmq_shovel
rabbitmq-plugins enable rabbitmq_shovel_management
7、修改rabbitmq使用的内存
0.4意思是:使用物理内存的40%,达到后不再接收生产者发布消息
./rabbitmqctl set_vm_memory_high_watermark 0.8
8、rabbitmq可接收的连接数,取决于进程可打开的句柄数
9、大量连接下,erl报错
解决:
2)a configuration file:defines [server component(RabbitMQ core application, Erlang services and RabbitMQ plugins)] settings for permissions, limits and clusters, and also plugin settings. 标准的erlang配置文件,例子:
[
{mnesia, [{dump_log_write_threshold, 500000}]},
{rabbit, [{tcp_listeners, [5673]}]}
].
export RABBITMQ_SERVER_ERL_ARGS="+K true +A30 +P 2048576 -kernel inet_default_connect_options [{nodelay,true}]"