PostgreSQL installs on Ubuntu

Source: Internet
Author: User
Tags psql postgres database

Installation Environment:

Ubuntu 64bit

PostgreSQL 9.0

1. Installing PostgreSQL

Enter the following command

sudo apt-get install PostgreSQL

You will be prompted to install the required disk space, enter "Y" and the Setup program will complete automatically. After installation, the system creates a database Superuser "Postgres" with a blank password. This user is both a non-logged operating system user and a database user.

2. Modify the password of Ubuntu user Postgres

Enter the following command

sudo passwd postgres

3. Modify the password of the database super user Postgres

1) switch to Ubuntu under Postgres user

sudo su postgres

2) Log in to the Postgres database

Psql Postgres

This way you will see the Postgres prompt message as follows:

Psql (9.0.0)

Type ' help ' for help.

and the command line prompt symbol for Postgres appears:

postgres=#

3) Enter the following command

ALTER USER postgres with PASSWORD ' PASSWORD '

Type "\q" to return to the Ubuntu command line.

PostgreSQL installs on Ubuntu

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.