Pgmodeler is a handy tool for designing databases with an ERD style interface specifically aimed at the PostgreSQL community. It can come in a couple of different ways, but I am going to covering the self build process here. So if you want to learn how to build and install pgmodeler read on!
To be able to build anything you’ll need to install the tools from Ubuntu’s repositories.
The first dependency you will need to install is the from QT5 UI toolkit.
Next up you’ll need to install
To ensure that QT is installed correctly verify that you get similar responses to me from the following commands:
If you do not the there is a little manual intervention that you’ll need to perform by creating the
/usr/lib/pkgconfig/libpq.pc manually. It should contain code of the following block.
So that is all the dependencies taken care of and we can move onto building and installing the actual binary itself.
The binary is now in the build directory so we can call it from there after passing it a few options with a start-up script.
Move into the build directory and create
In the start-up file we want to add the following lines of bash script.
#/bin/bash # Specify here the full path to the pgmodeler's root directory export PGMODELER_ROOT="." export PGMODELER_CONF_DIR="$PGMODELER_ROOT/conf" export PGMODELER_SCHEMAS_DIR="$PGMODELER_ROOT/schemas" export PGMODELER_LANG_DIR="$PGMODELER_ROOT/lang" export PGMODELER_TMP_DIR="$PGMODELER_ROOT/tmp" export PGMODELER_PLUGINS_DIR="$PGMODELER_ROOT/plugins" export PGMODELER_CHANDLER_PATH="$PGMODELER_ROOT/pgmodeler-ch" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$PGMODELER_ROOT" export PATH=$PATH:$PGMODELER_ROOT # Running pgModeler pgmodeler
After writing that file and quitting
vim you need to set the files executable bit using chmod.
You can now run
pgmodeler by calling the
start-pgmodeler.sh shell script on the command line.
After the application starts itself you will be greeted by the nice QT interface of
pgmodeler. You’re done!