1、创建目录并解压
mkdir -p /root/app/davinci
unzip /tmp/davinci-assembly_3.0.1-0.3.1-SNAPSHOT-dist-beta.9.zip -d /root/app/davinci/
2、配置环境变量
vi /etc/profile
#DAVINCI3_HOME
export DAVINCI3_HOME=/root/app/davinci/
export PATH=$PATH:$DAVINCI3_HOME/bin
vi ~/.bash_profile
#DAVINCI3_HOME
export DAVINCI3_HOME=/root/app/davinci/
export PATH=$PATH:$DAVINCI3_HOME/bin
source /etc/profile
source ~/.bash_profile
3、初始化数据库
mysql -P 3306 -h localhost -u root -p000000 davinci3 < $DAVINCI3_HOME/bin/davinci.sql
4、修改davinci配置文件(yml要求,每一项配置:后,要有1个空格)
cd $DAVINCI3_HOME/config
mv application.yml.example application.yml
vi application.yml
注意:库名是davinci3
案例中我使用的是163的邮箱,其实Davinci支持的邮箱特别多,把官方支持的我全粘出来
5、开启davinci服务
sh $DAVINCI3_HOME/bin/start-server.sh
可以按组合键 Ctrl+C退出刷屏。在后台查看日志
6、查看启动日志
cd $DAVINCI3_HOME/logs/sys
tail -f -n 100 davinci.2020-01-19.log
7、登录查看页面
输入http://192.168.8.102:8080
看到这个页面,恭喜你成功安装了Davinci。
附上常见错误:
错误提示1:
2020-01-19 17:05:47.263 ERROR 27680 --- [Druid-ConnectionPool-Create-1373254373] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: jdbc:mysql://localhost:3306/davinci3?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true, errorCode 1045, state 28000
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1714)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2190)
解决方法:看着好像是 权限访问不够、或者密码错误。其实是yml配置文件中,把用户和密码用 " "括起来即可
错误提示2:
2020-01-19 17:
[root@hadoop102 config]# sh $DAVINCI3_HOME/bin/start-server.sh
==========================================
Starting..., press `CRTL + C` to exit log
==========================================
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
解决方法:JDK版本太低了,没有安装1.8及1.8以上的版本。