Install and configure PostgreSQL8.1 in Ubuntu

Source: Internet
Author: User
Tags postgres createdb postgresql version
Installing and configuring PostgreSQL in Ubuntu is relatively simple, but you need to pay attention to some details. Here, the installation steps are simple, with special attention. 1-$ sudoapt-getinstallpostgresql-8.1 # apt-getinstallpostgresql will install PostgreSQL 7.4. 2-$ sudonano/etc/postgres it is relatively easy to install and configure PostgreSQL in Ubuntu, just pay attention to some details. The installation steps are as follows:
  • You need to pay special attention.

    1-$ sudo apt-get install postgresql-8.1 #
  • Apt-get install postgresql will install PostgreSQL version 7.4.

    2-$ sudo nano/etc/postgresql/8.1/main/postgresql. conf # if it is not used on a single machine, you need to modify "# listen_addresses = 'localhost'" to "listen_addresses = '*'" in the connection and authentication segments (remove the annotator "#", allow network access instead of localhost only ).

    3-$ sudo-u postgres createuser-P # Enter the username and password to be created in sequence, whether the user is a Super User, whether the user has the permission to create a database, and whether the user/role has the permission to be added.
  • We recommend that you use the-P option to create a password on the spot to avoid future connection configuration problems.

    4-$ sudo-u postgres createdb [databasename] # create a database.

    5-$ psql-U [username] [databasename] # normally, you can go to the PostgreSQL interactive command interface and see the PostgreSQL version number, such as 8.1.4.
  • Case Sensitive

    6-install your favorite client. The official recommendation is pgadminIII. The installation method is $ apt-get install pgadmin3. or other clients, such as Eclipse + QuantumDB (you need to download the JDBC driver separately ).
  • 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.