部署配置

Davinci部署只需要简单的几步配置即可,中间涉及到数据库初始化的问题,也已经给出了命令。不用担心,现在就开始吧。

Server端

  • 上传davinci zip包到系统某个目录下 并解压,例如. /app/davinci。解压之后的目录结构如下图所示:

主要的配置项包括:mysqldb(请确保连接地址的正确性,初始化数据库时也会用到!!!)、httpServer(ps:如需接入ldap或者cache,可继续加入ldap、cache的相关配置)

unzip davinci-assembly_2.11-0.1.0-SNAPSHOT-dist.zip

cd conf

mv application.conf.example application.conf

vim application.conf

数据库配置项

mysqldb {
  profile = "slick.jdbc.MySQLProfile$"
  db {
    url = "jdbc:mysql://localhost:3306/db?useSSL=false"
    user = ""
    password = ""
    profile = com.mysql.jdbc.Driver
    keepAliveConnection = true
    numThreads = 5
  }
}

httpServer配置项

httpServer {
  host = "localhost"
  port = 8080
}

ldap配置项

ldap {
  isEnable = false
  url = ""
  dc = ""
  user = ""
  pwd = ""
  read.timeout = "5000"
  connect {
    timeout = "5000"
    pool = true
  }
}

cache配置项

cache {
isEnable = true
url: "127.0.0.1:6379"
auth:""
expire:300
mode:"stand-alone"
}

配置log的存放位置(可配置为绝对路径)

vi conf/log4j.properties
  • 配置DAVINCI_HOME
vi /etc/profile

export DAVINCI_HOME=/app/davinci

source /etc/profile
  • 上传mysql-connector-java-{version}.jar到 $DAVINCI_HOME/lib

  • 初始化数据库(只在首次启动时需要进行初始化)

cd /app/davinci/bin

vi initdb.sh

修改port、ip、user、password与application.conf里mysqldb的配置一致即可

sh initdb.sh

配置并且初始化完成后就可以启动davinci server了。

results matching ""

    No results matching ""