RocketMQ-console-ng : login settings

RocketMQ-console-ng login settings

Posted by Dongyupu on June 20, 2019

RocketMQ-console-ng login settings

  • RocketMQ-console-ng 开启登录认证需要修改两个地方:

    • rocketmq-externals/rocketmq-console/src/main/resources/application.properties
    #Must create userInfo file: ${rocketmq.config.dataPath}/users.properties if the login is required
    rocketmq.config.loginRequired=true
    
    • rocketmq-externals/rocketmq-console/src/main/resources/users.properties
    # This file supports hot change, any change will be auto-reloaded without Console restarting.
    # Format: a user per line, username=password[,N] #N is optional, 0 (Normal User); 1 (Admin)
    
    # Define Admin
    admin=password,1
    
    # Define Users
    user1=user1password
    user2=user2password
    
    • 重新编译生产docker镜像部署即可
    mvn clean package -Dmaven.test.skip=true docker:build