Forum Webscript.Ru

Общие => Базы данных => Тема начата: Elenka от 13 Апреля 2005, 11:08:38

Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 11:08:38
при ./configure

daet error:

...
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for optreset... no
checking for strtoll... yes
checking for strtoull... yes
checking for atexit... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... (cached) yes
checking test program... failed
configure: error:
*** Could not execute a simple test program.  This may be a problem
*** related to locating shared libraries.  Check the file \'config.log\'
*** for the exact reason.

скачано отсюда: http://ftp://ftp13.us.postgresql.org/mirror/postgresql/v8.0.2/postgresql-8.0.2.tar.gz
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 13:31:29
Elenka
какая ось?
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 14:03:11
red hat linux 9
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 14:30:50
Elenka
gcc установленно?
а вообще ставь из rpm ... и будет тебе счастье...
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 19:08:53
из рпм:

# rpm -ihv postgresql-8.0.1-2PGDG.i686.rpm
# rpm -ihv postgresql-server-8.0.1-2PGDG.i686.rpm
# rpm -ihv postgresql-devel-8.0.1-2PGDG.i686.rpm
# rpm -ihv postgresql-contrib-8.0.1-2PGDG.i686.rpm

далее:

# su - postgres
$ cd data
$ chmod u+w pg_hba.conf
>`pg_hba.conf\': No such file or directory

-bash-2.05b$ /usr/bin/postgres start
/usr/bin/postgres cannot access the server configuration file "/var/lib/pgsql/data/postgresql.conf": No such file or directory
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 19:09:10
что я делаю не так ?

спасибо!
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 19:23:55
Elenka
postgresql.conf в указанной директории есть?
initdb делала?
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 19:25:43
data dir voobshe pustaya
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 19:27:31
initdb сделай...
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 19:31:50
по этому мануалу  делаю: http://www.grape-info.com/doc/linux/config/postgresql-7.0.2.html

файл postgres вот тут: /usr/bin/postgres
/etc/init.d/postgres - этот не существует

при попытке создать юзера:

-bash-2.05b$ createuser dbuser
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
createuser: could not connect to database template1: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 19:35:09
-bash-2.05b$ initdb --pgdata=/var/lib/pgsql/data
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 UNICODE.

fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating directory /var/lib/pgsql/data/global ... ok
creating directory /var/lib/pgsql/data/pg_xlog ... ok
creating directory /var/lib/pgsql/data/pg_xlog/archive_status ... ok
creating directory /var/lib/pgsql/data/pg_clog ... ok
creating directory /var/lib/pgsql/data/pg_subtrans ... ok
creating directory /var/lib/pgsql/data/base ... ok
creating directory /var/lib/pgsql/data/base/1 ... ok
creating directory /var/lib/pgsql/data/pg_tblspc ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/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

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    postmaster -D /var/lib/pgsql/data
or
    pg_ctl -D /var/lib/pgsql/data -l logfile start
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 19:36:50
Elenka
иногда вообще полезно почитать и перевести, что тебе система отвечает...
man initdb !!!!
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 19:37:02
после следующих действий, снова не видит ДБ:

bash-2.05b$ createuser dbuser
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
createuser: could not connect to database template1: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 19:39:14
Elenka
translate.ru!!!
Success. You can now start the database server using:
postmaster -D /var/lib/pgsql/data
or
pg_ctl -D /var/lib/pgsql/data -l logfile start
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 19:40:25
Elenka
так запусти сервер!
Success. You can now start the database server using:
postmaster -D /var/lib/pgsql/data
or
pg_ctl -D /var/lib/pgsql/data -l logfile start
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 19:47:41
Elenka
и createuser не далай!

порядок действий после старта постгри:

root#su - postgres
psql -U postgres template1
>CREATE USER dbuser WITH ENCRYPTED PASSWORD \'secret\' NOCREATEDB NOCREATEUSER;
>CREATE DATABASE my_data WITH OWER=dbuser ENCODING=koi8\';
>\\q
psql -U dbuser my_data

и будет тебе счастье...
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 19:49:53
он запущен

любай команда, просто висит...

[root@srv root]# psql tmpdb


...и все, только CTRL+C
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 19:51:56
Elenka
[root@srv root]# su - postgres
psql -U postgres template1
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 20:05:16
commander
P.S. большое спасибо за помощь, разгребать это в одиночку просто голова уже кругом  ;(
Название: установка postgre
Отправлено: commander от 13 Апреля 2005, 20:09:53
Elenka
все остальное собралось нормально?
Название: установка postgre
Отправлено: Elenka от 13 Апреля 2005, 20:16:32
сделан юзер и ДБ, вроде без сбоев пока

и спасибо еще раз ! ;)