<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Forum PostgreSQL - Konfiguracja Posgresql na Fedora 11]]></title>
		<link>https://forum.postgresql.org.pl/viewtopic.php?id=285</link>
		<description><![CDATA[Najświeższe odpowiedzi w Konfiguracja Posgresql na Fedora 11.]]></description>
		<lastBuildDate>Wed, 07 Apr 2010 20:32:22 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Odp: Konfiguracja Posgresql na Fedora 11]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1931#p1931</link>
			<description><![CDATA[Nie wiem jak to robi Fedora, ale jeśli instalujesz PostgreSQLa w niektórych dystrybucjach z repo, to może się zdażyć, że samą bazę trzyma wówczas w [b]/var/lib/pgsql/data[/b] (sprawdź czy masz taki katalog), zaś [b]initdb[/b], [b]psql[/b] (i wszystko inne co zwykle siedzi w [b]/usr/local/pgsql/bin[/b]) możesz odnaleźć w systemowym katalogu /bin (lub poprzez dowiązania w nim utworzone). 
Jeśli by tak było, wówczas powinieneś mieć dostęp do [b]initdb[/b] bez podawania ścieżki. 
Jeśli zainstalowałeś PostgreSQLa poprawnie, to po wpisaniu poprostu initdb, polecenie powinno zostać odnalezione.
Jeśli nie, to spróbuj znaleźć je np. (wykonaną jako root) komendą wykonaną w powłoce Linuxa:
[code]find / -name initdb[/code]

Jeśli odnajdziesz [b]initdb[/b] to daj znać gdzie było, to polecimy dalej z konfiguracją.]]></description>
			<author><![CDATA[dummy@example.com (letni_deszczyk)]]></author>
			<pubDate>Wed, 07 Apr 2010 20:32:22 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1931#p1931</guid>
		</item>
		<item>
			<title><![CDATA[Odp: Konfiguracja Posgresql na Fedora 11]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1239#p1239</link>
			<description><![CDATA[1) Przede wszystkim wyszukaj sobie gdzie są te pliki (niestety każda dystrybucja ma swoje miejsce ich składowania)
tutaj w tutorialu miałes że sa w /usr/local/pgsql u ciebie są gdzieś indziej
2) Jak juz znajdziesz te pliki i założysz sobie użytkownika, i utworzysz katalog data (czy jak go tam nazwiesz) i nadasz prawa to pamietaj aby sobie ustawic zmienna PGDATA wskazujac ja na katalog który utworzysz.
3) Najlepiej jak dojdziesz dd sytuacji gdy wpisujac np polecenie 
[code]
initdb
[/code]
nie dostaniesz komunikatu nieznane polecenie.
4) Potem juz bedzie z górki.

Jakbys mial z czyms problem to wal.]]></description>
			<author><![CDATA[dummy@example.com (rski)]]></author>
			<pubDate>Thu, 03 Sep 2009 20:05:00 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1239#p1239</guid>
		</item>
		<item>
			<title><![CDATA[Odp: Konfiguracja Posgresql na Fedora 11]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1238#p1238</link>
			<description><![CDATA[Nie ma ich. Kurcze, tak do niczego nie dojdziemy. Czy może mi ktoś napisać krok po kroku jak skonfigurować po zainstalowaniu z pakietów? Nie wiem co powinno być, miałem nadzieję, że instalacja będzie automatyczna a ja tylko dodam użytkownika, jednak jest to nieco bardziej skomplikowane. :-(]]></description>
			<author><![CDATA[dummy@example.com (hardcorek)]]></author>
			<pubDate>Thu, 03 Sep 2009 19:35:33 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1238#p1238</guid>
		</item>
		<item>
			<title><![CDATA[Odp: Konfiguracja Posgresql na Fedora 11]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1237#p1237</link>
			<description><![CDATA[A sprawdziłeś czy są takie pliki jak  /usr/local/pgsql/bin/pg_ctl i /usr/local/pgsql/bin/initdb ?]]></description>
			<author><![CDATA[dummy@example.com (rski)]]></author>
			<pubDate>Thu, 03 Sep 2009 19:24:51 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1237#p1237</guid>
		</item>
		<item>
			<title><![CDATA[Odp: Konfiguracja Posgresql na Fedora 11]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1236#p1236</link>
			<description><![CDATA[[quote=sulavix][quote=hardcorek]
....
# adduser postgres
# mkdir /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data
# su - postgres
# /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
...
[/quote]

# su  postgres 
-bash-4.0$   /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data  start
-bash-4.0$   /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data  status

[quote]
....
-bash: /usr/local/pgsql/bin/initdb: Nie ma takiego pliku ani katalogu 
//initdb jest poleceniem nie plikiem ani katalogiem// 
Dalej już nic nie robię //szczesciarz//
[/quote][/quote]

Skoro -bash: /usr/local/pgsql/bin/initdb jest poleceniem to dlaczego wyskakuje powyższy błąd?
Po wpisaniu: 

# su  postgres
-bash-4.0$   /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data  start
pojawia się również  "Nie ma takiego pliku ani katalogu"]]></description>
			<author><![CDATA[dummy@example.com (hardcorek)]]></author>
			<pubDate>Thu, 03 Sep 2009 19:14:26 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1236#p1236</guid>
		</item>
		<item>
			<title><![CDATA[Odp: Konfiguracja Posgresql na Fedora 11]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1233#p1233</link>
			<description><![CDATA[[quote=hardcorek]
....
# adduser postgres
# mkdir /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data
# su - postgres
# /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
...
[/quote]

# su  postgres 
-bash-4.0$   /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data  start
-bash-4.0$   /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data  status

[quote]
....
-bash: /usr/local/pgsql/bin/initdb: Nie ma takiego pliku ani katalogu 
//initdb jest poleceniem nie plikiem ani katalogiem// 
Dalej już nic nie robię //szczesciarz//
[/quote]]]></description>
			<author><![CDATA[dummy@example.com (sulavix)]]></author>
			<pubDate>Thu, 03 Sep 2009 11:21:25 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1233#p1233</guid>
		</item>
		<item>
			<title><![CDATA[Konfiguracja Posgresql na Fedora 11]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1232#p1232</link>
			<description><![CDATA[Od dwóch dni próbuję skonfigurować Postgresql zaraz po instalacji i nie mogę tego zrobić. Przejrzałem kilka poradników, próbowałem sposobu z oficjalnego podręcznika dostepnego na stronie projektu i nie idzie. A najgorsze jest to, że nie wiem co robię nie tak. Poniżej dwa sposoby którymi próbowałem sobie poradzić.

1) Poradnik z forum fedora

Aplikację wraz z serwerem instaluję poleceniem
yum install postgresql postgresql-server
Po zainstalowaniu wklepuję jak poniżej
# adduser postgres
# mkdir /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data
# su - postgres
# /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
Po wpisaniu su - postgres pojawia się -bash-4.0$ a po wpisaniu ostatniej linii wyskakuje
-bash: /usr/local/pgsql/bin/initdb: Nie ma takiego pliku ani katalogu
Dalej już nic nie robię

2) Poradnik ze strony [url]http://www.adempiere.com/index.php/Install...with_PostgreSQL[/url]

Po zainstalowaniu wpisuję:
service postgresql initdb
service postgresql start
Edytuję plik /var/lib/pgsql/data/pg_hba.conf według zaleceń
Następnie:
service postgresql restart
passwd postgres (wpisuję hasło x)
psql -d template1 -U postgres
alter user postgres with password 'yourpostgresuserpassword' (podaję ponownie hasło x, próbowałem tez z hasłem y)
i pojawia się błąd krytyczny związany z błędnym hasłem. W międzyczasie przy startowaniu usług wyskakuje też w rogu ekranu alert SELinux

Co robię nie tak? Jak to prawidłowo skonfigurować? Powyższe czynności robiłem oddzielnie kilka razy ale za każdym razem usuwałem wcześniej Postgresql i foldery które tworzyły sie przy instalacji.

Komunikat SELinux wygląda następująco (nie wiem czy ma znaczący związek z problemem):
[code]
Podsumowanie

SELinux is preventing postmaster (postgresql_t) "append" to /var/lib/pgsql/pgstartup.log (var_lib_t).

Szczegółowy opis

SELinux denied access requested by postmaster. /var/lib/pgsql/pgstartup.log may be a mislabeled. /var/lib/pgsql/pgstartup.log default SELinux type is postgresql_log_t, but its current type is var_lib_t. Changing this file back to the default type, may fix your problem.

File contexts can be assigned to a file in the following ways.
Files created in a directory receive the file context of the parent directory by default.
The SELinux policy might override the default label inherited from the parent directory by specifying a process running in context A which creates a file in a directory labeled B will instead create the file with label C. An example of this would be the dhcp client running with the dhclient_t type and creates a file in the directory /etc. This file would normally receive the etc_t type due to parental inheritance but instead the file is labeled with the net_conf_t type because the SELinux policy specifies this.
Users can change the file context on a file using tools such as chcon, or restorecon.

This file could have been mislabeled either by user error, or if an normally confined application was run under the wrong domain.

However, this might also indicate a bug in SELinux because the file should not have been labeled with this type.

If you believe this is a bug, please file a bug report against this package.

Zezwalanie na dostęp
You can restore the default system context to this file by executing the restorecon command. restorecon '/var/lib/pgsql/pgstartup.log', if this file is a directory, you can recursively restore using restorecon -R '/var/lib/pgsql/pgstartup.log'.
Polecenie naprawyrestorecon '/var/lib/pgsql/pgstartup.log'
Dodatkowe informacje
Kontekst źródłowy:  unconfined_u:system_r:postgresql_t:s0
Kontekst docelowy:  unconfined_u:object_r:var_lib_t:s0
Obiekty docelowe:  /var/lib/pgsql/pgstartup.log [ file ]
Źródło:  initdb
Ścieżka źródłowa:  /usr/bin/initdb
Port:  <Nieznane>
Komputer:  majkel-linux
Źródłowe pakiety RPM:  postgresql-server-8.3.7-1.fc11
Docelowe pakiety RPM: 
RPM polityki:  selinux-policy-3.6.12-80.fc11
SELinux jest włączony:  True
Typ polityki:  targeted
MLS jest włączone:  True
Tryb wymuszania:  Enforcing
Nazwa wtyczki:  restorecon
Nazwa komputera:  majkel-linux
Platforma:  Linux majkel-linux 2.6.29.6-217.2.16.fc11.x86_64 #1 SMP Mon Aug 24 17:17:40 EDT 2009 x86_64 x86_64
Licznik alarmów:  20
Po raz pierwszy:  wto, 1 wrz 2009, 23:01:29
Po raz ostatni:  czw, 3 wrz 2009, 11:03:36
Lokalny identyfikator:  d6c8223a-26b8-4b38-9497-aa026e7b51da
Liczba wierszy:  

Surowe komunikaty audytu :

node=majkel-linux type=AVC msg=audit(1251968616.886:39): avc: denied { append } for pid=3699 comm="postmaster" path="/var/lib/pgsql/pgstartup.log" dev=dm-0 ino=188936 scontext=unconfined_u:system_r:postgresql_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file node=majkel-linux type=AVC msg=audit(1251968616.886:39): avc: denied { append } for pid=3699 comm="postmaster" path="/var/lib/pgsql/pgstartup.log" dev=dm-0 ino=188936 scontext=unconfined_u:system_r:postgresql_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file node=majkel-linux type=SYSCALL msg=audit(1251968616.886:39): arch=c000003e syscall=59 success=yes exit=0 a0=1bef6d0 a1=1bf1220 a2=1bf6050 a3=30 items=0 ppid=1 pid=3699 auid=500 uid=26 gid=26 euid=26 suid=26 fsuid=26 egid=26 sgid=26 fsgid=26 tty=(none) ses=1 comm="postmaster" exe="/usr/bin/postgres" subj=unconfined_u:system_r:postgresql_t:s0 key=(null)
[/code]]]></description>
			<author><![CDATA[dummy@example.com (hardcorek)]]></author>
			<pubDate>Thu, 03 Sep 2009 10:35:00 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1232#p1232</guid>
		</item>
	</channel>
</rss>
