1 环境准备
Streamis依赖于Linkis、DSS和基础软件、Nginx等,请参照文章Linkis 1.5.0安装部署、DSS 1.1.2安装部署完成安装和验证通过以后,再参照本文进行Streamis 0.3.0安装部署。
1.1 环境变量设置
新增环境变量STREAMIS_INSTALL_HOME:
vim ~/.bash_profile
export STREAMIS_INSTALL_HOME=/data/appcom/install/streamis
1.2 数据库准备
create user 'streamis'@'%' identified by 'streamis';
DROP DATABASE streamis;
CREATE DATABASE streamis DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
use streamis
grant all privileges on visualis to 'streamis'@'%';
grant all on streamis.* to streamis@'%';
show grants for streamis@'%';
flush privileges;
2 安装介质准备
可以从官网下载或者参照文章Streamis 0.3.0编译进行自行编译。
后端安装包:wedatasphere-streamis-0.3.0-dist.tar.gz
前端安装包:streamis-0.3.0-dist.zip
unzip -d /data/appcom/install/streamis -o assembly/target/wedatasphere-streamis-0.3.0-dist.tar.gz
2.1 修改配置
修改数据库配置文件:
vim /data/appcom/install/streamis/conf/db.sh
MYSQL_HOST=node4
MYSQL_PORT=3306
MYSQL_DB=streamis
MYSQL_USER=streamis
MYSQL_PASSWORD=streamis
修改基本配置文件:
vim /data/appcom/install/streamis/conf/config.sh
deployUser=hadoop
SSH_PORT=22
SERVER_HEAP_SIZE="1024M"
STREAMIS_PORT=9400
STREAMIS_INSTALL_HOME=/data/appcom/install/streamis
EUREKA_INSTALL_IP=node4
EUREKA_PORT=20303
GATEWAY_INSTALL_IP=node4
GATEWAY_PORT=9001
STREAMIS_SERVER_INSTALL_IP=node4
STREAMIS_SERVER_INSTALL_PORT=9400
STREAMIS_VERSION=0.3.0
STREAMIS_FILE_NAME="STREAMIS-$STREAMIS_VERSION"
3 安装部署
3.1 后端安装
sh /data/appcom/install/streamis/bin/install.sh
3.2 前端安装
修改nginx配置文件
sudo vim /etc/nginx/conf.d/streamis.conf
server {
listen 9088;
server_name localhost;
location / {
root /data/appcom/install/web/dss/streamis/dist;
index index.html index.html;
}
location /api {
proxy_pass http://186.137.170.60;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header x_real_ipP $remote_addr;
proxy_set_header remote_addr $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_connect_timeout 4s;
proxy_read_timeout 600s;
proxy_send_timeout 12s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
部署前端页面
unzip -d /data/appcom/install/web/dss/streamis -o streamis-0.3.0-dist.zip
3.3 AppConn安装
cp streamis-appconn/target/streamis.zip $DSS_INSTALL_HOME/dss-appconns
unzip $DSS_INSTALL_HOME/dss-appconns/streamis.zip
sh $DSS_INSTALL_HOME/bin/appconn-install.sh
输入字符串streamis、streamis安装IP、streamis前端端口号
安装完成以后,需要使用管理员在工作空间管理中进行授权后方可以使用。
3.4 重启验证
sudo nginx -s reload
sh /data/appcom/install/streamis/streamis-server/bin/start-streamis-server.sh