Self hosted redash 5.2 from source | centos 7


System environment [ platform : CENTOS 7.0 | python : 2.7 ]

chown -r redash:redash /opt
redash location : /opt/redash

yum upgrade
sudo yum install epel-release
sudo yum install python-pip
sudo yum groupinstall ‘development tools’
sudo yum install gcc python-pip.noarch python-devel
sudo yum -y install python-setuptools python-pip

sudo yum install redis
sudo systemctl start redis
sudo systemctl enable redis

curl --silent --location | sudo bash -
sudo yum install nodejs
sudo yum install gcc-c++ make

rpm -Uvh
yum install postgresql10-server postgresql10
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl start postgresql-10.service
systemctl enable postgresql-10.service

su — postgres
create user redash;
dont set the password for it neither you need to set any database or permission for it

easy_install supervisor
echo_supervisord_conf > /etc/supervisord.conf
vim /usr/lib/systemd/system/supervisord.service

Description=supervisord - Supervisor process control system for UNIX
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl shutdown

systemctl daemon-reload
systemctl enable supervisord
systemctl start supervisord.service

you will be needed oracle clinet software ,version 11.2 works for sure and you will need the basic,devel and sqlplus rpms for redash, so go ahead and download from oracle .simply a google search will lead you there and make sure to download the x64 edition .

yum install libaio
rpm -Uvh oracle-instantclient11.2-basic.x86_64.rpm
rpm -Uvh oracle-instantclient11.2-devel.x86_64.rpm
rpm -Uvh oracle-instantclient11.2-sqlplus.x86_64.rpm
echo “/usr/lib/oracle/11.2/client64/lib” >/etc/
su — redash
cd /home/redash
vim .bashrc
enter the follwing entry
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
source .bashrc
pip install cx_Oracle===5.2.1

sudo yum install git-core
sudo pip install -r requirements.txt -r requirements_dev.txt
npm install
npm run build

bin/run ./ check_settings
bin/run ./ database create_tables

bin/run ./ runserver --debugger --reload --host=
./bin/run celery worker --app=redash.worker --beat -Qscheduled_queries,queries,celery -c2
npm run start

you can run redash by executing the following script .
vim /opt/redash/
chmod +x

> nohup bin/run ./ runserver --debugger --reload --host= > redash-output.log 2>&1 &
> nohup ./bin/run celery worker --app=redash.worker --beat -Qscheduled_queries,queries,celery -c2 > redash-output_celery.log 2>&1 &
> nohup npm run start redash-output_npm.log 2>&1 &