forked from fga-eps-mds/2017.1-Trezentos
-
Notifications
You must be signed in to change notification settings - Fork 0
Postgres
Calebe Rios edited this page Sep 14, 2017
·
5 revisions
$ sudo apt-get update
$ sudo apt-get install postgresql postgresql-contrib
sudo apt-get install virtualenv python-pip libpq-dev python-dev
virtualenv pgadmin4
cd pgadmin4
source bin/activate
pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.6/pip/pgadmin4-1.6-py2.py3-none-any.whl
Write the SERVER_MODE = False in lib/python2.7/site-packages/pgadmin4/config_local.py to configure to run in single-user mode:
echo "SERVER_MODE = False" >> lib/python2.7/site-packages/pgadmin4/config_local.py
python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
http://localhost:5050
The installation procedure created a user account called postgres that is associated with the default Postgres role. In order to use Postgres, we can log into that account.
Switch over to the postgres account on your server by typing:
$ sudo -i -u postgres
You can now access a Postgres prompt immediately by typing:
$ psql
You will be logged in and able to interact with the database management system right away.
Exit out of the PostgreSQL prompt by typing:
postgres=# \q
pg_dump -U username -f backup.sql database_name
psql -d database_name -f backup.sql
postgres=# \l
postgres=# \d
postgres=# \c database_name
postgres=# create database dbname;
postgres=# create table table_name(
column1 datatype,
column2 datatype,
column3 datatype,
.....
columnN datatype,
PRIMARY KEY( one or more columns )
);
postgres=# drop database trezentos;
postgres=# drop table user, company;
postgres=# \q
- Termo de Abertura do Projeto
- Plano de Gerenciamento do Projeto
- Plano de Gerenciamento do Escopo
- Plano de Gerenciamento do Cronograma
- Plano de Gerenciamento das Partes Interessadas
- Plano de Gerenciamento de Comunicação
- Plano de Gerenciamento das Aquisições
- Plano de Gerenciamento dos Requisitos
- Plano de Iteração
- Plano de Gerenciamento de Recursos Humanos
- Plano de Gerenciamento dos Riscos
- Plano de Gerenciamento de Configuração de Software
- Plano de Gerenciamento da Qualidade
- Plano de Gerenciamento dos Custos