I'm working on a project that involves the creation of a dashboard (SpringBoot + angular.js webapp) for the interrogation of Zabbix. For the purpose of testing I installed Ubuntu 16.04 LTS (VirtualBox), PostgreSQL 9.6 in which I imported by command line the database dump (pg_dump) made by the customer and also installed the GUI pgAdmin4 and connected it to the db I restored.
now I have installed pgAdmin4 this way:
as root:
sudo apt-get install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev
cd /opt/
mkdir enviromentpy
cd enviromentpy/
virtualenv pgadmin4
cd pgadmin4
source bin/activate
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.1/pip/pgadmin4-2.1-py2.py3-none-any.whl
pip install pgadmin4-2.1-py2.py3-none-any.whl
touch lib/python2.7/site-packages/pgadmin4/config_local.py
echo "SERVER_MODE = False" >> lib/python2.7/site-packages/pgadmin4/config_local.py
After that launching
python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
I see the following output:
pgAdmin4 started, go to http://127.0.0.1:5050 through your browser
Now if I launch Firefox at above address I see the GUI and I have imported my postgres db's
Question is:
1) How can I stop correctly the service?? I mean the pgAdmin GUI not the postgres DBMS
2) To start it again I made this procedure:
cd /opt/enviromentpy
virtualenv pgadmin4
cd pgadmin4
source bin/activate
python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
Is it correct??
3) Sometimes, after a period of inactivity, ubuntu freeze, no activity is possible and I can only turn off the machine through the virtualbox menu. Do you know why?
Can you help me??
Thanks a lot
After you start pgAdmin server the icon with elephant head should appear. If you click it you will have an option Shut down server . Just to clarify: pressing the button asks you if you're sure you want to shut down the server but it just means the admin tool. Gets me every time.
The File Menu¶ Click to open the Preferences dialog to customize your pgAdmin settings. If you have modified the workspace, click to restore the default layout.
I tried CTRL-C to stop the job, but on my Ubuntu 16.04 this does not kill the process.
You can lookup the process id and use kill -9
to terminate the process. However, a quicker solution is to type in another terminal window:
killall pgadmin4
and pgadmin4 should terminate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With