nickjoIT

[ubuntu]pgadmin4 설치 본문

DB/postgresql

[ubuntu]pgadmin4 설치

nickjo 2017. 3. 5. 18:50

1) I didn't have virtualenvwrapper installed, so I (duh!) installed it

sudo pip install virtualenvwrapper

2) Standing on my home folder, I made a pgadmin virtual environment, which creates a pgadmin folder, inside of which I tell it to activate itself

cd ~
virtualenv pgadmin
cd pgadmin
source bin/activate

3) Inside my virtual environment, I make sure to have required dependencies so I'd be able to build wheel for pycrypto and psycopg2

sudo apt-get install build-essential libssl-dev libffi-dev python-dev libgmp3-dev
sudo pip install cryptography pyopenssl ndg-httpsclient pyasn1 

4) Having the required deps, now I can download and pip install the latest pgadmin4 release

wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/pip/pgadmin4-1.0-py2-none-any.whl
pip install pgadmin4-1.0-py2-none-any.whl

5) pgAdmin4 is installed in my virtualenv, now I need to create a config_local.py in the same folder it was installed, and I will use config.pyas the base. So, let's find that one first:

find . -wholename "*pgadmin4/config.py"

6) It tells me it's in ./lib/python2.7/site-packages/pgadmin4/config.py so now I can copy it and run pgAdmin4:

cp ./lib/python2.7/site-packages/pgadmin4/config.py ./lib/python2.7/site-packages/pgadmin4/config_local.py
python  ./lib/python2.7/site-packages/pgadmin4/pgAdmin4.py

The webapp is now running at http://localhost:5050


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


'DB > postgresql' 카테고리의 다른 글

외부 접속 허용  (0) 2017.05.11
pgadmin 실행  (0) 2017.03.09
sql 모음  (0) 2016.11.01
각종 조회  (0) 2016.09.27
테이블 컬럼 정보 확인  (0) 2016.09.25
Comments