Install PostgreSQL on openSUSE

Source: Internet
Author: User

Install postgresql on openSUSE and record the steps below.

Read more: Install Mono on openSUSE and release ASP. Net programs

Environment

I tested the installation of postgresql 8.4.6 on openSUSE 11.3, and the installation of postgresql 9.0.3 on openSUSE 11.4. The steps are no different.

Install

Zypper install postgresql-server

Initialization

Mkdir/usr/local/pgsql
Mkdir/usr/local/pgsql/data

Chown postgres/usr/local/pgsql/data

Initdb-D/usr/local/pgsql/data (this should be executed by the S user)

Enable Service

Postgres-D/usr/local/pgsql/data or pg_ctl-D/usr/local/pgsql/data-l logfile start

Create databases and users

Psql postgres

Create user pub password 'pub ';

Create database pgsql1 owner pub;

Log on with a new user

Psql-U pub pgsql1

Create schema pub authorization pub;

If it is accessed on the local machine, you can. However, if you want to access postgresql on another host, you need to configure the following.

Configure Network Access

1. If the firewall is enabled, add the postgresql Service to the Allowed Service list.

2. Listen for all access requests. Modify/usr/local/pgsql/data/postgresql. conf and change the localhost to *: listen_addresses = '*'

3. Set accessible IP addresses. 0 is a wildcard. Modify/usr/local/pgsql/data/pg_assist.conf and add host all 0.0.0.0 0.0.0.0 trust to the last line.

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.