Skip to content

Wheels Package

SlashDB can be installed from a Python Wheels package.

The installation of SlashDB from Wheels package gives the administrator more control over the system and allows tuning the installation to their needs, but it requires an advanced understanding of the system and WSGI servers.

1. Install system dependencies

Red Hat 7

First follow steps 1, 2 and 3 from instruction for installation of RPM on Red Hat 7.

Then, still as root, install required system packages:

yum install -y \
  ca-certificates \
  python3 \
  python3-devel python3-pip gcc gcc-c++ \
  libaio \
  mysql-devel postgresql-devel \
  unixODBC freetds unixODBC-devel \
  libxml2-devel libxslt-devel \
  memcached nginx \
  xmlsec1 xmlsec1-openssl xmlsec1-devel xmlsec1-openssl-devel \
  libxslt libtool-ltdl-devel \
  wget unzip

On some systems C locale is missing. Set default python encoding to avoid problem with installation of ibm_db.

The below command gets exactly one supported locale and sets it.

export LC_ALL=$(locale --all | grep -E --ignore-case --only-matching --max-count 1 \
      "(C.UTF-?8)|(en_US.UTF-?8)" | head --lines 1)

Red Hat 8

First follow steps 1 and 2 from instruction for installation of RPM on Red Hat 8.

Then, still as root, install required system packages:

yum install -y \
  python3 \
  python3-devel python3-pip gcc gcc-c++ \
  libaio \
  mysql-devel postgresql-devel \
  unixODBC freetds unixODBC-devel \
  libxml2-devel libxslt-devel \
  memcached nginx \
  xmlsec1 xmlsec1-openssl xmlsec1-devel xmlsec1-openssl-devel \
  libxslt libtool-ltdl-devel \
  wget unzip

Red Hat 9

First follow steps 1 and 2 from instruction for installation of RPM on Red Hat 9.

Then, still as root, install required system packages:

yum install -y \
  python3 \
  python3-devel python3-pip gcc gcc-c++ \
  libaio \
  mysql-devel postgresql-devel \
  unixODBC freetds unixODBC-devel \
  libxml2-devel libxslt-devel \
  memcached nginx \
  xmlsec1 xmlsec1-openssl xmlsec1-devel xmlsec1-openssl-devel \
  libxslt libtool-ltdl-devel \
  wget unzip

CentOS 7

First follow steps 1 , 2 and 3 from instruction for installation of RPM on CentOS 7.

Then, still as root, install required system packages:

yum install -y \
  ca-certificates \
  python3 \
  python3-devel python3-pip gcc gcc-c++ \
  libaio \
  mysql-devel postgresql-devel \
  unixODBC freetds unixODBC-devel \
  libxml2-devel libxslt-devel \
  memcached nginx \
  xmlsec1 xmlsec1-openssl xmlsec1-devel xmlsec1-openssl-devel \
  libxslt libtool-ltdl-devel \
  wget unzip

On some systems C locale is missing. Set default python encoding to avoid problem with installation of ibm_db.

The below command gets exactly one supported locale and sets it.

export LC_ALL=$(locale --all | grep -E --ignore-case --only-matching --max-count 1 \
      "(C.UTF-?8)|(en_US.UTF-?8)" | head --lines 1)

CentOS 8

First follow steps 1, 2 and 3 from instruction for installation of RPM on CentOS 8.

Then, still as root, install required system packages:

yum install -y \
  python3 \
  python3-devel python3-pip gcc gcc-c++ \
  libaio \
  mysql-devel postgresql-devel \
  unixODBC freetds unixODBC-devel \
  libxml2-devel libxslt-devel \
  memcached nginx \
  xmlsec1 xmlsec1-openssl xmlsec1-devel xmlsec1-openssl-devel \
  libxslt libtool-ltdl-devel \
  wget unzip

Debian (10, 11)

First follow steps 1 and 2 from instruction for installation of DEB on Debian.

Then, still as root, install required system packages:

apt-get install -y \
  ca-certificates python3 python3-dev \
  python3-pip python3-venv \
  libaio1 libyaml-dev libpython3-dev libssl-dev \
  libxml2-dev libxslt-dev libmysqlclient-dev libpq-dev unixodbc-dev tdsodbc \
  memcached nginx \
  pkg-config xmlsec1 libxml2-dev libxmlsec1-dev \
  unzip

Ubuntu (18.04, 20.04)

apt-get update
apt-get install -y software-properties-common
add-apt-repository universe
apt-get update

apt-get install -y \
  ca-certificates python3 python3-dev \
  python3-pip python3-venv \
  libaio1 libyaml-dev libpython3-dev libssl-dev \
  libxml2-dev libxslt-dev libmysqlclient-dev libpq-dev unixodbc-dev tdsodbc \
  memcached nginx \
  pkg-config xmlsec1 libxml2-dev libxmlsec1-dev \
  wget unzip

On Ubuntu 18.04 the C locale is missing. Set default python encoding to avoid problem with installation of ibm_db.

The below command gets exactly one supported locale and sets it.

export LC_ALL=$(locale --all | grep -E --ignore-case --only-matching --max-count 1 \
      "(C.UTF-?8)|(en_US.UTF-?8)" | head --lines 1)

2. Download SlashDB files

Visit SlashDB downloads and acquire:

  • wheel file that matches your Python version (For example, slashdb-1.8.0-cp310-cp310-manylinux2014_x86_64.whl uses python 3.10)

    • wget https://downloads.slashdb.com/versions/1.8.0/slashdb-1.8.0-cp38-cp38-manylinux2014_x86_64.whl

    • wget https://downloads.slashdb.com/versions/1.8.0/slashdb-1.8.0-cp39-cp39-manylinux2014_x86_64.whl

    • wget https://downloads.slashdb.com/versions/1.8.0/slashdb-1.8.0-cp310-cp310-manylinux2014_x86_64.whl

  • zip with default SlashDB configs

    wget https://downloads.slashdb.com/versions/1.8.0/default-slashdb-configs_1.8.0.zip

3. Create a Python virtual environment and folder structure

As root run below commands

python3 -m venv /opt/slashdb
mkdir /var/log/slashdb

unzip default-slashdb-configs_1.8.0.zip
mv ./slashdb /etc

chown -R ${USER}:${USER} /opt/slashdb /var/log/slashdb /etc/slashdb

4. Install SlashDB

As root run below commands

source /opt/slashdb/bin/activate
pip install --upgrade pip setuptools wheel

# Make sure this matches the wheel that you downloaded in step 2
pip install ./slashdb-1.8.0-cp310-cp310-manylinux2014_x86_64.whl

Optionally install WSGI web server

pip install uWSGI

5. MS SQL (optional)

If you plan to use SlashDB with MS SQL Servers then additional configuration of UnixODBC is necessary. Execute the below script which adds FreeTDS driver to the /etc/odbcinst.ini, if doesn't exist already.

For Debian (10, 11), Ubuntu (18.04, 20.04)

if grep "FreeTDS" /etc/odbcinst.ini > /dev/null; then
    echo "FreeTDS already configured."
else
    echo "[FreeTDS]" >> /etc/odbcinst.ini
    echo "Description     = Freetds"  >> /etc/odbcinst.ini
    echo "Driver          = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so"  >> /etc/odbcinst.ini
    echo "UsageCount      = 1"  >> /etc/odbcinst.ini
fi

For Red Hat (7, 8, 9), CentOS (7, 8)

if grep "FreeTDS" /etc/odbcinst.ini > /dev/null; then
    echo "FreeTDS already configured."
else
    echo "[FreeTDS]" >> /etc/odbcinst.ini
    echo "Description     = Freetds"  >> /etc/odbcinst.ini
    echo "Driver          = /usr/lib64/libtdsodbc.so.0"  >> /etc/odbcinst.ini
    echo "UsageCount      = 1"  >> /etc/odbcinst.ini
fi

6. Oracle (optional)

If you plan to use SlashDB with Oracle databases then additional setup is needed.

7. Start SlashDB

pserve /etc/slashdb/slashdb.ini

It also is possible to run slashdb with other WSGI servers like uWSGI or Gunicorn

8. Access SlashDB

SlashDB should be accessible at http://localhost:6543 or server IP address.

In the terminal you can check if a service is running by downloading the main page

wget http://localhost:6543

to access the GUI you need to open port 6543

sudo firewall-cmd --zone=public --add-port=6543/tcp
sudo firewall-cmd --reload

find out the IP address of the server

ip address

Using browser go to the IP address on port 6543 e.g. http://192.168.1.18:6543