Redash 安装部署
介绍
是一款开源的BI工具,提供了基于web的数据库查询和数据可视化功能。
GitHub:https://github.com/getredash/redash
环境选择
官方支持的环境有 Ubuntu 16.04, AWS, Google Compute Cloud 和 Docker。
https://redash.io/help-onpremise/setup/setting-up-redash-instance.html
Ubuntu部署
1 2 3 | wget https: //raw .githubusercontent.com /getredash/redash/master/setup/ubuntu/bootstrap .sh sudo chmod +x bootstrap.sh sudo . /bootstrap .sh |
执行完成后,访问http://ip:80
Centos部署
依赖:Python (2.7), PostgreSQL (9.3 or newer), Redis (2.8.3 or newer) and Node.js (v6 or newer)
参考:https://redash.io/help-onpremise/dev/setup.html
系统环境:CentOS Linux release 7.4.1708 (Core)
Redash版本:3.0.0
- 初始化
1 2 3 4 5 6 | yum update -y yum install -y gcc gcc -c++ cyrus-sasl-devel make yum install -y pwgen python-devel python-pip supervisor yum install -y nginx curl wget redis yum install -y libffi-devel yum install -y mariadb-devel |
- PostgreSQL 9.5安装、配置
http://www.cnblogs.com/shhnwangjian/p/8392050.html
1 | yum install -y libpqxx-devel |
- redis启动
1 | systemctl start redis |
- 目录和账号创建
1 2 3 | mkdir -p /opt/redash adduser --system --no-create-home -s /sbin/nologin redash chown redash /opt/redash |
- 包下载
1 2 3 4 | cd /opt/redash sudo -u redash wget https: //github .com /getredash/redash/archive/v3 .0.0. tar .gz sudo -u redash tar xvf v3.0.0. tar .gz ln -nfs /opt/redash/redash-3 .0.0 /opt/redash/current |
- 环境配置
1 2 3 4 5 6 7 8 9 | pwgen -1s 32获取值,用于REDASH_COOKIE_SECRET vim /opt/redash/ . env export REDASH_LOG_LEVEL= "INFO" export REDASH_REDIS_URL=redis: //localhost :6379 /0 export REDASH_DATABASE_URL= "postgresql:///redash" export REDASH_COOKIE_SECRET=RwQL7TTb9O5w0NKQAfu4eXE3tPVeqvvF ln -nfs /opt/redash/ . env /opt/redash/current/ . env |
- pip安装
1 2 3 4 5 6 7 8 9 10 11 | cd /opt/redash/current pip install --upgrade pip pip install setproctitle vim /root/ .bash_profile export PATH= "/usr/pgsql-9.5/bin:$PATH" pip install psycopg2 pip install -r requirements.txt pip install setuptools==3.4.4 pip install -r requirements_all_ds.txt |
- npm安装
1 2 3 4 5 | curl --silent --location https: //rpm .nodesource.com /setup_6 .x | bash - yum install -y nodejs npm install -g cnpm --registry=https: //registry .npm.taobao.org cnpm install cnpm run build |
- 数据库创建
1 2 3 | sudo -u postgres createuser redash --no-superuser --no-createdb --no-createrole sudo -u postgres createdb redash --owner=redash sudo -u redash bin /run . /manage .py database create_tables |
- supervisord配置
1 2 | cp /opt/redash/current/setup/ubuntu/files/supervisord .conf /etc/supervisord .d /redash .ini systemctl start supervisord |
- Nginx配置
1 2 | cp /opt/redash/current/setup/ubuntu/files/nginx_redash_site /etc/nginx/conf .d /nginx_redash_site .conf 修改 /etc/nginx/conf .d /nginx_redash_site .conf中端口为8080 |
页面访问http://ip:8080
工作原理
参考:https://zhuanlan.zhihu.com/p/31292944
配置介绍
https://redash.io/help-onpremise/setup/settings-environment-variables.html
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步