Sziasztok.
!Most telepitettem eloszor Linux ala SQL-servert.
UHU 1.2 alatt most telepitettem a postgresql-server csomagot:
A tepelites kimenete ez :
apt-get install postgresql-server
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
postgresql-client tcl-postgresql
The following NEW packages will be installed:
postgresql-client postgresql-server tcl-postgresql
0 upgraded, 3 newly installed, 0 to remove and 19 not upgraded.
Need to get 3744KB of archives.
After unpacking 9520KB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
postgresql-client tcl-postgresql postgresql-server
Authentication warning overridden.
Get:1 http://ftp.uhulinux.hu ./ postgresql-client 7.4.6-4.2 [85,3KB]
Get:2 http://ftp.uhulinux.hu ./ tcl-postgresql 7.4.6-4.2 [30,3KB]
Get:3 http://ftp.uhulinux.hu ./ postgresql-server 7.4.6-4.2 [3629KB]
Fetched 3744KB in 2m16s (27,4KB/s)
Selecting previously deselected package postgresql-client.
(Reading database ... 140904 files and directories currently installed.)
Unpacking postgresql-client (from .../postgresql-client_7.4.6-4.2_i386.uhu) ...
Selecting previously deselected package tcl-postgresql.
Unpacking tcl-postgresql (from .../tcl-postgresql_7.4.6-4.2_i386.uhu) ...
Selecting previously deselected package postgresql-server.
Unpacking postgresql-server (from .../postgresql-server_7.4.6-4.2_i386.uhu) ...
Setting up postgresql-client (7.4.6-4.2) ...
Setting up tcl-postgresql (7.4.6-4.2) ...
Running ldconfig ...
Setting up postgresql-server (7.4.6-4.2) ...
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 C.
fixing permissions on existing directory /var/lib/postgres/data... ok
creating directory /var/lib/postgres/data/base... ok
creating directory /var/lib/postgres/data/global... ok
creating directory /var/lib/postgres/data/pg_xlog... ok
creating directory /var/lib/postgres/data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /var/lib/postgres/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema... ok
vacuuming database template1... ok
copying template1 to template0... ok
Success. You can now start the database server using:
/usr/bin/postmaster -D /var/lib/postgres/data
or
/usr/bin/pg_ctl -D /var/lib/postgres/data -l logfile start
Aztan probaltam inditani userkent az sql-servert igy:
anonym:~$ /usr/bin/postmaster -D /var/lib/postgres/data
FATAL: could not open file "/var/lib/postgres/data/PG_VERSION": Engedély megtagadva
Aztan:
root:/var/lib/postgres# chmod 777 data
es:
anonym:~$ /usr/bin/postmaster -D /var/lib/postgres/data
FATAL: data directory "/var/lib/postgres/data" has group or world access
DETAIL: Permissions should be u=rwx (0700).
A kerdesem az lenne,hogy mit kell beallitani es hol?
Es ha mar fut a server akkor hogy lehet egy klienset inditani?,hogy letrehozzak mondjuk egy tablat.
Koszi szepen.
- 1431 megtekintés
Hozzászólások
Szerintem csak rootként tudod elindítani. Az, hogy az indítóscriptjére - gondolom az - 777-es jogosultságokat állítottál be kevés, mert a szerver többi file-jához root jogosultságok kellenek. Rootként próbáld meg elindítani a rendszert. Valszeg működni fog. Amúgy nekem a meglátásom az, hogy UHU alatt nem érdemes a szerveres feladatok ellátását csomagokkal megoldani.
- A hozzászóláshoz be kell jelentkezni
ezt nem lehet nehez megerteni:
"FATAL: data directory "/var/lib/postgres/data" has group or world access
DETAIL: Permissions should be u=rwx (0700)."
chmod 700 /var/lib/postgres/data
- A hozzászóláshoz be kell jelentkezni
Nem tudtam hogy berakja a servicek koze...
Kozben sikerult igy elinditani:
root:~# service postgresql start
Starting PostgreSQL postmaster.
postmaster successfully started
root:~#
De milyen klienssel lehet hozzakapcsolodni?
Knoda -val probalkoztam,de nem jott ossze.
Ezt az uzenetet dobja:
Servermessage: could not connect to server: Kapcsolat elutasítva
Is the server running on host "192.168.24.14" and accepting
TCP/IP connections on port 5432?
- A hozzászóláshoz be kell jelentkezni
Valahol a /var/lib/postgres könyvtárban van a config fájl, abban engedélyezd a tcp kapcsolatot. A /etc alatt is van config, de azt nem veszi figyelembe.
- A hozzászóláshoz be kell jelentkezni
Beallitottam,de meg mindig nem tudok kapcsolodni,itt a config azon resze:
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------
# - Connection Settings -
tcpip_socket = true
max_connections = 100
# note: increasing max_connections costs about 500 bytes of shared
# memory per connection slot, in addition to costs from shared_buffers
# and max_locks_per_transaction.
#superuser_reserved_connections = 2
port = 5432
#unix_socket_directory = ''
#unix_socket_group = ''
#unix_socket_permissions = 0777 # octal
#virtual_host = '' # what interface to listen on; defaults to any
#rendezvous_name = '' # defaults to the computer name
# - Security & Authentication -
#authentication_timeout = 60 # 1-600, in seconds
#ssl = false
#password_encryption = true
#krb_server_keyfile = ''
#db_user_namespace = false
Meg mit kell beallitani?
Az inditas kimenete mindig ez:
service postgresql restart
Stopping PostgreSQL database: postmaster
No /usr/bin/postmaster found running; none killed.
Starting PostgreSQL postmaster.
postmaster successfully started
Es nincs a processzek kozott
anonym:~/SQ$ ps ax|grep sql
4290 pts/0 S 0:02 gedit ./postgresql.conf
4607 pts/1 S+ 0:00 grep sql
Koszonom.
- A hozzászóláshoz be kell jelentkezni