Ubuntu Installation Pgadmin 4

Source: Internet
Author: User
Tags virtual environment

One-to-install pgadmin4-download its Python wheel at https://www.postgresql.org/ftp/pgadmin3/pgadmin4/v1.0-beta1 /pip/and then use PIP to install it:

It is better to install with virtualenv

virtualevn pgadmin_installcd Pgadmin_installsource. /bin/Install <name of the pgadmin wheel download from https://www.pgadmin.org/ Download/pgadmin-4-python-wheel/>

According to Https://www.pgadmin.org/download/pip4.php, to run PGADMIN4, do the following:

and add following code in your config_local.py which are in the same location with config.py, if you install it with Virtua Lenv, the config_local.py should locate in ~/pgadmin4/lib/python2.7/site-packages/pgadmin4

ImportOsdata_dir= Os.path.realpath (Os.path.expanduser (U'~/.pgadmin/')) Log_file= Os.path.join (Data_dir,'Pgadmin4.log') Sqlite_path= Os.path.join (Data_dir,'pgadmin4.db') Session_db_path= Os.path.join (Data_dir,'Sessions') Storage_dir= Os.path.join (Data_dir,'Storage')

Once installed, you'll need to create a config_local.py file in the same directory as config.py. On a machine with a virtual environment created at ~/PGADMIN4, this is~/pgadmin4/lib/python2.7/site-packages/pgadmin4. Ensure set values for the Secret_key, Security_password_salt and Csrf_session_key settings at bare minimum-see confi g.py for more information and other settings so can be customised. In order to reference and variables from config.py, you may need to include from config import *at the top of Config_loc al.py.

Pgadmin can now is run with a command like Python ~/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgadmin4.py. Finally, point your browser to http://127.0.0.1:5050.

ref:https://askubuntu.com/questions/788457/how-to-install-pgadmin-4-in-server-mode-on-ubuntu-16-04

Https://stackoverflow.com/questions/46707935/oserror-errno-13-permission-denied-var-lib-pgadmin

Ubuntu installation Pgadmin 4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.