How to Install Redash on Fedora Server

Redash is an open source software used for making data-driven decisions. It allows the creation of detailed visualizations and dashboards for your business data while allowing collaboration on shared dataset creations. Redash supports many databases including MySQL, PostgreSQL, SQL Server, and MongoDB. In this tutorial, we will guide you through the steps required to install Redash on Fedora Server Latest.

Prerequisites

Before you start installing Redash on Fedora Server, make sure you meet the following requirements:

Step 1: Update Fedora Server Packages

To begin, update the packages on your server using the following commands:

sudo dnf update -y

Step 2: Install Basic Prerequisites

Redash is built using Python, Frontend JavaScript and database engines. These dependencies are needed before we can start installing Redash.

sudo dnf install -y gcc-c++ jq make redhat-rpm-config python3-devel.x86_64 libffi-devel.x86_64 openssl-devel.x86_64

Once installed, check if the Python version is higher than Python 3.6:

python3 --version

Step 3: Install PostgreSQL Database Server & Client

Redash supports various database engines including PostgreSQL which is an open-source, object-relational database system that provides robust SQL/JSON querying capabilities. Use the following command to install PostgreSQL and its client on Fedora Server:

sudo dnf install -y postgresql-server postgresql-contrib postgresql-devel

After PostgreSQL has been installed, initialize the database cluster with the following command:

sudo postgresql-setup --initdb

Start and enable the PostgreSQL server to start on boot:

sudo systemctl start postgresql
sudo systemctl enable postgresql

Ensure PostgreSQL is running by using the command:

sudo systemctl status postgresql

Step 4: Install Redis

In order to install Redash, Redis should be installed because Redash uses Redis as a database for caching job and query results. Use the following command to install Redis on Fedora Server:

sudo dnf install -y redis

Start Redis and enable it to start on boot:

sudo systemctl start redis
sudo systemctl enable redis

Ensure Redis is running by using the command:

sudo systemctl status redis

Step 5: Create and Configure the Redash PostgreSQL Database and User

Create a new PostgreSQL user and database for Redash:

sudo su postgres
psql

Create a new user for Redash input the new username and password:

CREATE USER redashuser WITH PASSWORD 'redashpassword';

Create and grant Redash database privileges to the new user:

CREATE DATABASE redash WITH OWNER redashuser TEMPLATE template0 ENCODING 'UTF-8';
GRANT ALL PRIVILEGES ON DATABASE redash to redashuser;

Step 6: Install Redash Using Docker

Redash is mainly distributed using the Docker container technology. This is because Docker is a cross-platform tool that makes it very easy to install, configure and deploy applications, that’s why we shall use Docker to install and configure Redash on Fedora Server.

First, install the Docker and Docker Compose package using the following command:

sudo dnf install -y docker docker-compose

Start and enable the Docker service to begin using Docker:

sudo systemctl start docker
sudo systemctl enable docker

Ensure Docker is working properly:

sudo docker run hello-world

Next, create a directory for Redash:

sudo mkdir /opt/redash
sudo chmod 777 /opt/redash

Change directory into /opt/redash:

cd /opt/redash

Setup Docker configuration files

touch /opt/redash/docker-compose.yml
mkdir /opt/redash/postgres-data

Add the following contents to /opt/redash/docker-compose.yml file:

version: '3'

services:

  server:
    image: redash/redash:latest
    container_name: redash
    depends_on:
      - postgres
      - redis
    ports:
      - "5000:5000"
    env_file:
      - /opt/redash/env
    restart: always

  postgres:
    image: postgres:9.6-alpine
    volumes:
      - /opt/redash/postgres-data:/var/lib/postgresql/data
    env_file:
      - /opt/redash/env
    restart: always

  redis:
    image: redis:latest
    restart: unless-stopped

Add a new file named env with the following contents:

PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
REDASH_DATABASE_URL=postgresql://redashuser:redashpassword@postgres:5432/redash
REDASH_COOKIE_SECRET=";
REDASH_SECRET_KEY=5e5b9d5b600aea27bbd4a4c479f4ff67

Lastly, start up the Redash container and verify everything is working by visiting $HOST:5000:

sudo docker-compose up -d

Now you have successfully installed Redash on Fedora Server Latest!\

You can access the Redash UI by visiting http://$HOST:5000 in your web browser.

Use the created account to access your Redash system. Enjoy using Redash, the powerful data visualization dashboard!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!