OBSAH

(1) O3A01 - Postgres mandrake (16.02.2008)
(2) O3A02 - Suse (03.07.2010)
      O3A01 - Postgres mandrake
POSTGRESQL na MANDRAKE 9,2

tento postup je havarijni / orientacni
pouzijte pouze v pripade hospitalizace
vaseho systemoveho administratora
---------

POMUCKA

prikaz whereis initdb
vam rekne kde je initdb
napr. /usr/bin/initdb


ZALOZENI DATABAZE

su postgres
+ zadat heslo
pokud neznam tak si mohu zadat nove pod prihlasenim root

initdb -D /var/lib/pgsql/data4
zalozi data4

v souboru /var/lib/pgsql/data4/pg_hba.conf
odblokovat tento radek
#host all 127.0.0.1 255.255.255.255 trust

pg_ctl stop -D /var/lib/pgsql/data
postmaster -i -D /var/lib/pgsql/data4
nastartuje data4

createdb --encoding=latin2 eftools2012006
zalozi databazi pro rok 2006

PRI PRISTIM SPUSTENI POCITACE UZ STACI POUZE TOHLE

su postgres

pg_ctl stop -D /var/lib/pgsql/data
postmaster -i -D /var/lib/pgsql/data4
nemusite to opisovat, historie se vyvola sipka nahoru
Z 19.07.2006 O 16.02.2008 mkrvovyvevoda
      O3A02 - Suse
Instalace Suse 11.x

1. samba instalace
yast2 - v menu najdu polozku samba a spustim instalaci

2, postgresql - instalace

yast2 –install postgresql-server
rcpostgresql start
su postgres -c psql postgres
ALTER USER postgres WITH PASSWORD ‘postgres’;
ALTER ROLE
\q

3. postgresql - zastaveni a spusteni
pg_ctl stop -D /var/lib/pgsql/data
postmaster -i -D /var/lib/pgsql/data

4, ip adresa - nastaveni a vypis

[root@morgan]# ifconfig eth0 192.168.99.14 netmask 255.255.255.0 up
[root@morgan]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:80:C8:F8:4A:53
inet addr:192.168.99.14 Bcast:192.168.99.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0x5000

5, uzitecne informace

netstat - seznam procesu
ps - seznam procesu

select * from pg_user
pg_ctl start | rotatelogs /var/log/pgsql_log 86400

select VERSION()
napr-
PostgreSQL 8.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839], 32-bit
PostgreSQL 8.3.0, compiled by Visual C++ build 1400

useradd -m -p "" xavier

config samby na suse - /etc/samba/smb.conf

samba pridat - public = Yes

nastaveni postgresql 192.168.1.0 - 192.168.1.255
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
# IPv6 local connections:
host all all ::1/128 md5

Z 27.06.2010 O 03.07.2010