一、建立目錄並解壓java
mkdir -p /root/app/davincimysql
unzip /tmp/davinci-assembly_3.0.1-0.3.1-SNAPSHOT-dist-beta.9.zip -d /root/app/davinci/sql
二、配置環境變量數據庫
vi /etc/profilebash
#DAVINCI3_HOMEapp
export DAVINCI3_HOME=/root/app/davinci/ide
export PATH=$PATH:$DAVINCI3_HOME/binoop
vi ~/.bash_profileui
#DAVINCI3_HOMEurl
export DAVINCI3_HOME=/root/app/davinci/
export PATH=$PATH:$DAVINCI3_HOME/bin
source /etc/profile
source ~/.bash_profile
三、初始化數據庫
mysql -P 3306 -h localhost -u root -p000000 davinci3 < $DAVINCI3_HOME/bin/davinci.sql
四、修改davinci配置文件(yml要求,每一項配置:後,要有1個空格)
cd $DAVINCI3_HOME/config
mv application.yml.example application.yml
vi application.yml
注意:庫名是davinci3
案例中我使用的是163的郵箱,其實Davinci支持的郵箱特別多,把官方支持的我全粘出來
五、開啓davinci服務
sh $DAVINCI3_HOME/bin/start-server.sh
能夠按組合鍵 Ctrl+C退出刷屏。在後臺查看日誌
六、查看啓動日誌
cd $DAVINCI3_HOME/logs/sys
tail -f -n 100 davinci.2020-01-19.log
七、登陸查看頁面
輸入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以上的版本。