Last active
January 10, 2018 01:47
-
-
Save gbpereira/c50ed5728cdc6a2cd009f62dd99a0317 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instalando postgres e dependências | |
sudo apt-get install postgresql postgresql-contrib postgresql-server-dev-9.5 | |
# acessando o postgres | |
sudo su - postgres | |
psql | |
# alterando o encoding que vem por padrão | |
update pg_database set encoding = 6, datcollate = 'pt_BR.UTF-8', datctype = 'pt_BR.UTF-8' where datname = 'postgres'; | |
update pg_database set encoding = 6, datcollate = 'pt_BR.UTF-8', datctype = 'pt_BR.UTF-8' where datname = 'template0'; | |
update pg_database set encoding = 6, datcollate = 'pt_BR.UTF-8', datctype = 'pt_BR.UTF-8' where datname = 'template1'; | |
# criando role e database para o usuario | |
create role username superuser login; | |
create database username; | |
# criando uma role para o projeto | |
create role project_name with createdb superuser login password 'senhasenha'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment