rabbitmqctl: command not found

rabbitmqctl: command not found

需要进入到rabbitmqctl的sbin目录下执行rabbitmqctl命令才有用。如下所示:

rabbitmqctl: command not found

 

so, 我们可以建立一个软连接,方便我们随时随地直接使用

命令如下:

Step1、建立软链接,命令如下

cd /usr/local/bin

ln -s /apprun/rabbitmq/sbin/rabbitmqctl rabbitmqctl

rabbitmqctl: command not found

----------------  我是愉快的分割线  -----------------------------------------

test一把

发现还是不行,它在当前路径/usr/local/bin下面找了

rabbitmqctl: command not found

---------------  我是愉快的分割线 -----------------------------------------

Step 2:修改/etc/profile, 在最后添加:

PATH=/apprun/rabbitmq/sbin:$PATH
export PATH

vi /etc/profile  添加配置,然后保存即可

 

Step 3: 执行命令

source /etc/profile