启动报错如下
./rabbitmq-server: line 47: erl: command not found
解决方案1 :在rabbitmq-server 中添加erlang的环境变量
# Lazy initialization of threed pool size - if it wasn't set
# explicitly. This parameter is only needed when server is starting,
# so it makes no sense to do this calculations in rabbitmq-env or
# rabbitmq-defaults scripts.
# 在这里添加erlang的环境变量
ERLANG_HOME=/usr/local/erlang23
export PATH=$PATH:$ERLANG_HOME/bin
ensure_thread_pool_size() {
if [ -z "${RABBITMQ_IO_THREAD_POOL_SIZE}" ]; then
RABBITMQ_IO_THREAD_POOL_SIZE=$(
erl
-noinput
-boot "${CLEAN_BOOT_FILE}"
-s rabbit_misc report_default_thread_pool_size
)
fi
}
解决方案2 :在/etc/profile中最后一行添加erlang的环境变量
cd /etc/profile
export PATH=$PATH:/usr/local/erlang23/bin
source /etc/profile
使之生效