回到主页
回到主页

配置数据库密码

· 厦门艾科思报表平台系统管理
---【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客户端
    下一篇
    重置超级管理员密码
     回到主页
    strikingly icon上线了提供技术支持
    Cookie的使用
    我们使用cookie来改善浏览体验、保证安全性和数据收集。一旦点击接受,就表示你接受这些用于广告和分析的cookie。你可以随时更改你的cookie设置。 了解更多
    全部接受
    设置
    全部拒绝
    Cookie设置
    必要的Cookies
    这些cookies支持诸如安全性、网络管理和可访问性等核心功能。这些cookies无法关闭。
    分析性Cookies
    这些cookies帮助我们更好地了解访问者与我们网站的互动情况,并帮助我们发现错误。
    首选项Cookies
    这些cookies允许网站记住你的选择,以提供更好的功能和个性化支持。
    保存