PostgreSql Server Configuration

Source: Internet
Author: User
PostgreSql server configuration-Linux Enterprise Application-Linux server application information. For more information, see the following section. PostgreSQL was first developed by the Department of Computer Science at UC Berkley University and was originally led by Professor Michael Stonebraker's Postgre project by Defense Advanced Research Projects Agency (DARPA ), sponsored by the Army Research Office (ARO), National Science Foundation (NSF), and ESL. Many of its advanced object-link concepts have been applied in some commercial databases. PostgreSQL supports SQL92/SQL3, transaction integrity and scalability. It is now a database that originates from Berkley code and exposes source code.

Postgres integrates the following four basic concepts through a method that allows users to easily expand the system so that it can provide considerable additional functions:


Class/table (classes)

Inheritance)

Type (types)

Functions)


Other features provide additional features and flexibility:

Constraints)
Triggers)
Rule (rules)
Transaction integrity)

These features place Postgres in the category of object-relational databases. although ipvs has some object-oriented features, it is still in the scope of relational databases. In fact, some commercial databases have recently integrated some of the leading features of ipvs.

1. system requirements:

Installed in RedHat Linux 6.0 and passed the test.

Use the "root" user for installation.

The PostgreSQL version is 7.0

Install the egcs-c ++-1.1.2-24. i386.rpm package first.

Although the minimum memory requirement for running PostgreSQL is less than 8 MB, if we increase the memory to 96 MB, we can see significant performance improvements.

Check that you have sufficient disk space. You need to prepare about 30 mb of space for the source code tree and about 5 MB of space for the installation directory. Prepare about 1 MB bytes for an empty database; otherwise, flat files containing the same amount of data will be about five times the number. During the regression test, you will need about 20 mb of data temporarily.

Check that you have sufficient disk space. You need to prepare about 30 mb of space for the source code tree and about 5 MB of space for the installation directory. Prepare about 1 MB bytes for an empty database; otherwise, flat files containing the same amount of data will be about five times the number. During the regression test, you will need about 20 mb of data temporarily.

Before compiling PostgreSQL. First, check whether "egcs-c ++-1.1.2-24. i386.rpm" has been installed. If not, install it. "Egcs-c ++-1.1.2-24. i386.rpm" can be directly obtained from the Redhat CD, under "RedHat/RPMS.

Verify that egcs-c ++-1.1.2-24. i386.rpm is installed. Run the following command:

# Rpm-qa | grep egcs

For installing egcs:

# Rpm-Uvh egcs-c ++-version. i386.rpm

2. Download the Postgresql source code package:

Postgresql has released version 7.0.2 so far:

Because ipvs7.0.2 does not support the RPM installation format, we only introduce the source code installation method.


3. Install Postgresql:

Because ipvs7.0.2 does not support RPM installation format, we only introduce the source code installation;

1. Unpack:

# Tar xzvf postgresql-7.0.2.tar.gz
# Cd postgresql-7.0.2

2. Create a postgresql user

Running PostgreSQL as root, bin, or other users with special permissions is not allowed due to security issues. This is the user who runs the server. For production, you can create an independent non-privileged user (commonly used ipvs)

# Useradd-M-o-r-d/var/lib/pgsql-s/bin/bash-c "PostgreSQL Server"-u 40 postgres

Modify the postgres user password and log on to the system as the postgres user;

3. Set compilation parameters:

$ CC = "egcs"

Go to the postgresql source file directory after unpacking:
$./Configure
Configure does not add any options. The system will install postgresql according to the default settings. You can use configure-help to view related options of configre.

Some of the most common ones are as follows:

-- Prefix = BASEDIR
Select a different base path for PostgreSQL installation. The default value is/usr/local/pgsql.

-- Enable-locale
If you want to use localization support.

-- Enable-multibyte
Multi-byte character encoding is allowed. This option is mainly used in languages such as Japanese, Korean, or Chinese.

-- With-perl
Add a Perl Module Interface. Note that the Perl interface is installed in a common location of the Perl module (typically in/usr/lib/perl). To use this option successfully, you must have the root permission.

-- With-odbc
Create an ODBC driver package.

-- With-tcl
Create the interface libraries and programs required by Tcl/Tk, including libpgtcl, pgtclsh, and pgtksh.

These compilation parameters tell the compiler how to compile PostgreSQL:

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.