回到主页
回到主页

配置数据库密码

· 厦门艾科思报表平台系统管理
---【Windows】---
  1. 启动命令行执行下列命令:

    C:\Users\Administrator>d:/ireport365/mongodb/bin/mongo

    >use prod_ireport365_enterprise;

    >db.createUser({

    user: "用户名",

    pwd: "密码",

    roles: [

    { role: "readWrite", db: "prod_ireport365_enterprise" }

    ]

    });

    >exit;

  2. 修改配置问题:D:\ireport365\安装服务.bat
    将

    d:\ireport365\mongodb\bin\mongod --dbpath d:\ireport365\mongodb\data --logpath d:\ireport365\mongodb\log\mongodb.log --install --serviceName iReport365Database --serviceDisplayName "iReport365 Database Server"

修改为 (增加 --auth )

d:\ireport365\mongodb\bin\mongod --auth --dbpath d:\ireport365\mongodb\data --logpath d:\ireport365\mongodb\log\mongodb.log --install --serviceName iReport365Database --serviceDisplayName "iReport365 Database Server" 

  • 修改配置文件 D:\ireport365\ireport365.war\WEB-INF\classes\service-core\spring-data-mongodb.xml
    将

    <mongo:mongo-client id="systemMongo" host="127.0.0.1" port="27017">


    修改为: (增加 credentials配置 )

    <mongo:mongo-client id="systemMongo" credentials="用户名:密码@prod_ireport365_enterprise" host="127.0.0.1" port="27017">

  • 运行 D:\ireport365\停止服务
  • 运行 D:\ireport365\启动服务
  • ---【Linux】---
    1. 启动命令行执行下列命令:

      /opt/iReport365/mongodb/bin/mongo

      >use prod_ireport365_enterprise;

      >db.createUser({

      user: "用户名",

      pwd: "密码",

      roles: [

      { role: "readWrite", db: "prod_ireport365_enterprise" }

      ]

      });

      >exit;

    2. 修改配置问题:/opt/iReport365/run.sh
      将

      /opt/iReport365/mongodb/bin/mongod -port 27017 --dbpath /opt/iReport365/mongodb/data/ --logpath /opt/iReport365/mongodb/log/mongodb.log &


      修改为 (增加 --auth )

      /opt/iReport365/mongodb/bin/mongod -port 27017 --auth --dbpath /opt/iReport365/mongodb/data/ --logpath /opt/iReport365/mongodb/log/mongodb.log &

    3. 修改配置文件 /opt/iReport365/ireport365.war/WEB-INF/classes/service-core/spring-data-mongodb.xml
      将

      <mongo:mongo-client id="systemMongo" host="127.0.0.1" port="27017">


      修改为: (增加 credentials配置 )

      <mongo:mongo-client id="systemMongo" credentials="用户名:密码@dev_ireport365_enterprise" host="127.0.0.1" port="27017">

    4. 运行 /opt/iReport365/stop.sh
    5. 运行 /opt/iReport365/run.sh
    上一篇
    部署个性化移动报表App客户端
    下一篇
    重置超级管理员密码
     回到主页
    所有文章
    ×

    还剩一步!

    确认邮件已发至你的邮箱。 请点击邮件中的确认链接,完成订阅。

    好的