linux下rabbitmq-server的基本操作命令

基础操作:

停止所有rabbitmq应用
    sudo rabbitmqctl stop_app
启动所有rabbitmq应用
    sudo rabbitmqctl start_app

用户:

添加用户
    sudo rabbitmqctl add_user {username} {password}

删除用户
    sudo rabbitmqctl delete_user {username}

更改密码
    sudo rabbitmqctl change_password {username} {new_password}

验证用户
    sudo rabbitmqctl authenticate_user {username} {password}

查看用户
    sudo rabbitmqctl list_users

访问:

创建vhost
    sudo rabbitmqctl add_vhost {vhost_name}

删除vhost
    sudo rabbitmqctl delete_vhost {vhost_name}

查看所有vhost
    sudo rabbitmqctl list_vhosts name tracing

为用户提供访问vhost的权限
    sudo rabbitmqctl set_permissions -p {vhost_name} {username} ".*" ".*" ".*"

查看某个vhost提供的权限
    sudo rabbitmqctl list_permissions -p {vhost_name}

你可能感兴趣的:(rabbitmq)