Install postgresql using GentooemergeUSE

Source: Internet
Author: User
Tags psql seamonkey

This document describes how to install the software in Gentoo Linux by using postgreSQL as an example, and summarizes the USE flag.

1. Run emerge-pv postgresql-server to check the USE

[Plain]View plaincopyprint? # Emerge-pv postgresql-server
These are the packages that wocould be merged, in order:
Calculating dependencies... done! [Ebuild N] dev-db/postgresql-server-9.3.3 USE = "nls pam xml-doc-perl-pg_legacytimestamp-python (-selinux) -tcl-uuid "LINGUAS ="-af-cs-de-en-es-fa-fr-hr-hu-it-ko-nb-pl-pt_BR-ro-ru -sk-sl-sv-tr-zh_CN-zh_TW "3 kB
Total: 1 package (1 new), Size of downloads: 3 kB

------------------------------------------------------

[Appendix] Gentoo USE:

The simple understanding of USE is as follows: a software includes not only the software itself, but also its components, such as documentation, plug-ins, and GUI support. USE is used to mark whether to install the software and install these components at the same time.

Temporary USE:USE = "-java" emerge seamonkey

USE flag color
RED: enable
Blue: "-" is included in the front, indicating disable.
Green: enable, but there is no use flag
Yellow: none in the previous version. use flag added to this version
Parentheses (): use flag disabled on your platform

------------------------------------------------------

Set USE = "python" LINGUAS = "en zh_CN"

[Plain]View plaincopyprint? # USE = "python" LINGUAS = "en zh_CN" emerge-pv postgresql-server
These are the packages that wocould be merged, in order:
Calculating dependencies... done! [Ebuild N] dev-db/postgresql-server-9.3.3 USE = "nls pam python xml-doc-perl-pg_legacytimestamp (-selinux) -tcl-uuid "LINGUAS =" en zh_CN-af-cs-de-es-fa-fr-hr-hu-it-ko-nb-pl-pt_BR-ro-ru -sk-sl-sv-tr-zh_TW "3 kB

Total: 1 package (1 new), Size of downloads: 3 kB

Run: USE = "python" LINGUAS = "en zh_CN" emerge postgresql-server to install postgresql-server

[Plain]View plaincopyprint? USE = "python" LINGUAS = "en zh_CN" emerge postgresql-server is waiting for installation (it takes a long time to install it ..) [Plain]View plaincopyprint? * If you have users and/or services that you wocould like to utilize the * socket, you must add them to the 'second s' system group:
* Usermod-a-G postgres <user> *
* Before initializing the database, you may want to edit PG_INITDB_OPTS * so that it contains your preferred locale in:
*/Etc/conf. d/postgresql-9.3 *
* Then, execute the following command to setup the initial database * environment: * emerge -- config = dev-db/postgresql-server-9.3.3gt;> Auto-cleaning packages...

Follow the prompts to edit/etc/conf. d/postgresql-9.3 (you can directly use the default, do not make any changes, encountered problems and then change)

[Plain]View plaincopyprint?
# Configuration file location PGDATA = "/etc/postgresql-9.3 /"

# Data storage directory/to be created
DATA_DIR = "/var/lib/postgresql/9.3/data" # Optional options PG_INITDB_OPTS = "-- locale = en_US.UTF-8" Run: emerge -- config = dev-db/postgresql-server-9.3.3 as prompted [Plain]View plaincopyprint?
# Emerge -- config = dev-db/postgresql-server-9.3.3 ........
* The autovacuum function, which was in contrib, has been moved to the main * PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled
* By default. You can disable it in the cluster's: */etc/postgresql-9.3/postgresql. conf
** The PostgreSQL server, by default, will log events:
*/Var/lib/postgresql/9.3/data/postmaster. log *
* You should use the '/etc/init. d/postgresql-9.3 'script to run PostgreSQL * instead of 'pg _ ctl '. then, when the installation of the above command is complete, the prompt (You should use the '/etc/init. d/postgresql-9.3 'script to run PostgreSQL ):

Start postgreSQL service:/etc/init. d/postgresql-9.3 start

[Plain]View plaincopyprint? #/Etc/init. d/postgresql-9.3 start * Caching service dependencies... [OK]
*/Var/run/postgresql: creating directory */var/run/postgresql: correcting owner
* Starting PostgreSQL... [OK]
[Plain]View plaincopyprint? # Psql-U postgrespsql (9.3.3)
Type "help" for help.
Postgres = # \ lList of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges ----------- + ---------- + ------------- + -----------------------
Postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | = c/postgres +
| Postgres = CTc/postgrestemplate1 | postgres | UTF8 | en_US.UTF-8 | = c/postgres +
| Postgres = CTc/postgres (3 rows)

Postgres = #

1. Run emerge-pv postgresql-server to check the USE

[Plain]View plaincopyprint?
# Emerge-pv postgresql-server
These are the packages that wocould be merged, in order:
Calculating dependencies... done! [Ebuild N] dev-db/postgresql-server-9.3.3 USE = "nls pam xml-doc-perl-pg_legacytimestamp-python (-selinux) -tcl-uuid "LINGUAS ="-af-cs-de-en-es-fa-fr-hr-hu-it-ko-nb-pl-pt_BR-ro-ru -sk-sl-sv-tr-zh_CN-zh_TW "3 kB

Total: 1 package (1 new), Size of downloads: 3 kB

------------------------------------------------------

[Appendix] Gentoo USE:

The simple understanding of USE is as follows: a software includes not only the software itself, but also its components, such as documentation, plug-ins, and GUI support. USE is used to mark whether to install the software and install these components at the same time.

Temporary USE:USE = "-java" emerge seamonkey

USE flag color
RED: enable
Blue: "-" is included in the front, indicating disable.
Green: enable, but there is no use flag
Yellow: none in the previous version. use flag added to this version
Parentheses (): use flag disabled on your platform

------------------------------------------------------

Set USE = "python" LINGUAS = "en zh_CN"

[Plain]View plaincopyprint?
# USE = "python" LINGUAS = "en zh_CN" emerge-pv postgresql-server
These are the packages that wocould be merged, in order:
Calculating dependencies... done! [Ebuild N] dev-db/postgresql-server-9.3.3 USE = "nls pam python xml-doc-perl-pg_legacytimestamp (-selinux) -tcl-uuid "LINGUAS =" en zh_CN-af-cs-de-es-fa-fr-hr-hu-it-ko-nb-pl-pt_BR-ro-ru -sk-sl-sv-tr-zh_TW "3 kB

Total: 1 package (1 new), Size of downloads: 3 kB

Run: USE = "python" LINGUAS = "en zh_CN" emerge postgresql-server to install postgresql-server

[Plain]View plaincopyprint?
USE = "python" LINGUAS = "en zh_CN" emerge postgresql-server is waiting for installation (it takes a long time to install it ..)
[Plain]View plaincopyprint? * If you have users and/or services that you wocould like to utilize the * socket, you must add them to the 'second s' system group:
* Usermod-a-G postgres <user> *
* Before initializing the database, you may want to edit PG_INITDB_OPTS * so that it contains your preferred locale in:
*/Etc/conf. d/postgresql-9.3 *
* Then, execute the following command to setup the initial database * environment:
* Emerge -- config = dev-db/postgresql-server-9.3.3gt;> Auto-cleaning packages...

Follow the prompts to edit/etc/conf. d/postgresql-9.3 (you can directly use the default, do not make any changes, encountered problems and then change)

[Plain]View plaincopyprint?
# Configuration file location PGDATA = "/etc/postgresql-9.3 /"

# Data storage directory/to be created
DATA_DIR = "/var/lib/postgresql/9.3/data"
# Optional options PG_INITDB_OPTS = "-- locale = en_US.UTF-8" Run: emerge -- config = dev-db/postgresql-server-9.3.3 as prompted [Plain]View plaincopyprint?
# Emerge -- config = dev-db/postgresql-server-9.3.3 ........
* The autovacuum function, which was in contrib, has been moved to the main * PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled
* By default. You can disable it in the cluster's: */etc/postgresql-9.3/postgresql. conf
** The PostgreSQL server, by default, will log events:
*/Var/lib/postgresql/9.3/data/postmaster. log *
* You should use the '/etc/init. d/postgresql-9.3 'script to run PostgreSQL * instead of 'pg _ ctl '. then, when the installation of the above command is complete, the prompt (You should use the '/etc/init. d/postgresql-9.3 'script to run PostgreSQL ):

Start postgreSQL service:/etc/init. d/postgresql-9.3 start

[Plain]View plaincopyprint?
#/Etc/init. d/postgresql-9.3 start * Caching service dependencies... [OK]
*/Var/run/postgresql: creating directory */var/run/postgresql: correcting owner
* Starting PostgreSQL... [OK]
[Plain]View plaincopyprint? # Psql-U postgrespsql (9.3.3)
Type "help" for help.
Postgres = # \ lList of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges ----------- + ---------- + ------------- + -----------------------
Postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | = c/postgres +
| Postgres = CTc/postgrestemplate1 | postgres | UTF8 | en_US.UTF-8 | = c/postgres +
| Postgres = CTc/postgres (3 rows)

Postgres = #

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.