You are here:
Hades Wiki
>
DaqSlowControl Web
>
HadesDaqDocumentation
>
DetectorControlSystem
>
SCSArchiverCSStudio
>
SCSArchiverCSStudioPostgresInstallationSuse
(16 Jun 2016,
PeterZumbruch
)
(raw view)
E
dit
A
ttach
<!-- * Set ALLOWTOPICCHANGE = Main.HadesDaqSlowControlGroup * Set NOWYSIWYG = 1 * Set TINYMCEPLUGIN_DISABLE = 1 --> ---+!! _%CALC{$PROPERSPACE(%TOPIC%)}%_ <!-- * Set host = cbmdcs01 * Set port = 5432 * Set database = archive --> %STARTSECTION{name="abstract" type="section"}% %ENDSECTION{name="abstract" type="section"}% %STARTSECTION{name="header" type="include"}% %CALC{"$IF($EXACT(%INCLUDINGTOPIC%,%TOPIC%),,<div style="text-align:right;font-size:smaller">%TOPIC% <a href="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/%TOPIC%\">edit</a></div>)"}% <!-- * Set YES=%ICON{choice-yes}% * Set NO=%ICON{choice-no}% --> %ENDSECTION{name="header" type="include"}% %STARTSECTION{name="body" type="include"}% ---+++++ Installation <div style="margin-left:2ex"> ---++++++ install As ==root== %BR% %CODE{"bash"}% zypper install postgresql postgresql-jdbc postgresql-server %ENDCODE% Results in ... %INCLUDE{"ToolsHiddenSection" section="header - blank"}% <div style="margin-left:3em"><pre> Loading repository data... Reading installed packages... Resolving package dependencies... The following 7 NEW packages are going to be installed: libpq5 postgresql postgresql94 postgresql94-server postgresql-init postgresql-jdbc postgresql-server 7 new packages to install. Overall download size: 5.2 MiB. Already cached: 0 B. After the operation, additional 21.8 MiB will be used. Continue? [y/n/? shows all options] (y): y Retrieving package postgresql jdbc-9.4-3.2.noarch (1/7), 587.9 KiB (617.4 KiB unpacked) Retrieving: postgresql-jdbc-9.4-3.2.noarch.rpm ......................................................[done] Retrieving package libpq5-9.4.6-4.1.x86_64 (2/7), 159.5 KiB (464.6 KiB unpacked) Retrieving: libpq5-9.4.6-4.1.x86_64.rpm .................................................[done (3.2 MiB/s)] Retrieving package postgresql-init-9.4-6.1.noarch (3/7), 11.0 KiB ( 7.5 KiB unpacked) Retrieving: postgresql-init-9.4-6.1.noarch.rpm ......................................................[done] Retrieving package postgresql94-9.4.6-4.1.x86_64 (4/7), 1.1 MiB ( 4.2 MiB unpacked) Retrieving: postgresql94-9.4.6-4.1.x86_64.rpm .......................................................[done] Retrieving package postgresql94-server-9.4.6-4.1.x86_64 (5/7), 3.4 MiB ( 16.6 MiB unpacked) Retrieving: postgresql94-server-9.4.6-4.1.x86_64.rpm ....................................[done (6.6 MiB/s)] Retrieving package postgresql-9.4-1.1.noarch (6/7), 3.8 KiB ( 83 B unpacked) Retrieving: postgresql-9.4-1.1.noarch.rpm ...........................................................[done] Retrieving package postgresql-server-9.4-1.1.noarch (7/7), 3.8 KiB ( 83 B unpacked) Retrieving: postgresql-server-9.4-1.1.noarch.rpm ....................................................[done] Checking for file conflicts: ........................................................................[done] (1/7) Installing: postgresql-jdbc-9.4-3.2.noarch ....................................................[done] (2/7) Installing: libpq5-9.4.6-4.1.x86_64 ...........................................................[done] (3/7) Installing: postgresql-init-9.4-6.1.noarch ....................................................[done] Additional rpm output: Updating /etc/sysconfig/postgresql... (4/7) Installing: postgresql94-9.4.6-4.1.x86_64 .....................................................[done] (5/7) Installing: postgresql94-server-9.4.6-4.1.x86_64 ..............................................[done] (6/7) Installing: postgresql-9.4-1.1.noarch .........................................................[done] (7/7) Installing: postgresql-server-9.4-1.1.noarch ..................................................[done] </pre></div> %INCLUDE{"ToolsHiddenSection" section="trailer - blank"}% Then create the data directory: %CODE{"bash"}% mkdir -p /data/postgresql/9.4/data && chown postgres /data/postgresql/9.4/data %ENDCODE% And change to user ==postgres== %CODE{"bash"}%su - postgres %ENDCODE% Initialize Database Directory: %CODE{"bash"}% initdb -D /data/postgresql/9.4/data/ %ENDCODE% Results in ... %INCLUDE{"ToolsHiddenSection" section="header - blank"}% <div style="margin-left:3em"><pre> The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /data/postgresql/9.4/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting dynamic shared memory implementation ... posix creating configuration files ... ok creating template1 database in /data/postgresql/9.4/data/base/1 ... ok initializing pg_authid ... ok initializing dependencies ... ok creating system views ... ok loading system objects' descriptions ... ok creating collations ... ok creating conversions ... ok creating dictionaries ... ok setting privileges on built-in objects ... ok creating information schema ... ok loading PL/pgSQL server-side language ... ok vacuuming database template1 ... ok copying template1 to template0 ... ok copying template1 to postgres ... ok syncing data to disk ... ok WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: postgres -D /data/postgresql/9.4/data </pre></div> %INCLUDE{"ToolsHiddenSection" section="trailer - blank"}% Exit back to superuser ==root==: %CODE{"bash"}%exit %ENDCODE% Check and set boot option of service ==postgresql== %CODE{"bash"}%chkconfig -l postgresql%ENDCODE% <div style="margin-left:3em"><pre>postgresql 0:off 1:off 2:off 3:off 4:off 5:off 6:off</pre></div> %CODE{"bash"}%chkconfig postgresql on && chkconfig -l postgresql%ENDCODE%%BR% <div style="margin-left:3em"><pre>postgresql 0:off 1:off 2:off 3:on 4:off 5:on 6:off</pre></div> Edit ==/etc/sysconfig/postgresql== %CODE{"bash"}%vi /etc/sysconfig/postgresql%ENDCODE%%BR% Set ==POSTGRES_DATADIR== <div style="margin-left:3em"><pre> #POSTGRES_DATADIR="~postgres/data" POSTGRES_DATADIR="/data/postgresql/9.4/data" </pre></div> Change to user ==postgres== ... %CODE{"bash"}%su - postgres %ENDCODE% ... and edit the configuration file ==postgresql.conf==: * ==listen_addresses== %CODE{"bash"}%export PGDATA=/data/postgresql/9.4/data/ && vi $PGDATA/postgresql.conf%ENDCODE%%BR% <div style="margin-left:3em"><pre> #------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION #------------------------------------------------------------------------------ # - Connection Settings - #listen_addresses = 'localhost' # what IP address(es) to listen on; listen_addresses = '*' # what IP address(es) to listen on; </pre></div> ... followed by an edit of the file ==pg_hba.conf==: %CODE{"bash"}%$PGDATA/pg_hba.conf %ENDCODE%%BR% <div style="margin-left:3em"><pre> hostnossl archive archiver .gsi.de trust hostnossl archive report .gsi.de trust hostnossl archive archiver 10.203.0.0/16 trust hostnossl archive report 10.203.0.0/16 trust </pre></div> Back to superuser ==root==: %CODE{"bash"}%exit %ENDCODE% Start ==postgresql== as a _service_ %CODE{"bash"}%service postgresql start %ENDCODE% Become again user ==postgres== %CODE{"bash"}%su - postgres %ENDCODE% create test db and connect to it %CODE{"bash"}%createdb test && psql test%ENDCODE% --- </div> %ENDSECTION{name="body" type="include"}% %STARTSECTION{name="footer" type="include"}% %ENDSECTION{name="footer" type="include"}% --- -- Main.PeterZumbruch - 14 Jun 2016 --- <div style="text-align:right">%REVINFO{"-- $wikiusername - $date"}%</div>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r3 - 16 Jun 2016,
PeterZumbruch
DaqSlowControl
Log In
or
Register
Toolbox
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
BeginnersStartHere
TextFormattingRules
Macros
FormattedSearch
QuerySearch
DocumentGraphics
SkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
SiteTools
DefaultPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
DaqSlowControl
HODO
Homepages
InterWikis
Main
PionBeam
Sandbox
System
Български
_jméno_jazyka
Dansk
Deutsch
English
Español
Suomi
Français
Italiano
日本語
한글
Nederlands
Norsk
Polski
Português
Português brasileiro
Русский
Svenska
简体中文
正體中文
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Hades Wiki?
Send feedback
Imprint (in German)
Privacy Policy (in German)