Ubuntu安装PostgreSQl

warrior@pc:~$ sudo apt-get install postgresql-xx-xx   #可以使用Tab键进行代码补全

warrior@pc:~$ sudo su postgres             #切换到 postgres 

postgres@pc:/home/warrior$ psql postgres                       # 登录 postgres 数据库

postgres@pc:/home/warrior$ psql postgres
psql (9.1.9)
Type "help" for help.

postgres=# ALTER USER postgres WITH PASSWORD '123123a';  #修改密码为123123a
ALTER ROLE
postgres=# q
postgres@pc:/home/warrior$ exit

原文地址:https://www.cnblogs.com/warrior/p/3301974.html