Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
pg-setup
Prev UpPostgres Pro Server ApplicationsHome Next

pg-setup

pg-setup — set up a newPostgres Pro database cluster and manage the corresponding service

Synopsis

pg-setupinitdb [initdb_options]

pg-setupfind-free-port

pg-setupset-server-portport

pg-setupsetparametervalue

pg-setupserviceservice_option

pg-setuptuneconf

Description

pg-setup is a shell script provided in thePostgres Pro distribution to automate database cluster setup on Linux systems. This script is provided as part of thepostgrespro-std-10-server package. OncePostgres Pro is installed, you can findpg-setup in theinstall-dir/bin directory, whereinstall-dir is/opt/pgpro/std-10.

pg-setup must be run as root, but performs database administration operations as userpostgres. You can run this script with different options to:

  • initialize the database cluster

  • check for available ports and change the port used byPostgres Pro server

  • change server configuration parameters

  • enable/disable automatic startup ofPostgres Pro service

  • start, stop, or restartPostgres Pro service

  • configure the database cluster for a specificPostgres Pro product

Options

pg-setup accepts the following command-line arguments:

initdb [initdb_options]

Initialize the database cluster on behalf of thepostgres user.

By default, the database cluster, configured for yourPostgres Pro distribution, is initialized in the/var/lib/pgpro/std-10/data directory, with checksums enabled,auth-local parameter set topeer, andauth-host parameter set tomd5. Localization settings are inherited from theLANG environment variable for the current session. All theLC_* environment variables are ignored. Optionally, you can provideinitdb options to customize the installation.

If the default database is created usingpg-setup, the path to its data directory is stored in the/etc/default/postgrespro-standard-10 file, so all the subsequentpg-setup commands, as well as any commands that managePostgres Pro service, affect this database only. You cannot manage several databases usingpg-setup.

find-free-port

Search for a free port on your system. This option is useful if you are going to install more than one server instance, or the default 5432 port is used by another program.

set-server-portport

Specify the port number on which the server will listen for connections. Use this option to avoid conflicts if you are installing more than one server instance on the same system.

Default: 5432

setnamevalue

Set the specified configuration parameter to the providedvalue in thepostgresql.conf file. If this parameter has been already defined by theALTER SYSTEM command, its previous value is removed from thepostgresql.auto.conf file.

serviceservice_option

ManagePostgres Pro service using one of the following options:

  • enable — enable automatic service startup upon system restart.

  • disable — disable automatic service startup upon system restart.

  • start — start the service.

  • stop — stop the service.

  • condrestart — restart the service if it is running whenpg-setup is invoked.

  • status — return thePostgres Pro service status.

tuneconf

Set the specified configuration for the database cluster. Predefined values ofconf depend on thePostgres Pro edition and can be1c,std orent. The value of1c can be specified for any product. By default, the database cluster is configured for yourPostgres Pro Standard edition. If you provide a value different from any predefined, the cluster will get non-customized configuration settings.

For systems where more than one database server and/or application will run, you may need to adjust the configuration sincepg_setup chooses the configuration settings depending on hardware characteristics, assuming that the system will use only one database server.

Notes

If you are installingPostgres Pro from thepostgrespro-std-10 package,pg-setup is invoked automatically with the default settings. As a result, the database cluster is initialized and the default database is created in the/var/lib/pgpro/std-10/data directory,Postgres Pro service autostart is enabled, and the service is started.

If you are installingPostgres Pro server directly from thepostgrespro-std-10-server package, you can run this script manually to initialize the database cluster or manage thePostgres Pro service.

For details on binary installation specifics on Linux, seeSection 16.1.


Prev Up Next
pg_rewind Home pg_test_fsync
epubpdf
Go to Postgres Pro Standard 10
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp