update repository:
sudo apt update
sudo apt upgrade
kemudian lakukan instalasi dependency yang diperlukan:
sudo apt install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev python3 nano
kemudian environment python3 disana:
virtualenv -p python3 ~/pgadmin4
kemudian buat folder-folder yang dibutuhkan:
cd ~/pgadmin4
mkdir var
mkdir var/storage
mkdir var/sessions
kemudian aktivasi virtual environment python3 tersebut:
source bin/activate
download installer pgAdmin disini:
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v4.18/pip/pgadmin4-4.18-py2.py3-none-any.whl
dan install dengan PIP:
pip3 install pgadmin4–4.18-py2.py3-none-any.whl
downgrade werkzeug!
pip3 install 'werkzeug<1.0'
buat file konfigurasi:
nano lib/python3.7/site-packages/pgadmin4/config_local.py
dan isi dengan konten:
[sourcecode]
PGADMIN_DEFAULT_EMAIL='a@a.a'
PGADMIN_DEFAULT_PASSWORD='123456'
LOG_FILE = '~/pgadmin4/var/log'
SQLITE_PATH = '~/pgadmin4/var/pgadmin4.db'
SESSION_DB_PATH = '~/pgadmin4/var/sessions'
STORAGE_DIR = '~/pgadmin4/var/storage'
[/sourcecode]
lakukan deactivate:
deactivate
dan jalankan pgAdmin:
python3 \
~/pgadmin4/lib/python3.7/site-packages/pgadmin4/pgAdmin4.py
0 comments:
Post a Comment