Clone wiki

phoenixdb / Quick start

End user

Build and installation

git clone --recursive git@bitbucket.org:phoenixdb/phoenixdb.git
cd phoenixdb
mkdir build
cd build
cmake ..
sudo make install

Create PostgreSQL user and catalog

sudo -u postgres createuser -d -P phoenixdb
sudo -u postgres createdb -O phoenixdb phoenixdb
sudo -u postgres createlang plpgsql phoenixdb

Configure daemon

  1. Copy /etc/phoenixdb/phoenixdb_sample.conf to /etc/phoenixdb/phoenixdb.conf
  2. Update /etc/phoenixdb/phoenixdb.conf. If you creating cluster with several physical nodes properly set IP address for listening to INTERFACE variable!
  3. Update /etc/default/phoenixdb

Initialize cluster and start local instances

sudo /etc/init.d/phoenixdb init
sudo /etc/init.d/phoenixdb register
sudo /etc/init.d/phoenixdb start

To add instances on remote hosts you should do same steps but skip init and execute register

sudo /etc/init.d/phoenixdb register
sudo /etc/init.d/phoenixdb start

Developer

Build

git clone --recursive git@bitbucket.org:phoenixdb/phoenixdb.git
cd phoenixdb
mkdir build
cd build
cmake -DDEVELOPER=1 -DCMAKE_BUILD_TYPE=Debug ..
make
cd dist
cp etc/default/{phoenixdb.install,phoenixdb}
cp etc/phoenixdb/{log4cxx.properties.install,log4cxx.properties}
cp etc/phoenixdb/{phoenixdb-sample.conf,phoenixdb.conf}

Start

PhoenixDB will be ready to configuring and running inplace in dist catalog.

etc/init.d/phoenixdb init
etc/init.d/phoenixdb register
etc/init.d/phoenixdb start

Test

cd tests/phoenixqa
python phoenixqa.py -E test.env

Debug

If you want to debug by attaching to already running app, you can see "Failed to attach to application: ptrace: Operation not permitted." To resolve it:

run

sudo vim /etc/sysctl.d/10-ptrace.conf

set

kernel.yama.ptrace_scope = 0

run

sudo sysctl -p /etc/sysctl.d/10-ptrace.conf

Updated