ubuntu 安装 PostgreSQL

  1. 参考官方文档安装PostgreSQL9.1 
    apt-get install postgresql-9.1
  2. 这包括以下主要packages
    postgresql-client-9.1 - client libraries and client binaries
    postgresql-9.1 - core database server
    postgresql-contrib-9.1 - additional supplied modules
    libpq-dev - libraries and headers for C language frontend development
    postgresql-server-dev-9.1 - libraries and headers for C language backend development
    pgadmin3 - pgAdmin III graphical administration utility
  3.  修改PostgreSQL的默认用户名postgres的密码
    # su postgres -c psql template1  //进入命令行交互
    
    postgres=# ALTER USER postgres with password 'aaa123456';  
    ALTER ROLE
    postgres=# \q
    
    //这样就修改密码为aaa123456
  4. 在命令行输入pgadmin3 就可以启动UI,然后输入服务器地址为localhost,用户名postgres,密码aaa123456等就可以启动。

猜你喜欢

转载自dugu108.iteye.com/blog/1774597