Home > Database > Mysql Tutorial > body text

PostgreSQL在Ubuntu上安装指南

WBOY
Release: 2016-06-07 16:57:29
Original
1275 people have browsed it

安装环境: Ubuntu 10.04-desktop-i386 PostgreSQL 8.4 1. 安装PostgreSQL 输入如下命令 sudo apt-get insta

  安装环境:

  Ubuntu 10.04-desktop-i386

  PostgreSQL 8.4

  1. 安装PostgreSQL

  输入如下命令

  sudo apt-get install postgresql

  系统会提示安装所需磁盘空间,,输入"y",安装程序会自动完成。 安装完毕后,系统会创建一个数据库超级用户“postgres”, 密码为空。这个用户既是不可登录的操作系统用户,也是数据库用户。

  2. 修改Linux用户postgres的密码

  输入如下命令

  sudo passwd postgres

  3. 修改数据库超级用户postgres的密码

  1) 切换到Linux下postgres用户

  sudo su postgres

  2) 登录postgres数据库

  psql postgres

  这样你会看到postgres提示信息如下:

  psql (8.4.4)

  Type "help" for help.

  并出现postgres的命令行提示符号:

  postgres=#

  3) 输入如下命令

  ALTER USER postgres with PASSWORD 'password'

  键入“exit”返回到Linux命令行。

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!