In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Davinci can be used independently as a public / private cloud or integrated into a three-party system as a visual plug-in. Users can serve a variety of data visualization applications by simply configuring on the visual UI, and support visualization functions such as advanced interaction / industry analysis / pattern exploration / social intelligence.
Environment preparation JDK 1.8 (or later) MySql5.5 (or later) Mail ServerPhantomJs (installation please refer to: phantomjs.org) Redis (optional) 2. Configuration and deployment
1) initialize the directory, and extract the downloaded Davinci package (Release package, not Source package) to a system directory, such as ~ / app/davinci
Cd ~ / app/davinciunzip davinci-assembly_3.0.1-0.3.0-SNAPSHOT-dist.zip
The decompressed directory structure is shown in the following figure:
2) configure the environment variable, and configure the extracted directory to the environment variable DAVINCI3_HOME
Export DAVINCI3_HOME=~/app/davinci/davinci-assembly_3.0.1-0.3.0-SNAPSHOT-dist
3) initialize the database, and change the database information you want in initdb.sh under the bin directory to the database to be initialized, such as davinci0.3
Mysql-P 3306-h localhost-u root-proot davinci0.3 < $DAVINCI3_HOME/bin/davinci.sql
Run the script to initialize the database (note: because the Davinci0.3 system database contains stored procedures, be sure to give execute permission when creating the database). **
Sh bin/initdb.sh
4) initialize the configuration. The configuration of Davinci0.3 mainly includes server, datasource, mail, phantomjs, cache and other configurations.
Enter the config directory, rename application.yml.example to application.yml and start the configuration.
Cd configmv application.yml.example application.yml
Note: since version 0.3 uses ymal as the application profile format, make sure that there is at least one space between the colon and the value after each configuration key
Server configuration
Server: protocol: http address: 127.0.0.1 port: 8080 access: address: 192.168.1.1 port: 80
The server configuration is shown in the above example. Server.access.address and server.access.port represent the real access address and port, which is not enabled by default. The default values are server.address and server.port.
If you deploy Davinci on the virtual host, the startup port is 8080, the real access IP address of the host is 192.168.1.1, and you map port 8080 of the virtual host to port 80, you need to open the access configuration item, otherwise you will not be able to use some of the functions of Davinci normally, such as activating account, downloading, sharing, etc.
Datasource configuration
The datasource configuration here refers to the data source of the Davinci system. The configuration is as follows:
Spring: datasource: url: jdbc:mysql://localhost:3306/davinci0.3?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true username: root password: root driver-class-name: com.mysql.jdbc.Driver initial-size: 2 min-idle: 1 max-wait: 60000 max-active: 10
Configure the database address initialized in the previous step into url, do not make any changes to the parameters in url, and then change the correct database access user and password, namely username and password.
Initial-size, min-idle, max-wait and max-active are connection pool parameters. For more information, please see DruidDataSource configuration attribute list.
Mail configuration
Note: version 0.3 users are maintained by registration and activation, so mail configuration is essential for this version, and the error rate of mail configuration is high, please pay attention to it.
Spring: mail: host: smtp.****.com port: 25 username: example@***.com password: example_password nickname: Davinci properties: smtp: starttls: enable: true required: true auth: true mail: smtp: ssl: enable: false
Mail configuration is not complicated. The above is the complete mail configuration. Username is the email address and password mailbox service password. It should be noted that the common free mailboxes (such as 163mailboxes, QQ Mail, gmail, etc.) should be filled in the client independent password. You can go to the corresponding mailbox account settings page to start the SMTP service, and apply for the client authorization code (or independent password, different mailbox providers call it differently).
The following table shows the addresses and ports of common free mailbox SMTP services:
Phantomjs configuration
Phantomjs is used to send screenshots of reports regularly. You only need to configure the installed phantomjs executable file address, such as:
Phantomjs_home: / usr/local/bin/phantomjs
Cache configuration (optional)
Cache uses redis as the caching service. The configuration is as follows:
Spring: redis: isEnable: false host: 10.143.131.119 port: 6379 # cluster: # nodes: password: database: 0 timeout: 1000 jedis: pool: max-active: 8 max-wait: 1 max-idle: 8 min-idle: 0
If you want to enable the cache service, set isEnable to true, and set the relevant configuration (open host and port for stand-alone mode and cluster configuration item for cluster mode, only one of them can be selected).
Other configuration
Log configuration file is config/logback.xml, if the current log configuration can not meet your requirements, you can customize the configuration log mode.
III. Data source configuration
Davinci0.3 theoretically supports all data sources with JDBC. By default, we support the following data sources:
Data source name driver class mysqlcom.mysql.jdbc.Driveroracleoracle.jdbc.driver.OracleDriversqlservercom.microsoft.sqlserver.jdbc.SQLServerDriverh3org.h3.Driverphoenixorg.apache.phoenix.jdbc.PhoenixDrivermongodbmongodb.jdbc.MongoDriverelasticSearch-prestocom.facebook.presto.jdbc.PrestoDrivermoonboxmoonbox.jdbc.MbDrivercassandracom.github.adejanovski.cassandra.jdbc.CassandraDriverclickhouseru.yandex.clickhouse.ClickHouseDriverkylinorg.apache.kylin.jdbc.Driververticacom.vertica.jdbc.Driverhanacom.sap.db.jdbc.Driverimpalacom.cloudera.impala.jdbc41.Driver
It is worth noting that only MySql driver package is provided within Davinci, that is, if you want to use other data sources, you also need to manually copy the corresponding driver jar package to the lib directory and restart the Davinci service; Davinci connection ElasticSearch currently uses elasticsearch-sql provided by NLPchina, and the internal default ElasticSearch version is 5.3.2, and the corresponding elasticsearch-sql version is 5.3.2.0.
Similarly, if your ElasticSearch is not 5.3.2, you first need to manually download the corresponding version of jar provided by NLPchina, and then replace the jar under the current lib, including elasticsearch-xxx.jar, transport-xxx.jar, x-pack-api-xxx.jar, x-pack-transport-xxx.jar, elasticsearch-sql-XXX.jar (xxx represents your ElasticSearch version number, XXX represents NLPchina corresponding to elasticsearch-sql version number).
It is also worth noting that if your data source is not in the above list, you can also inject it into the data source through custom configuration, otherwise it is not necessary to turn it on unless you know what you are doing:
1) Open the custom data source configuration file
Mv datasource_driver.yml.example datasource_driver.yml
2) configure your data source as follows. Take postgresql as an example.
Postgresql: name: postgresql desc: postgresql driver: org.postgresql.Driver keyword_prefix: keyword_suffix: alias_prefix:\ "alias_suffix:\"
Be careful
Keyword_prefix and keyword_suffix denote keyword prefixes and suffixes. If you use mysql database and use the desc keyword as a field, your query statement should be: ``here in select desc from table is the prefix and suffix, they must be configured in pairs and can all be empty.
Alias_prefix and alias_suffix denote alias prefix and suffix, and still take mysql as an example. Suppose your sql statement is as follows: select column as' column 'from table
. Here an alias is given to 'column' for 'column'', then''will be configured as a prefix, which must be configured in pairs and can all be empty.
For the above alias configuration, you can use''to wrap the characters, or you can use the transfer character\, only one of the two can appear.
3) manually copy the corresponding driver jar package to the lib directory.
4) restart the Davinci service.
Open source address: https://github.com/edp963/davinci
Reference documentation-Davinci user's manual: https://edp963.github.io/davinci/
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.