-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This tutorial is for setting up a working environment with a PostgreSQL
database hosting 100K synthetic sample tweets
and a prototype implementation of the Rainbow
visualization system.
All the following steps have been tested on an AWS EC2 t2.medium
virtual machine created using Red Hat Enterprise Linux 8 (HVM), SSD Volume Type
image with 10 GB volume disk. For other environments, accommodation of the following steps is expected.
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql12 postgresql12-server
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
sudo systemctl start postgresql-12
sudo passwd postgres
# e.g., rainbow
su - postgres
# password: rainbow
psql -d postgres
postgres=# ALTER USER postgres PASSWORD 'rainbow';
postgres=# \q
vi /var/lib/pgsql/12/data/pg_hba.conf
Modify the content to be consistent with the following:
# "local" is for Unix domain socket connections only
# local user no authentication
local all all trust
# IPv4 local connections:
host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::1/128 md5
vi /var/lib/pgsql/12/data/postgresql.conf
Change the following two variables' values to be consistent with your environment (here we assume the machine has 4GB RAM)
# Data Cache, should be 1/4 of total RAM
shared_buffers = 1GB # min 128kB
# Memory for creating indexes
maintenance_work_mem = 512MB # min 1MB
exit
sudo systemctl restart postgresql-12
# download
curl -LJO http://cloudberry.ics.uci.edu/img/sample.sql.gz
# unzip
gunzip sample.sql.gz
psql -d postgres -U postgres
postgres=# create database twitter;
postgres=# \q
psql -U postgres twitter < sample.sql
sudo yum install java-11-openjdk
# remove old Bintray repo file
sudo rm -f /etc/yum.repos.d/bintray-rpm.repo
curl -L https://www.scala-sbt.org/sbt-rpm.repo > sbt-rpm.repo
sudo mv sbt-rpm.repo /etc/yum.repos.d/
sudo yum install sbt
sudo yum install git
git clone https://github.com/ISG-ICS/rainbow.git
cd rainbow/server
sbt run
For the first time running sbt
, it will take a while. Wait until the following messages are shown:
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Enter to stop and go back to the console...)
Note: do not close the terminal, otherwise the server will be shutdown.
You can access Rainbow through http://[your_machine_ip]:9000
. Then you should see the following web page: