PostgreSQL UNIX/Linux
수동
설치
개요
업무적으로
여러
OS
에서
PostgreSQL
을
컴파일하여
사용하게
되면서
,
정리의
필요성을
느껴
몇자
적어보려고
한다
.
내용은
OS(AIX, HP
-
UX, Linux, Solaris, Unixware)
및
플랫폼
(x86, x86_64, ia64, ppc,
parisc, sparc)
에
따른
PostgreSQL
설치
시
발생한
에러와
그에
대한
해결
및
configure
와
make
등
옵션을
중점으로
기술한다
.
소스
tar
를
풀기
전에
필요한
라이브러리
(libreadline, libz
등
)
는
소스를
따로
받아
설치해둔다
.
대부분의
소스는
configure, make, make install
로
컴파일하여
설치하면
된다
. OS
별로
오픈소스
패키지들을
제공하는
사이트도
있으므로
OS
별
에러부분의
글을
보고
설치하여도
된다
.
의존성이
있는
라이브러리는
정적라이브러리를
사용
하여
바이너리
안에
포함하도록
하였다
. OS
에
기본적으로
설치되어
있는
의존성
라이브러리는
find
로
찾아
컴파일
시
참조하지
않도록
하기위해
이름을
변경하거나
임시
디렉토리에
백업을
해둔
후
컴파일을
하였다
. configure
시
기본포트를
변경하기
위해
--
with
-
pgport=5432
를
예로
기술하였으나
기술하지
않을
시
기본
포트인
5432
가
사용된다
.
--
enable
-
thread
-
safety
옵션
또한
주어야하는데
,
이름에서
유추할
수
있듯이
PostgreSQL
은
Muti
-
Thread
기반이
아닌
Prefork
방식으로서
각종
Client
등에서
Muti
-
Thread
동작
접근
시의
안전성을
위한
것으로
각종
Cluster
나
Pooler
들은
Muti
-
Thread
로
접근되어
추가를
요구한다
. PostgreSQL
소스
컴파일
시
미리
PostgreSQL
을
구동하기
위한
계정과
그룹을
생성하여
소스는
/usr/local/pgsql_src
과
같이
디렉토리를
만들어
chown
-
R
옵션을
사용하여
하
위디렉토리까지
소유자
및
소유
그룹을
PostgreSQL
계정으로
변경해둔다
. tar
풀기
, configure, make, make install
시
root
가
아닌
PostgreSQL
전용
계정으로
su
하여
실행한다
. root
로는
make
자체가
실행되지
않는다
.
이외에
각
OS
벤더의
컴파일러를
사용하여
컴파일을
하면
컴파일이
되지만
바이너리가
구동이
되지
않는
현상이
있었다
.
이때는
gcc
를
설치하여
해결하였다
.
그리고
make
는
gmake
를
사용하
여야
한다
.
1.
PostgreSQL
수동
설치
1.1.
PostgreSQL
다운
먼저
http://www.postgresql.org/ftp/source/
에서
최신버전의
PostgreSQL
을
적당한
장소에
다운받는다
.
1.2.
기초
환경
설정
▪
postgres
그룹과
사용자를
생성한
후
비밀번호를
세팅한다
.
그룹과
사용자
이름은
보안을
위해
dba
와
postgres
를
사용하지
않아도
된다
.
# groupadd dba
# adduser
-
d /database/postgres
-
g dba
-
c "PostgreSQL Master User"
-
m
-
s /bin/bash
postgres
# passwd postgres
▪
/usr/local/src/pgsql
와
/usr/local/pgsql
디렉토리를
생성한
후
퍼미션을
바꾼다
.
# mkdir /usr/local/src/pgsql
# chown
postgres.dba /usr/local/src/pgsql
# mkdir /usr/local/pgsql
# chown postgres.dba /usr/local/pgsql
▪
postgres
사용자로
“
–
“
옵션을
주어
su
하거나
postgres
사용자로
로그인
한다
.
# su
-
postgres
▪
postgres
사용자로
다운받은
소스파일을
/usr/local/src/pgsql
디렉토리로
이동시킨
후
압축을
해제한다
.
$ mv
postgresql
-
8.2.6.tar.gz /usr/local/src/pgsql
$ cd /usr/local/src/pgsql
$ tar xvfz postgresql
-
8.2.6.tar.gz
1.3.
PostgreSQL
설치
▪
postgres
사용자로
압축을
푼
디렉토리로
이동한다
.
$ cd /usr/local/pgsql/postgresql
-
8.2.6
▪
소스
컴파일을
위해
적당한
옵션을
주어
configure
를
실행한다
.
옵션
설명은
--
h
elp
옵션을
사용하면
볼
수
있다
.
$ ./configure
--
prefix=/usr/local/pgsql
\
--
enable
-
thread
-
safety
\
--
enable
-
depend
\
--
enable
-
nls=ko
\
--
with
-
openssl
\
--
with
-
python
\
--
with
-
perl
옵션은
다음과
같다
.
--
prefix :
기본적으로
대부분의
소스가
./configure
후
make;make install
을
하면
/usr/local
이나
특정위치로
설치된다
.
그렇게
되면
추가
파티션
이동이나
프로그램
파일
백업
등에
에러사항이
발생한다
.
이경우
유지보수
,
관리를
위해
prefix
를
이용해서
특정위치로
설치되게
지정해준다
. PostgreSQL
의
MakfeFile
에서는
uninstall
을
지원한다
.
--
enable
-
integer
-
datetimes enable 64
-
bit integer date/time support : 64Bit
숫자
,
날짜
,
시간지원여부로
일반적으로는
필요하지
않다
.
--
enable
-
nls[=LANGUAGES] :
시스템의
각종
출력
메세지에
대한
나라별
언어
지원으로
8.0
부터는
DSN
와
PostgreSQL
에서도
한글
메세지와
에러로그를
볼
수
있다
.
이
옵션은
복수
선택이
가능하며
,
디폴트로
추후
선택하거나
상황에
따라
Database
별로
설정
가능하다
.
지원
되는
NLS
종류
: http://developer.postgresql.org/~petere/nlsstatus/#t8
.0
-
branch
다중선택시
--
enable
-
nls='ko de'
같이
설정합니다
.
--
disable
-
shared : PostgreSQL
컴파일
시
공유라이브러리와
함께
컴파일하지
않겠다는
부분으로
하지않으면
성능은
좀
향상될수
있으나
상황에
따라
에러가
발생하는
시스템이
많을
것으로
기본적으로
사용하지
않기를
권장한다
.
--
enable
-
depend :
소스컴파일
시
의존성이
있는
파일이나
라이브러리에
대한
체크를
하는것으로
포함하지
않으면
,
컴파일
속
도는
다소
빨라지지만
현재의
주류
시스템에서는
체크를
해서
안전사용하는것도
좋은
예이다
--
enable
-
thread
-
safety : PostgreSQL
은
Muti
-
Thread
기반이
아니며
, Prefork
방식으로서
각종
Client
등에서
Muti
-
Thread
동작
접근
시의
안전성을
위한것으로
각종
Cluster
나
Pooler
들은
Muti
-
Thread
로
접근되어
추가를
요구하니
추가해준다
. V8.0
부터는
디폴트값이다
.
--
enable
-
thre
ad
-
safety
-
force :
--
enable
-
thread
-
safety
를
추가
하였는데
Thread Safe Test
에서
에러가
발생하였지만
에러는
그냥
무시하고
컴파일
할
때
필요한것으로
에러가
발생하면
에러원인을
찾아
주는것니
오동작을
막을
수
있다
.
--
with
-
docdir=DIR
--
without
-
docdir : Man Page
의
설치
관련
옵션으로
기본적으로
옵션을
주지
않으면
설치위치의
doc
디렉토리에
설치되지만
--
without
-
docdir
로
Man Page
설치를
하지
않거나
--
with
-
docdir
를
사용하여
특정위치로
설치가
가능하다
.
--
with
-
pgport=PORTNUM : PostgreSQL
의
기본
Service Port
는
5432
이나
만약에
외부에서
접근이
이루어지거나
하는
경우에는
변경을
해주는것이
좋다
.
따로
설정파일에서도
변경이
가능하다
.
--
with
-
tcl
--
with
-
tclconfig=DIR : Procedure Language
로
TCL
을
사용
시
옵션추가
,
따로
설치
위치는
주지
못하며
,
자동
검색을
한다
.
원할경우
소스수정이
이루어져야한다
.
--
with
-
perl : Procedure Language
로
Perl
을
사용
시
옵션추가
,
따로
설치
위치는
주지
못하며
,
자동
검색을
한다
.
원할경우
소스수정이
이루어져야한다
.
--
with
-
python : Procedure Language
로
Python
를
사용
시
옵션추가
,
따로
설치
위치는
주지
못하며
,
자동
검색을
한다
.
원할경우
소스수정이
이루어져야한다
.
--
with
-
krb4
--
with
-
krb5 : Kerberos
를
통한
접속
인증
시스템
사용을
원할
때에
추가
(
버전에
따라
추가
)
한다
.
--
with
-
pam : PAM(Pluggable Authentication Modules)
사용을
원할
때
추가한다
.
--
with
-
rendezvous : Apple
의
Rendezvous
인증처리를
원할
때
추가한다
.
--
with
-
openssl : SSL
인증처리를
원할
때
추가한다
.
--
without
-
readline : Command History
기능을
사용하지
않을때
추가한다
.
--
without
-
zlib : Zlip
사용을
하지
않을
시
추가
(
내부에서
압축관련
알고리즘이
필요
)
한다
.
--
with
-
includes=DIRS :
--
with
-
openssl,
--
with
-
python
등
자동검색하는
항목이
있는데
이의경우
prefix
등으로
따로
설치하였거나
특정위치의
C Header
파일을
참조하게
하고
싶을
때
추가한다
.
예
)
--
with
-
inc
ludes=/usr/local/ssl/include:/usr/local/python/include
--
with
-
libraries=DIRS :
--
with
-
includes
와
같이
Library
위치를
지정하고
싶을
때
사용한다
.
--
with
-
includes,
--
with
-
libraries
로
설정하면
configure
단계에서
우선적으로
참조한다
.
예
)
--
with
-
libraries=/usr/local/ssl/lib:/usr/local/python/lib
▪
configure
가
에러없이
종료된
후
make
를
사용하여
설치한다
.
$ make; make check; make install
▪
만약
root
사용자로
컴파일하여
설치하였다면
,
아래
명령을
실행한다
.
# chown
-
R postgres:dba /usr/local/pgsql
# cd /usr/local/pgsql
# chown
-
R root lib include
1.4.
PostgreSQL
환경설정
(Linux
기준
)
▪
root
사용자로
PostgreSQL
라이브러리의
컴파일
환경을
구성한다
.
# vi /etc/ld.so.conf
▫
아래
내용을
추가한다
.
/usr/local/pgsql/lib
# ldconfig
▪
또는
PostgreSQL
라이브러리를
사용한
응용프로그램의
컴파일
시점에
/usr/local/pgsql/lib
를
LD_LIBRARY_PATH, LD_LIBPATH
등에
추가하여
사용하면
된다
.
▪
root
사용자로
데이터베이스
파일이
저장될
디렉토리를
만든
후
postgres
의
소유로
바꾼다
.
데이터베이스가
저장될
곳은
저장공간이
넉넉한
다른
경로에
만들어도
된다
.
따로
만들지
않아도
아래에서
실행할
initdb
에
-
D
옵션으로
/usr/local/pgsql
경로를
주면
data
디렉토리가
만들어진다
.
또는
링크로
다른
경로를
바꿔줄
수도
있고
, postgresql.conf
에서
다른
경로로
지정할
수도
있다
.
# /usr/local/pgsq
l/data
# chown postgres.dba /usr/local/pgsql/data
▪
postgres
사용자의
환경변수를
설정한다
. bash, ksh, sh
쉘
사용자를
기준으로
설명한다
.
# vi /home/postgres/.bash_profile
▫
아래
내용을
추가한다
.
PATH=$PATH:/usr/local/pgsql/bin
MANPATH=/usr/local/pgsql/man
PGLIB=/usr/local/pgsql/lib
PGDATA=/usr/local/pgsql/data
export PATH MANPATH PGLIB PGDATA
▪
csh
쉘
사용자는
다음과
같이
환경변수를
설정한다
.
# vi /home/postgres/.cshrc
▫
아래
내용을
추가한다
.
setenv PATH $PATH:/usr/local/pgsql/bin
setenv MANPATH /usr/local/pgsql/man
setenv PGLIB /usr/local/pgsql/lib
setenv
PGDATA /usr/local/pgsql/data
▪
PostgreSQL
구동스크립트를
만들어
준
후
런레벨에
맞게
링크를
만들어준다
.
순서는
OS
환경에
맞춰
설정한다
.
# vi /etc/rc.d/init.d/postgresql
▫
아래
내용을
추가한다
.
#!/bin/sh
# Script to start and stop PostgreSQL
SERVER=/usr/local/pgsql/bin/postmaster
PGCTL=/usr/local/pgsql/bin/pg_ctl
PGDATA=/usr/local/pgsql/data
OPTIONS=
-
i
LOGFILE=/usr/local/pgsql/data/postmaster.log
case "$1" in
start)
echo
-
n "Starting PostgreSQL..."
su
-
l postgres
-
c "nohup $SERVER $OPTIONS
-
D $PGDATA >$LOGFILE 2>&1 &"
;;
stop)
ech
o
-
n "Stopping PostgreSQL..."
su
-
l postgres
-
c "$PGCTL
-
D $PGDATA stop"
;;
restart)
echo
-
n "Stopping PostgreSQL..."
su
-
l postgres
-
c "$PGCTL
-
D $PGDATA stop"
echo
-
n "Starting PostgreSQL..."
su
-
l postgres
-
c "nohup $SERVER $OPTIONS
-
D $PGDATA >$LOGFILE
2>&1 &"
;;
*)
echo "Usage : $0 {start|stop|restart}"
exit 1
;;
esac
exit 0
▫
리눅스를
기준으로
구동환경을
설정하는
방법은
다음과
같다
.
# ln
–
s /etc/rc.d/init.d/postgresql /etc/rc.d/rc0.d/K25postgresql
# ln
–
s /etc/rc.d/init.d/postgresql /etc/rc.d/rc1.d/K25postgresql
# ln
–
s
/etc/rc.d/init.d/postgresql /etc/rc.d/rc2.d/K25postgresql
# ln
–
s /etc/rc.d/init.d/postgresql /etc/rc.d/rc3.d/K25postgresql
# ln
–
s /etc/rc.d/init.d/postgresql /etc/rc.d/rc3.d/S25postgresql
# ln
–
s /etc/rc.d/init.d/postgresql /etc/rc.d/rc5.d/K25postgre
sql
# ln
–
s /etc/rc.d/init.d/postgresql /etc/rc.d/rc5.d/S25postgresql
# ln
–
s /etc/rc.d/init.d/postgresql /etc/rc.d/rc6.d/K25postgresql
1.5.
PostgreSQL
구동
▪
postgres
사용자로
로그인하여
initdb
명령어를
사용하여
데이터베이스
초기화를
한다
.
인코딩을
지정해주려면
“
--
encoding=utf
-
8
”
또는
“
--
encod
ing=euc
-
kr
”
같은
옵션이
필요하고
,
로케일을
지정하기
위해서는
“
--
locale=ko_kr
”
또는
“
--
no
-
locale
”
옵션
등이
필요하다
.
# initdb
-
E unicode
--
locale=ko_KR.UTF8
--
lc
-
messages=C
-
A md5
-
W
–
D /usr/local/pgsql
▫
옵션
설명
based on unicode (UTF8)
locale: Korean unicode
display message:
english
password encryption
initdb
는
파일명에서도
알
수
있듯이
DB
초기화
작업용
파일로
옵션은
다음과
같다
.
-
D : PostgreSQL
디비
생성
폴더위치로
현재
Shell
에서
PGDATA
로
설정한곳으로
자동으로
읽어오나
따로
설정하거나
추가적인
클러스터
(
디비환경
)
를
만들고
싶을때
지정하면
된다
.
-
E : PostgreSQL
의
기본적인
입출력
(
소팅포함
)
관련
기본
Encoding Set
을
정하는
것으로
한국의
경우는
EU
C_KR
로
설정할수가
있지만
EUC_KR
시에는
아햏해
,
쑣
등은
입력이
불가능하게
되며
,
메세지로
EUC_KR
에서
지원되지
않는
문자셋이라고
뜨게
된다
.
이런것을
미연에
방지하려면
UTF
-
8
로
설정을
해야한다
.
-
A :
기본적인
인증
처리부분은
pg_hda.conf
설정
부분을
참고한다
. trust (No
Password),password(text)
등이다
.
-
U :
현재의
postgres
계정이
아닌
다른
계정을
마스터
계정으로
쓸
때
사용한다
.
-
W :
PostgreSQL
은
기본적으로
마스터
계정에
대한
패스워드가
없다
.
이옵션을
넣어
패스워드를
초기
설정가능하다
.
--
locale
--
lc
-
collate : String sort order
--
lc
-
ctype : Character classification (What is a letter? Its upper
-
case equivalent?)
--
lc
-
messages : Language of messages
--
lc
-
monetary : Formatting of currency amounts
--
lc
-
numeric : Formatting of numbers
--
lc
-
time=LOCALE : Formatting of dates and times
지역화
설정으로
기본적으로
System OS
의
설정값으로
가져온다
.
메세지나
,
통화
(
돈
),
숫자표현이나
날짜
,
시간
등
각나라별
(
화폐표시
한국은
\
3,000 ,
미국은
$ 3,000
같은
형태
)
성정을
말한다
.
대부분
System OS
설정기준을
기준으로
한다
.
주의
:
여기서
주의
해야
하는것은
한글
환경으로
셋팅이된
OS
의
경우
COLLATE
가
ko_KR.eucKR
로
자동으로
잡히게
된다
.
이
경우
한글
정렬이나
like
연산시
index
를
검색하지않고
full scan
하는
문제가
있으며
, glibc
의
한글관련
문제로
아직은
패치가되지
않은
상태로
collate
를
C Type
로
잡아
주어야
한다
.
현재로써는
위와
같은
방법으로
해야
한글환경에서
정상적인
작동이
가능
하다
.
최신
버전에는
개선이
되었는지
확인하지
못하였다
.
▪
외부에서
접속이
가능하게
하기위해
pg_hba.conf
를
수정한다
. PostgreSQL
데몬이
구동중이라면
데몬을
재시작
할
필요는
없다
.
# vi /usr/local/pgsql/data/pg_hba.conf
▫
아래
내용을
추가한다
.
host all all 192.168.0.0/24 password
▪
서버의
IP
로
LISTEN
할
수
있게
IP
와
Port
를
설정한다
. lis
ten_address='*'
로
설정하면
,
서버의
IP
가
여러개일
때
모든
IP
로
listen
을
한다
. PostgreSQL
데몬이
구동중이라면
데몬을
재시작해야한다
.
기본
포트번호는
5432
이다
.
# vi /usr/local/pgsql/data/postgresql.conf
▫
아래
내용을
변경한다
.
listen_addresses = '192.168.0.97'
port = 5432
# /etc/rc.d/init.d/postgresql
restart
▪
PostgreSQL
데몬이
구동중이지
않다면
데몬을
구동시킨다
.
# /etc/rc.d/init.d/postgresql start
▪
데몬
확인
# ps x
PID TTY STAT TIME COMMAND
20667 pts/2 S 0:00
-
bash
27928 pts/2 S 0:00 /usr/local/pgsql/bin/postmaster
27930 pts/2 S 0:00 postgres: writer process
2793
1 pts/2 S 0:00 postgres: stats buffer process
27932 pts/2 S 0:00 postgres: stats collector process
▫
PostgreSQL
의
감시
데몬
프로세스인
“
postmaster
”
와
,
몇개의
postgres
프로세스가
기동하고
있는
것이
알
것이다
.
“
stats buffer process
”와
”
stats collector process
”
는
, PostgreSQL 7.2
이후로
추가된
,
퍼포먼스
정보
수집을
위한
프로세스이고
,
“
writer
”
는
지금
버젼으로
추가된
신기능으로
,
더티
페이지를
조금씩
디스크에
써내
,
디스크
액세스에
의한
지연을
가능한
한
평준화하는
책임을
다한다
.
1.6.
데이터베이스와
사용자
생성
▪
createuser
명령어를
사용하여
사용자를
생성한다
. postgres
는
임의의
이름이다
.
아래와
같이
명령어를
이용할
수도
있고
, psql
로
DB
에
접속하여
SQL
문으로도
만들
수
있다
.
$ createuser
--
pwprompt
--
encrypted
--
no
-
adduser
--
no
-
createdb postgres
옵션은
다음과
같다
.
-
a,
--
adduser :
유저생성권한
부여함
-
A,
--
no
-
adduser :
유저생성권한
부여않함
-
d,
--
createdb :
디비생성권한
부여함
-
D,
--
no
-
createdb :
디비생성권한
부여않함
-
P,
--
pwprompt :
신규
패스워드
질문
프롬프트
띄우기
-
E,
--
encrypted :
패스워드
암호화
(
디폴트
)
-
N,
--
unencrypted :
패스워드
비암호화
-
i,
--
sysid=SYSID :
내부
SysID (
자동
부여되므로
불필요
)
원격에
서버접속이나
상황에
따라쓰는
connection
옵션
-
h,
--
host=HOSTNAME :
서버
HostName
또는
IP , local
은
불필요
-
p,
--
port=PORT :
서버
Port
-
U,
--
username=USERNAME :
접속
유저명
(
유저생성권한이
있어야함
)
-
W,
--
password :
접속
패스워명
▪
createdb
명령어를
사용하여
데이터베이스를
생성한다
.
마지막
데이터베이스명은
임의의
이름이다
.
아래와
같이
명령어를
이용할
수도
있고
, psql
로
DB
에
접속하여
SQL
문으로도
만들
수
있다
.
$ createdb
--
encoding=UNICODE
--
owner=postgres testdb
옵션은
다음과
같다
.
-
D,
--
tablespace=TABLESPACE :
실제적인
데이터베이스의
저장
폴더
(
파티션
)
를
지정한
TableSpace
명을
지정하는것으로
Default
는
PGDATA
디렉토리가
된다
.
-
E,
--
encoding=ENCODING :
데이터베이스의
인코딩으로
inidb
시의
ENCODING
에
대해보면
되고
,
기본으로는
initdb
때
사용한
Encoding
을
따른다
.
-
O,
--
owner=OWNER :
데이터베이스의
Owner
즉
,
이
데이터베
이스의
Master User
-
T,
--
template=TEMPLATE :
템플릿
데이터베이스
선택
,
즉
데이터베이스
생성
시
기본적으로
복사할
각종
자료를
만들어둔
데이터베이스를
지정하면
된다
.
원격의
서버접속이나
상황에
따라쓰는
connection
옵션
-
h,
--
host=HOSTNAME :
서버
HostName
또는
IP , local
은
불필요
-
p,
--
port=PORT :
서버
Port
-
U,
--
username=USERNAME :
접속
유저
명
(
유저생성권한이
있어야함
)
-
W,
--
password :
접속
패스워명
2. Red Hat Linux release 7.2 (Enigma)
Redhat
계열
x86
플랫폼에
적용가능하며
, x86
플랫폼의
상위버전에서
사용할
수
있다
.
하위
버전에서
컴파일하여
상위
버전과
같이
쓰기
위해
Redhat
7.2
에서
컴파일을
하였으며
,
아래와
같은
에러들이
발생했었으며
,
컴파일한
바이너리로
RHEL 5
까지
사용가능함을
확인하였다
.
configure
를
실행하기
전에
LD_LIBRARY_PATH
에
/usr/local/lib
를
추가한다
.
export LD_LIBRARY_PATH=/usr/local/lib
libreadline 5.2
소스
컴파일하여
설치
.
libz 1.2.3
소스
컴파일하여
설치
.
libtermcap.a
는
디폴트로
설치되어
있는것
사용
./configure
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
enabl
e
-
nls=ko
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
2.1 8.2.6
소스에서는
아래
ma步k
에러
발생
gcc
-
O2
-
Wall
-
Wmissing
-
prototypes
-
Wpointer
-
arith
-
Winline
-
fno
-
strict
-
aliasing
-
pthread
-
D_REENTRANT
-
D_THREAD_SAFE
-
D_POSIX_PT
HREAD_SEMANTICS
-
fpic
-
shared
-
Wl,
-
soname,libpq.so.5
-
Wl,
--
version
-
script=exports.list fe
-
auth.o fe
-
connect.o fe
-
exec.o fe
-
misc.o
fe
-
print.o fe
-
lobj.o fe
-
protocol2.o fe
-
protocol3.o pqexpbuffer.o pqsignal.o
fe
-
secure.o md5.o ip.o wchar.o encnames.o noblock.
o pgstrcasecmp.o
thread.o strlcpy.o
-
L../../../src/port
-
lssl
-
lcrypto
-
lcrypt
-
lpthread
-
Wl,
-
rpath,'/usr/local/redpgsql/lib'
-
o libpq.so.5.0
/usr/bin/ld:exports.list:1: parse error in VERSION script
collect2: ld returned 1 exit status
make[3]: *** [libpq.
so.5.0] Error 1
make[3]: Leaving directory `/home/dckim/postgresql
-
8.2.6/src/interfaces/libpq'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/dckim/postgresql
-
8.2.6/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/
dckim/postgresql
-
8.2.6/src'
make: *** [all] Error 2
에러
해결을
위해
/home/dckim/postgresql
-
8.2.6/src/interfaces/libpq/Makefile
에서
아래와
같이
수정
#ifeq ($(PORTNAME), linux)
#$(shlib): exports.list
#exports.list: exports.txt
# echo '{ global:' >$@
# $(AWK) '/^[^#]/
{printf "%s;
\
n",$$1}' $< >>$@
# echo ' local: *; };' >>$@
#exported_symbols_list =
-
Wl,
--
version
-
script=exports.list
#endif
2.2
소스
8⸳⸱
에서도
8⸲⸶
소스와
같은
아래
에러
발생
echo '{ global:' >exports.list
gawk '/^[^#]/ {printf "%s;
\
n",$1}' exports.txt >>exports.li
st
echo ' local: *; };' >>exports.list
gcc
-
O2
-
Wall
-
Wmissing
-
prototypes
-
Wpointer
-
arith
-
Winline
-
fno
-
strict
-
aliasing
-
pthread
-
D_REENTRANT
-
D_THREAD_SAFE
-
D_POSIX_PTHREAD_SEMANTICS
-
fpic
-
shared
-
Wl,
-
soname,libpgtypes.so.3
-
Wl,
--
version
-
script=exports.l
ist numeric.o
datetime.o common.o dt_common.o timestamp.o interval.o
pgstrcasecmp.o
-
L../../../../src/port
-
L/usr/local/lib
-
lm
-
Wl,
-
rpath,'/usr/local/secpgsql/lib'
-
o libpgtypes.so.3.0
/usr/bin/ld:exports.list:1: parse error in VERSION script
collect2: ld
returned 1 exit status
make[4]: *** [libpgtypes.so.3.0] Error 1
make[4]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg/pgtypeslib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/
src/interfaces/ecpg'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src'
make: *** [all] Error 2
에러
해
결을
위해
/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg/pgtypeslib/Makefile
에서
아래와
같이
수정
#ifeq ($(PORTNAME), linux)
#$(shlib): exports.list
#exports.list: exports.txt
# echo '{ global:' >$@
# $(AWK) '/^[^#]/ {printf "%s;
\
n",$$1}' $< >>$@
# echo '
local: *; };' >>$@
#exported_symbols_list =
-
Wl,
--
version
-
script=exports.list
#endif
2.3
소스
8⸳⸱
에서
아래
에러
발생
echo '{ global:' >exports.list
gawk '/^[^#]/ {printf "%s;
\
n",$1}' exports.txt >>exports.list
echo ' local: *; };' >>exports.list
gcc
-
O2
-
Wall
-
Wmissing
-
prototypes
-
Wpointer
-
arith
-
Winline
-
fno
-
strict
-
aliasing
-
pthread
-
D_REENTRANT
-
D_THREAD_SAFE
-
D_POSIX_PTHREAD_SEMANTICS
-
fpic
-
shared
-
Wl,
-
soname,libecpg.so.6
-
Wl,
--
version
-
script=exports.list execute.o typename.o descriptor.o data.o
error.o pr
epare.o memory.o connect.o misc.o path.o pgstrcasecmp.o strlcpy.o thread.o
-
L../pgtypeslib
-
L../../../../src/interfaces/libpq
-
L../../../../src/port
-
L/usr/local/lib
-
lpgtypes
-
lpq
-
lm
-
lpthread
-
Wl,
-
rpath,'/usr/local/secpgsql/lib'
-
o libecpg.so.6.0
/usr/b
in/ld:exports.list:1: parse error in VERSION script
collect2: ld returned 1 exit status
make[4]: *** [libecpg.so.6.0] Error 1
make[4]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg/ecpglib'
make[3]: *** [all] Error 2
make[3]:
Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pg
sql_src/postgresql
-
8.3.1/src'
make: *** [all] Error 2
에러
해결을
위해
/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg/ecpglib/Makefile
에서
수정
#ifeq ($(PORTNAME), linux)
#$(shlib): exports.list
#exports.list: exports.txt
# echo '{ global:' >$@
# $(AWK)
'/^[^#]/ {printf "%s;
\
n",$$1}' $< >>$@
# echo ' local: *; };' >>$@
#exported_symbols_list =
-
Wl,
--
version
-
script=exports.list
#endif
2.4
소스
8⸳⸱
에서
아래
에러
발생
echo '{ global:' >exports.list
gawk '/^[^#]/ {printf "%s;
\
n",$1}' exports.txt >>exports.list
echo
' local: *; };' >>exports.list
gcc
-
O2
-
Wall
-
Wmissing
-
prototypes
-
Wpointer
-
arith
-
Winline
-
fno
-
strict
-
aliasing
-
pthread
-
D_REENTRANT
-
D_THREAD_SAFE
-
D_POSIX_PTHREAD_SEMANTICS
-
fpic
-
shared
-
Wl,
-
soname,libecpg_compat.so.3
-
Wl,
--
version
-
script=exports.list
informix.o
-
L../ecpglib
-
L../pgtypeslib
-
L../../../../src/interfaces/libpq
-
L../../../../src/port
-
L/usr/local/lib
-
lecpg
-
lpgtypes
-
lpq
-
lm
-
lpthread
-
Wl,
-
rpath,'/usr/local/secpgsql/lib'
-
o libecpg_compat.so.3.0
/usr/bin/ld:exports.list:1: parse error in
VERSION script
collect2: ld returned 1 exit status
make[4]: *** [libecpg_compat.so.3.0] Error 1
make[4]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg/compatlib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/lo
cal/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/sr
c'
make: *** [all] Error 2
에러
해결을
위해
/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg/compatlib/Makefile
에서
수정
#ifeq ($(PORTNAME), linux)
#$(shlib): exports.list
#exports.list: exports.txt
# echo '{ global:' >$@
# $(AWK) '/^[^#]/ {printf "%s;
\
n"
,$$1}' $< >>$@
# echo ' local: *; };' >>$@
#exported_symbols_list =
-
Wl,
--
version
-
script=exports.list
#endif
3. RHAS 4.0 : x86_64
/usr/include
의
readline, zconf.h, zlib.h
백업
후
패키지함
.
패키지
후
복원
/usr/lib
의
libreadline.so.4, libreadline.so.4.3, libz.a, libz
.so, libz.so.1, libz.so.1.2.1.2
백업
후
패키지
후
복원
libreadline 5.2
소스
설치함
.
libz 1.2.3
소스
설치함
.
libtermcap.so
는
/lib64/libtermcap.so
사용함
.
export LD_LIBRARY_PATH=/usr/local/lib
./configure
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
enabl
e
-
nls=ko
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
4. RHAS 4.0 : ia64
[root@AS40 pgsql_src]# ls
-
al /usr/lib/libtermcap.*
-
rw
-
r
--
r
--
1 root root 25804 Jun 16 2004 /usr/lib/libtermcap.a
lrwxrwxrwx 1 root root 2
9 May 9 2007 /usr/lib/libtermcap.so
-
> ../../lib/libtermcap.so.2.0.8
[root@AS40 pgsql_src]# ls
-
al /usr/lib/libreadline*
-
rw
-
r
--
r
--
1 root root 613340 Sep 3 2004 /usr/lib/libreadline.a
lrwxrwxrwx 1 root root 18 May 9 2007 /usr/lib/libreadline.so
-
> libread
line.so.4.3
lrwxrwxrwx 1 root root 18 May 9 2007 /usr/lib/libreadline.so.4
-
> libreadline.so.4.3
-
rwxr
-
xr
-
x 1 root root 400032 Sep 3 2004 /usr/lib/libreadline.so.4.3
[root@AS40 pgsql_src]# ls
-
al /usr/lib/libz.*
-
rwxr
-
xr
-
x 1 root root 158838 Sep 13 2004 /u
sr/lib/libz.a
lrwxrwxrwx 1 root root 15 May 9 2007 /usr/lib/libz.so
-
> libz.so.1.2.1.2
lrwxrwxrwx 1 root root 15 May 9 2007 /usr/lib/libz.so.1
-
> libz.so.1.2.1.2
-
rwxr
-
xr
-
x 1 root root 135256 Sep 13 2004 /usr/lib/libz.so.1.2.1.2
/usr/include
의
readline, z
conf.h, zlib.h, zutil.h
파일
백업
후
패키지
후
복원
/usr/lib
의
libreadline.so, libreadline.so.4, libreadline.so.4.3, libtermcap.so, libz.a, libz.so, libz.so.1,
libz.so.1.2.1.2
파일
백업
후
패키지
후
복원
libreadline 5.2
소스
커파일
설치
: /usr/local/lib
의
libreadline.so libreadline.s
o.5 libreadline.so.5.2
백업
후
패키지
후
복원
zlib 1.2.3
소스컴파일
설치
:
정적라이브러리만
설치됨
.
./configure
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
enable
-
nls=ko
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
5
. AIX 4.3.3
AIX
의
의존성
패키지는
아래
사이트에서
다운받을
수
있다
.
http://www.bullfreeware.com
http://www
-
03.ibm.com/systems/power/software/aix/linux/index.html
readline 5.2
소스설치
GNU make
설치
bison :
패키지
버전이
낮아
삭제함
.
flex
xlc
를
사용하여
컴파일한
바이너리로는
구동이
되지
않아
gcc 3.3
설치하여
컴파일함
PostgreSQL
유저의
디렉토리를
만든후
tar
푼
후
PATH(cc
및
/usr/local/bin
추가
)
에
root
와
같게
환경설정
z
lib 1.1.4
로
새로
설치함
.
동적
라이브러리는
패키지시
리네임한
후
패키지함
.
readline 5.2
로
소스설치함
.
패키지
한
후
삭제함
.
libtermcap.a
설치안되어
있고
,
패키지
없어서
설치안함
.(
패키지가
알아서
/usr/lib/libcurses.a
로
사용함
.)
export PATH=$PATH:/usr/local/bin:/usr/vac/bin
PATH=/informix/IDS/bin:/usr/bin:/etc:/usr/sbin:/usr
/ucb://bin:/usr/bin/X11:/sbin:/usr/vac/bin:.:/
usr/local/bin
export LD_LIBRARY_PATH=$LD_LIBRARY:/usr/local/lib
./configure CC=gcc
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
6. AIX 5.1
export
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java130/jre/bin:/usr/java130/bin:/
usr/vac/bin:/usr/local/bin
export LD_LIBRARY_PATH=/usr/local/lib
xlc
사용
GNU make
flex
bison :
패키지
버전이
낮아
삭제함
.
rea
dline 5.2
소스컴파일
설치
(
정적라이브러리
사용
)
zlib 1.2.3
소스컴파일
설치
후
패키지
후
삭제함
.
./configure CC=cc
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
7. AIX 5.2
gcc
사용
(
설치되어
있었음
)
gettext
-
0.10.40
-
8.aix5.2.ppc.rpm
bison
-
1.875
-
3.aix5.1.ppc.rpm
gzip
-
1.2.4a
-
10.aix5.2.ppc.rpm
flex
-
2.5.4a
-
6.aix4.3.ppc.rpm
zlib
-
1.2.3
-
4.aix5.2.ppc.rpm ;
설치하였는데
, rpm
명령어에
의존적이라
삭제안됨
.
패키지
만들
때
/opt/freeware/lib/libz.a
를
참조하지
않게
리네임
하여
백업
후
패키지함
.
read
line 5.2
소스컴파일
설치
(
정적라이브러리
사용
)
zlib 1.2.3
소스컴파일
설치
(
정적라이브러리
사용
)
/usr/lib
의
libz.a
-
> ../../opt/freeware/lib/libz.a
백업
후
패키지
후
복원
export
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java131/jre/bin:/usr/java131/bin:/
usr/vac/bin:/usr/local/
bin
export LD_LIBRARY_PATH=/usr/local/lib
./configure CC=gcc
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
8. AIX 5.3
xlc
사용
make
-
3.80
-
1.aix5.1.ppc.
rpm
bison
-
1.875
-
3.aix5.1.ppc.rpm
gettext
-
0.10.40
-
8.aix5.2.ppc.rpm
flex
-
2.5.4a
-
6.aix4.3.ppc.rpm
zlib 1.2.3
소스컴파일
설치
후
패키지
한
후
삭제함
. /opt/freeware/lib/libz.a
리네임
후
패키지한
후
복구
.
readline 5.2
소스컴파일
설치
후
패키지
한
후
삭제함
.
/opt/freeware/bin
의
명령어들이
모두
/usr/bin
에
링크가
되어
있음
.
export
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/us
r/java131/jre/bin:/usr/java131/bin:/usr/vac/bin:/usr/local/bin
export LD_LIBRARY_PATH=/usr/local/lib
./configure CC=cc
--
prefix=/usr/local/pgsql
--
e
nable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
5300
-
03
미만
버전은
/usr/include/sys/socket.h
의
_SS_MAXSIZE
를
1280
으로
고친
후
컴파일해야함
.
수정하지
않을
시
PostgreSQL
구동이
안된다
. AIX
버그이다
.
9. AIX 6.1
x
lc
사용
make
-
3.80
-
1.aix5.1.ppc.rpm
bison
-
1.875
-
3.aix5.1.ppc.rpm
gettext
-
0.10.40
-
8.aix5.2.ppc.rpm
flex
-
2.5.4a
-
6.aix4.3.ppc.rpm
zlib 1.2.3
소스컴파일
설치
후
패키지
한
후
삭제함
. /opt/freeware/lib/libz.a
리네임
후
패키지한
후
복구
.
readline 5.2
소스컴파일
설치
후
패키지
한
후
삭제함
.
/opt/freeware/bin
의
명령어들이
모두
/usr/bin
에
링크가
되어
있음
.
export
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin:/usr/
vac/bin
export LD_LIBRARY_PATH=/usr/local/lib
./configure CC=cc
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
en
able
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
10. HP
-
UX 11.00
HP
-
UX
의존성
패키지는
http://hpux.cs.utah.edu
에서
다운
받을
수
있었는데
,
링크
확인겸
재방문을
해보니
시스템
고장으로
지금은
다운을
받을
수가
없다고
한다
.
/usr/local/libtermcap.a :
정적라이브러리
gettext
-
0.14.1
-
sd
-
11.00.depot :
설치되어
있었음
make
-
3.80
-
sd
-
11.00.depot :
패키지
설치
libiconv
-
1.9.2
-
sd
-
11.00.depot :
설치되어
있었음
snprintf
-
2.2
-
src
-
11.11.tar :
소스설치
readline
-
5.2.tar :
소스설치
export PATH=$PATH:/usr/local/bin
export L
D_LIBRARY_PATH=/usr/local/lib
./configure CC=cc CFLAGS=+DAportable
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
11. HP
-
UX 11.11
/usr/local/libter
mcap.a :
정적라이브러리
/usr/local/lib
의
libreadline.sl
과
libz.sl
리네임
후
패키지
함
.
bison
-
2.3
-
hppa
-
11.11.depot
flex
-
2.5.35
-
hppa
-
11.11.depot
gettext
-
0.17
-
hppa
-
11.11.depot
libiconv
-
1.12
-
hppa
-
11.11.depot
make
-
3.81
-
hppa
-
11.11.depot
readline
-
5.2
-
hppa
-
11.11.depot
zlib
-
1.2.3
-
hppa
-
11.11.depot
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=/usr/local/lib
./configure CC=cc CFLAGS=+DAportable LDFLAGS="
-
L/usr/lib
-
lpthread"
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includ
es=/usr/local/include
--
with
-
libraries=/usr/local/lib
12. HP
-
UX 11.23 ia64
libtermcap
은
정적라이브러리로
패키지함
.
/usr/local/lib/hpux32
밑의
libtermcap.so, libreadline.so, libz.so
리네임
후
패키지함
.
readline
-
5.2
-
ia64
-
11.23.depot.gz
설치
export PATH=$PATH:/usr/local/bin
expo
rt LD_LIBRARY_PATH=/usr/local/lib/hpux32
12.1 configure
시
아래
에러
발생
ld: (Warning) Unsatisfied symbol "__divdi3" in file /usr/lib/hpux32/libncurses.so
ld: (Warning) Unsatisfied symbol "__divdf3" in file /usr/lib/hpux32/libncurses.so
ld: (Warning) Unsatisfi
ed symbol "__moddi3" in file /usr/lib/hpux32/libncurses.so
/usr/lib/hpux32/dld.so: Unable to find library 'libintl.so'
gettext
최신버전으로
재설치
12.2 gcc
실행
시
아래
에러
발생
[u@h W]$gcc
/usr/lib/hpux32/dld.so: Unsatisfied code symbol 'pthread_create' in load module
'/usr/local/lib/hpux32/libintl.so'.
Killed
3 warnings.
ld: (Warning) Potential unresolved symbol "__divdi3":
shared library reference is resolved to non
-
exported
definition in file "/opt/hp
-
gcc
-
4.1.2/lib/gcc/ia64
-
hp
-
hpux11.23/4.1.2/libgcc.a[__divdi3.o]".
l
d: (Warning) Potential unresolved symbol "__divdf3":
shared library reference is resolved to non
-
exported
definition in file "/opt/hp
-
gcc
-
4.1.2/lib/gcc/ia64
-
hp
-
hpux11.23/4.1.2/libgcc.a[__divdf3.o]".
ld: (Warning) Potential unresolved symbol "__moddi3":
sha
red library reference is resolved to non
-
exported
definition in file "/opt/hp
-
gcc
-
4.1.2/lib/gcc/ia64
-
hp
-
hpux11.23/4.1.2/libgcc.a[__moddi3.o]".
3 warnings.
gcc
-
ia64
-
4.1.2.depot.gz
설치로
해결
12.3 make
시
아래
에러
발생
gmake[5]: Entering directory `/usr/local/pgsql_
src/postgresql
-
8.2.6/src/interfaces/ecpg/test/connect'
sed
-
e 's,@TEMP_PORT@,511106,g'
\
test1.pgc.in >test1.pgc
../../preproc/ecpg
-
I./../../include
-
o test1.c
-
I. test1.pgc
/usr/lib/hpux32/dld.so: Unable to find library 'libreadline.so'.
gmake[5]: *** [t
est1.c] Killed
gmake[5]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.2.6/src/interfaces/ecpg/test/connect'
gmake[4]: *** [all] Error 2
gmake[4]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.2.6/src/interfaces/ecpg/test'
gmake[3]: *** [all]
Error 2
gmake[3]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.2.6/src/interfaces/ecpg'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.2.6/src/interfaces'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving di
rectory `/usr/local/pgsql_src/postgresql
-
8.2.6/src'
gmake: *** [all] Error 2
export LD_LIBRARY_PATH=/usr/local/lib/hpux32
로
해결
, configure
하기전에
export
해야한다
.
./configure CC=gcc LDFLAGS="
-
L/usr/lib
-
lpthread"
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib/hpux32
13. HP
-
UX 11.31 ia64
libtermcap
정적라이브러리로
재패키지함
.
readline
-
5.2
-
ia64
-
11.31.depot.gz
zlib
-
1.2.3
-
ia64
-
11.31.depot.gz
termcap
-
1.3.1
-
ia64
-
11.31.depot
bison
-
2.3
-
ia64
-
11.31.depot
flex
-
2.5.33
-
ia64
-
11.31.depot
gcc
-
4.1.2
-
ia64
-
11.31.depot
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=/usr/local/lib/hpux32
13.1 initdb
실행
시
아래
에러
발생
$ initdb
-
E UTF
-
8
--
no
-
locale
-
A trust
-
W
-
D /usr/local/pgsql/dat
a
/usr/lib/hpux32/dld.so: Unable to find library 'libtermcap.so'.
export LD_LIBRARY_PATH=/usr/local/lib/hpux32
로
해결
,
기본적으로
OS
에
포함되는
라이브러리로
보임며
, configure
하기전에
export
도
해야함
.
./configure CC=gcc LDFLAGS="
-
L/usr/lib
-
lpthread"
--
prefix=/usr/local/pgsql
--
ena
ble
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib/hpux32
14. HP
-
UX 11.31 PA
-
RISC
/usr/lib/libtermcap.a
가
기본으로
있고
, /usr/local/lib/hpux32
에도
있으나
/usr/lib
의
정적라이브러리가
사용됨
.
make
-
3.81
-
hppa
-
11.31.depot :
설치되어
있었음
gcc
-
4.2.1
-
hppa
-
11.31.depot :
설치되어
있었음
gettext
-
0.16.1
-
hppa
-
11.31.depot :
설치되어
있었음
readline
-
5.2
-
hppa
-
11.31.depot
bison
-
2.3
-
hppa
-
11.31.depot
libiconv
-
1.11
-
hppa
-
11.31.depot :
설치되어
있었음
termcap
-
1.3.1
-
hppa
-
11.31.depot :
설치되어
있었음
flex
-
2.5.35
-
hppa
-
11.31.depot
zlib
-
1.2.3
-
hppa
-
11.31.depot
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=/usr/local/lib
14.1 make
시
에러
발생
gcc V4.1.2
설치로
컴파일
에러
해결
: cc
로
컴파일
시
알
수
없는
에러
발생
,
에러내용
백업해두지
않았음
./configure CC=gcc
--
prefix=/usr/local/pgsql
--
enabl
e
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
15. HP
-
UX 11.23 PA
-
RISC
/usr/lib/libtermcap.a
가
기본으로
있음
.
bison
-
2.3
-
hppa
-
11.23.depot
flex
-
2.5.35
-
hppa
-
11.23.depot
readline
-
5.2
-
hppa
-
11.2
3.depot
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=/usr/local/lib
./configure CC=gcc
--
prefix=/usr/local/secpgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=11106
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
1
5.1 PostgreSQL V8.3.1
소스를
g捣cV4.2⸲
로
컴파일
시
에러
발생
gcc
-
O2
-
Wall
-
Wmissing
-
prototypes
-
Wpointer
-
arith
-
Winline
-
Wdeclaration
-
after
-
statement
-
Wendif
-
labels
-
fno
-
strict
-
aliasing
-
fwrapv
-
Wno
-
error
-
pthread
-
D_REENTRANT
-
D_THREAD_SAFE
-
D_POSIX_PTHREAD_SEMANT
ICS
-
I../include
-
I../../../../src/interfaces/ecpg/include
-
I.
-
DMAJOR_VERSION=4
-
DMINOR_VERSION=4
-
DPATCHLEVEL=0
-
I../../../../src/include
-
D_XOPEN_SOURCE_EXTENDED
-
I/usr/local/include
-
c
-
o preproc.o preproc.c
-
MMD
-
MP
-
MF .deps/preproc.Po
pgc.c:3862: wa
rning: 'yy_flex_realloc' defined but not used
y.tab.c: In function 'base_yyparse':
y.tab.c:32385: internal compiler error: in delete_output_reload, at reload1.c:7932
Please submit a full bug report,
with preprocessed source if appropriate.
See <
URL:http://gcc.gnu.org/bugs.html
> for instructions.
gmake[4]: *** [preproc.o] Error 1
gmake[4]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg/preproc'
gmake[3]: *** [all] Error 2
gmake[3]:
Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces/ecpg'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/interfaces'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/local
/pgsql_src/postgresql
-
8.3.1/src'
gmake: *** [all] Error 2
15.2 cc
로
컴파일
시
아래
에러
발생
./configure CC=cc
--
prefix=/usr/local/secpgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=11106
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
cc
-
Ae +O2
-
I../../../../src/include
-
D_XOPEN_SOURCE_EXTENDED
-
I/usr/local/include
-
c
-
o elog.o
elog.c
cc: error 1405: "/opt/ansic/lbin/ccom" terminated abnormally with signal 11.
gmake[4]: *** [elog.o] Error 9
gmake[4]: *** Deleting file `elog.o'
gmake[4
]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/backend/utils/error'
gmake[3]: *** [error
-
recursive] Error 2
gmake[3]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/backend/utils'
gmake[2]: *** [utils
-
recursive] Error 2
gmake
[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src'
gmake: *** [all] Error 2
14.2, 14.2 gcc 4.1.2
로
설치하여
해결
16. Solaris 6 sparc
솔라리
스
의존성
패키지는
http://www.sunfreeware.com
에서
다운받을
수
있다
.
gettext
-
0.14.1
-
sol26
-
sparc
-
local
readline
-
5.2
-
sol26
-
sparc
-
local
termcap
-
1.3
-
sol26
-
sparc
-
local
zlib
-
1.2.3
-
sol26
-
sparc
-
local :
버전이
낮아
재설치
make
-
3.81
-
sol26
-
sparc
-
l
ocal
setenv PATH
/bin:/usr/bin:/opt/SUNWspro/SC5.0/bin:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/ucb:/usr/s
bin:/etc:.
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
Makefile.global
파일의
LIBS
에
-
lnsl
추가해야
컴파일
된다
.
16.1 make
무한루프
find ./
소스디렉토리
-
prin
t | xargs touch
로
소스
디렉토리
시간
맞춰준다
.
16.2 initdb
실행
시
아래
에러
발생
./initdb
-
E UTF
-
8
--
no
-
locale
-
A trust
-
W
-
D /usr/local/secpgsql/data
The files belonging to this database system will be owned by user "secdb".
This user must also own the server process.
The
database cluster will be initialized with locale C.
creating directory /usr/local/secpgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ... 400kB/20000
creating configura
tion files ... ok
creating template1 database in /usr/local/secpgsql/data/base/1 ... FATAL: could not create shared
memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=1, size=1662976, 03600).
HINT: This error usually means that Post
greSQL's request for a shared memory segment exceeded
your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel
with larger SHMMAX. To reduce the request size (currently 1662976 bytes), reduce PostgreSQL's
shared_buff
ers parameter (currently 50) and/or its max_connections parameter (currently 10).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN
parameter, in which case raising the request size or reconfiguring SHMMIN is cal
led for.
The PostgreSQL documentation contains more information about shared memory configuration.
child process exited with exit code 1
initdb: removing data directory "/usr/local/secpgsql/data"
아래와
같이
/etc/system
파일에
공유메모리
설정을
해주어야함
.
설정변경
후
서버
재부팅해야
적용됨
.
Solaris 6, 7, 8
은
/etc/system
설정해주어야
initdb
실행됨
.
Solaris
At least in version 2.6, the default maximum size of a shared memory segments is too low for
PostgreSQL.
The relevant settings can be changed in /etc/system, for example:
set shmsys:shminfo_shmmax=
0x2000000
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=256
set shmsys:shminfo_shmseg=256
set semsys:seminfo_semmap=256
set semsys:seminfo_semmni=512
set semsys:seminfo_semmns=512
set semsys:seminfo_semmsl=32
You need to reboot for the changes to
take effect.
See also
http://sunsite.uakom.sk/sunworldonline/swol
-
09
-
1997/swol
-
09
-
insidesolaris.html
for
information
on shared memory under Solaris.
/etc/system
을
/etc/system.orig
로
백업해둠
.
setenv PATH "/usr/local/secpgsql/bin:$PATH"
setenv LD_LIBRARY_PATH "/usr/local/secpgsql/lib:$LD_LIBRARY_PATH"
/etc/system
설정
변경
후
initdb
시
내용
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pa
ges ... 24MB/153600
./configure CC=cc LDFLAGS="
-
L/usr/lib
-
lpthread
-
lnsl"
--
prefix=/usr/local/pgsql
--
enable
-
depend
--
enable
-
thread
-
safety
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
17. Solaris 7 sparc
expat
-
2
.0.1
-
sol7
-
sparc
-
local
gettext
-
0.14.1
-
sol7
-
sparc
-
local
make
-
3.81
-
sol7
-
sparc
-
local
readline
-
5.2
-
sol7
-
sparc
-
local
/usr/lib/libtermcap.so*
를
리네임
.
패키지
후
복구함
.
setenv PATH
/bin:/usr/bin:/opt/SUNWspro/bin:/opt/SUNWspro/SC5.0/bin:/usr/ccs/bin:/usr/local/sbin:/usr/
local
/bin:/usr/local/webtob/bin:/usr/ucb:/usr/sbin:/etc:.
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
./configure CC=cc LDFLAGS="
-
L/usr/lib
-
lpthread
-
lnsl"
--
prefix=/usr/local/secpgsql
--
enable
-
depend
--
enable
-
thread
-
safety
--
with
-
pgport=11106
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
17.1 configure
시에
瑨牥慤 saf攠
에러
가
나는데
,
--
with
-
libraries=/usr/local/lib
추가해줌
make[3]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.2.6/src/timezone'
cc
-
Xa
-
v
-
DSUNOS4_CC
-
O
-
L../../src/port
-
L/usr/local/lib
-
Wl,
-
R'/usr/local/secpgsql/lib'
access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o
executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o
optimizer/SUBSYS.o port/SUBSY
S.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o
storage/SUBSYS.o tcop/SUBSYS.o
utils/SUBSYS.o ../../src/timezone/SUBSYS.o ../../src/port/libpgport_srv.a
-
lrt
-
lsocket
-
ldl
-
lm
-
o
postgres
Undefined first referenced
symbol in file
gethostbyname ../.
./src/port/libpgport_srv.a(getaddrinfo_srv.o) (symbol belongs to implicit
dependency /usr/lib/libnsl.so.1)
h_errno ../../src/port/libpgport_srv.a(getaddrinfo_srv.o) (symbol belongs to implicit dependency
/usr/lib/libnsl.so.1)
inet_ntoa ../../src/port/libpg
port_srv.a(getaddrinfo_srv.o) (symbol belongs to implicit dependency
/usr/lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to postgres
make[2]: *** [postgres] Error 1
make[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.2.6
/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.2.6/src'
make: *** [all] Error 2
해결을
위해
Makefile.global
파일에
-
lnsl
추가
: LIBS =
-
lz
-
lreadline
-
ltermcap
-
lrt
-
lsocket
-
ldl
-
lm
-
lnsl
./initdb
-
E UTF
-
8
--
no
-
locale
-
A trust
-
W
-
D /usr/local/secpgsql/data
The files belonging to this database system will be owned by user "secdb".
This user must also own the server process.
The database cluster will be initialized with locale C.
creating directory /usr/local
/secpgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ... 400kB/20000
creating configuration files ... ok
creating template1 database in /usr/local/secpgsql/data/base/1
... FATAL: could not create shared
memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=1, size=1662976, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded
your kernel's SHMMAX parame
ter. You can either reduce the request size or reconfigure the kernel
with larger SHMMAX. To reduce the request size (currently 1662976 bytes), reduce PostgreSQL's
shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 10).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN
parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memo
ry configuration.
child process exited with exit code 1
initdb: removing data directory "/usr/local/secpgsql/data"
/etc/system
에
아래내용추가
후
리부팅
set shmsys:shminfo_shmmax=0x2000000
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=256
set shmsys:shminf
o_shmseg=256
set semsys:seminfo_semmap=256
set semsys:seminfo_semmni=512
set semsys:seminfo_semmns=512
set semsys:seminfo_semmsl=32
18. Solaris 8 sparc
/usr/lib/libtermcap.so, /usr/lib/libtermcap.so.1
이
기본으로
있음
.(
리네임
후
패키지
후
복구
)
/usr/lib
의
libtermcap.so,
libtermcap.so.1, libz.so, libz.so.1, libz.so.1.tar
백업
후
패키지
후
복구
/usr/include
의
zconf.h zlib.h
백업
후
패키지
후
복구
expat
-
2.0.1
-
sol8
-
sparc
-
local
gettext
-
0.14.1
-
sol8
-
sparc
-
local
zlib
-
1.2.3
-
sol8
-
sparc
-
local :
동적라이브러리는
리네임
후
사용함
.
readline
-
5.2
-
sol8
-
sparc
-
local :
동적라
이브러리는
리네임
후
사용함
.
termcap
-
1.3
-
sol8
-
sparc
-
local :
정적라이브러리만
설치됨
.
setenv PATH
/bin:/usr/bin:/data/SS11/SUNWspro/bin/:/DATA/Crash_Scat/SUNWscat/bin:/usr/ccs/bin:/usr/ucb:
/usr/sbin:/etc:/usr/local/bin:/data/informix:/bin
setenv LD_LIBRARY_PATH /usr/lib:/usr/loc
al/lib
./configure CC=cc
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
19. Solaris 9 sparc
autoconf
-
2.62
-
sol9
-
sparc
-
local
gettext
-
0.14.1
-
sol9
-
sparc
-
local
make
-
3.81
-
sol9
-
sparc
-
local
readline
-
5.2
-
sol9
-
sparc
-
local
bison
-
2.3
-
sol9
-
sparc
-
local
libiconv
-
1.11
-
sol9
-
sparc
-
local
zlib
-
1.2.3
-
sol9
-
sparc
-
local
expat
-
2.0.1
-
sol9
-
sparc
-
local
libintl
-
3.4.0
-
sol9
-
sparc
-
local
flex
-
2.5.35
-
sol9
-
sparc
-
local
m4
-
1.4.10
-
sol9
-
sp
arc
-
local
/usr/lib
의
libtermcap.so, libtermcap.so.1, libz.so, libz.so.1
백업
후
패키지
후
복구
,
/usr/lib/libtermcap.a
가
있음
/usr/include
의
zconf.h zlib.h
백업
후
패키지
후
복구
/usr/local/lib
의
libreadline.so, libreadline.so.4, libreadline.so.5, libz.so, libz.so.1, libz.so.
1.2.3
백업
후
패키지
후
복구
setenv PATH
/bin:/usr/bin:/DATA/SUNWspro/bin:/opt/SUNWscat/bin:/usr/ccs/bin:/usr/ucb:/usr/sbin:/etc:/usr/l
ocal/bin
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
./configure CC=cc
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
ena
ble
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
/etc/system
기본
내용으로
실행됨
. (
별다른
설정이
없음
.)
initdb
시
내용
:
기본설정으로
pgsql
구동됨
.
selecting default max_connections ... 40
selecting default shared_buffers/max_fsm_pages
... 5600kB/20000
20. Solaris 10 sparc
expat
-
2.0.1
-
sol10
-
sparc
-
local
readline
-
5.2
-
sol10
-
sparc
-
local
zlib
-
1.2.3
-
sol10
-
sparc
-
local
/usr/lib
의
libz.so, libz.so.1
백업
후
패키지
후
복원
/usr/include
의
zlib.h, zconf.h
백업
후
패키지
후
복원
/usr/lib/libtermcap.so
와
libtermcap
.so.1
이
있고
, libtermcap.a
는
없음
.(
명령어
실행
시
물고올라감
.
libcurses.so.1 => /usr/lib/libcurses.so.1)
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
setenv PATH
/bin:/usr/bin:/opt/SUNWspro/SC5.0/bin:/usr/ccs/bin:/usr/ucb:/usr/sbin:/etc:/usr/local/bin
./configure CC=
cc
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
initdb
시
내용
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages
... 32MB/204800
21. Solaris 10, Solaris 9 x86
setenv PATH /usr/local/bin:/bin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/sbin:/opt/SUNWscat/bin
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib:/usr/local/pgsql/lib:/usr/local/lib/secpgsql
./configure CC=cc
LDFLAGS="
-
L/usr/lib
-
lpthread"
--
prefix=/usr/local/pgsql
--
enable
-
depend
--
enable
-
thread
-
safety
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
22. Solaris 5 sparc
autoconf
-
2.62
-
sol25
-
sparc
-
local
bison
-
2.3
-
sol25
-
spar
c
-
local
expat
-
2.0.1
-
sol25
-
sparc
-
local
flex
-
2.5.35
-
sol25
-
sparc
-
local
gettext
-
0.14.1
-
sol25
-
sparc
-
local
libintl
-
3.4.0
-
sol25
-
sparc
-
local
m4
-
1.4.10
-
sol25
-
sparc
-
local
make
-
3.81
-
sol25
-
sparc
-
local
readline
-
5.2 :
정적라이브러리로
소스
컴파일하여
설치함
snprintf
-
2.2
-
sol25
-
sparc
-
local
termcap
-
1.3
-
sol25
-
sparc
-
local :
정적라이브러리로
설치됨
zlib
-
1.2.3 :
정적라이브러리로
소스
컴파일하여
설치함
.
zlib
-
1.2.3
-
sol25
-
sparc
-
local :
위의
소스
컴파일
설치한
것
삭제하고
본
패키지
설치함
.(vsnprinf
못찾음
-
lsnprintf
추가
)
libgcc :
설치되어
있는것
사용
libiconv :
설치되어
있는것
사용
setenv PATH
/bin:/usr/bin:/opt/SUNWsp
ro/SC5.0/bin:/usr/local/bin:/usr/ccs/bin:/usr/ucb:/usr/sbin:/etc:.
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
./configure CC=cc
--
prefix=/usr/local/pgsql
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local
/lib
22.1 Makefile.global
에서
L䥂S
에
-
lnsl
추가해야
컴파일됨
.
22.2 make
무한루프
touch
로
소스시간
맞춰줌
.
22.3 initdb
실행
시
에러
발생
creating template1 database in /usr/local/secpgsql/data/base/1 ... FATAL: could not create shared
memory segment: Invalid argument
DETAIL: Fai
led system call was shmget(key=1, size=1794048, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded
your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel
with larg
er SHMMAX. To reduce the request size (currently 1794048 bytes), reduce PostgreSQL's
shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 13).
If the request size is already small, it's possible that it is less than your
kernel's SHMMIN
parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
child process exited with exit code 1
initdb: removing conten
ts of data directory "/usr/local/secpgsql/data"
/etc/system
에
아래내용추가
후
리부팅
set shmsys:shminfo_shmmax=0x2000000
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=256
set shmsys:shminfo_shmseg=256
set semsys:seminfo_semmap=256
set semsys:seminfo_semmni
=512
set semsys:seminfo_semmns=512
set semsys:seminfo_semmsl=32
./configure CC=cc LDFLAGS="
-
L/usr/lib
-
lpthread
-
lnsl
-
L/usr/local/lib
-
lsnprintf"
--
prefix=/usr/local/pgsql
--
enable
-
depend
--
enable
-
thread
-
safety
--
with
-
pgport=5432
--
with
-
includes=/usr/lo
cal/include
--
with
-
libraries=/usr/local/lib
22.4 make
시
에러
발생
cc
-
Xa
-
v
-
DSUNOS4_CC
-
O pg_dump.o common.o pg_dump_sort.o pg_backup_archiver.o
pg_backup_db.o pg_backup_custom.o pg_backup_files.o pg_backup_null.o pg_backup_tar.o
dumputils.o ../../../src/ba
ckend/parser/keywords.o
-
L../../../src/port
-
lpgport
-
L../../../src/interfaces/libpq
-
lpq
-
L../../../src/port
-
L/usr/lib
-
lpthread
-
lnsl
-
L/usr/local/lib
-
Wl,
-
R'/usr/local/secpgsql/lib'
-
lpgport
-
lz
-
lreadline
-
ltermcap
-
lposix4
-
lsocket
-
ldl
-
lm
-
o pg_dum
p
Undefined first referenced
symbol in file
vsnprintf /usr/local/lib/libz.a(gzio.o)
ld: fatal: Symbol referencing errors. No output written to pg_dump
make[3]: *** [pg_dump] Error 1
make[3]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/bin/
pg_dump'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pgsql_src/postgresql
-
8.3.1/src'
make: *** [all] Error 2
configure
에
옵션의
LDFLAGS
에
-
lsnprintf
추가하여
해결
23. Unixware 7.1.2 x86
readline 5.2
소스
설치
zlib 1.2.3
소스설치
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=/usr/local/lib
./configure CC=cc LDFLAGS="
-
D_EFTSAFE"
--
prefix=/usr/local/pgsql
--
enable
-
thread
-
safety
--
enable
-
depend
--
with
-
pgport=5432
--
with
-
includes=/usr/local/include
--
with
-
libraries=/usr/local/lib
23.1
아래내용
소스
수정하여
컴파일
src/test/thread/thread_test.c 82
라인
sigwait "#if 0"
로
주석처리함
.
/usr/include/signal.h
파일의
sigwait(,);
함수
아규먼트
두
개인
함수만
define
해서
컴파일함
.
23.2 initdb
에러
내용
$ ./initdb
-
E UTF
-
8
--
no
-
locale
-
A trust
-
W
-
D /usr/local/secpgsql/data
The files belonging to this database system will be owned by user "secdb".
This user must also own the server process.
The database cluster will be initialized with locale C.
The d
efault text search configuration will be set to "english".
creating directory /usr/local/secpgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ... 400kB/20000
creating co
nfiguration files ... ok
creating template1 database in /usr/local/secpgsql/data/base/1 ... FATAL: could not create shared
memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=1, size=1777664, 03600).
HINT: This error usually means th
at PostgreSQL's request for a shared memory segment exceeded
your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel
with larger SHMMAX. To reduce the request size (currently 1777664 bytes), reduce PostgreSQL's
shar
ed_buffers parameter (currently 50) and/or its max_connections parameter (currently 13).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN
parameter, in which case raising the request size or reconfiguring SHMMIN
is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
child process exited with exit code 1
initdb: removing data directory "/usr/local/secpgsql/data"
해결을
위해
커널
파라미터
값
변경하여
적용
,
재부팅해야됨
# /etc/conf/bin/id
tune
-
g SHMMAX
524288 524288 131072 2147483647
# /etc/conf/bin/idtune SHMMAX 536870912
# /etc/conf/bin/idbuild
-
B
UX:idbuild: INFO:
The unix kernel will be rebuilt now.
This will take some time. Please wait.
UX:idbuild: INFO: The unix kernel has been rebui
lt.
# /etc/conf/bin/idtune SHMMIN 1
#reboot
# /etc/conf/bin/idtune
-
g SHMMIN
1 1 1 1
# /etc/conf/bin/idtune
-
g SHMMNI
200 100 10 1000
# /etc/conf/bin/idtune
-
g SHMSEG
15 6 6 15
# /etc/conf/bin/idtune
-
g SHMALL
512 512 256 2048
커널
파라미터
값
# uname
-
a
UnixWa
re u713 5 7.1.3 i386 x86at SCO UNIX_SVR5
# /etc/conf/bin/idtune
-
g SHMMAX
134217728 134217728 131072 2147483647
# /etc/conf/bin/idtune
-
g SHMMIN
1 1 1 1
./initdb
-
E UTF
-
8
--
no
-
locale
-
A trust
-
W
-
D /usr/local/pgsql/data
서버
재부팅
시
꼭
init 6
레벨로
재부팅
해야
커널파라
미터
변경값
적용됨
. : shutdown
-
y
-
g0
-
i6
24.
결론
이상으로
정리를
마친다
.
오픈소스
DBMS
가
상용
DBMS
에
비해
상용
시장에서
외면을
당하고
있는
실정이나
조금만
관심을
기울이고
노력을
한다면
저렴한
비용과
그
이상의
성능을
발휘할
수
있다
.
얼마전
기사에서
어떤
업체가
사용하고
있던
상용
DBMS
를
PostgreSQL
로
마이그레이션을
한다고
한다
.
상용
DBMS
의
대부분의
환경을
보면
고가의
장비에서
구동된다
.
이에
비해
오픈
소스
DBMS
의
경우
구입
가격이나
유지보수
비용이
안든다는
이유로
중소규모의
사용환경에서
많이
사용된다
.
하지만
동급의
환경에서
최적화될
경우
상용
DBMS
보다
좋은
결과물을
보여주기도
한다
.
물론
꾸준한
관리와
노력이
필요하다
.
추후
시간이
된다면
, libpq
를
이용한
간단한
프로그래밍이나
MS Windows
플랫폼상의
패키지
만드는
것과
설치에
대해서
살펴보고자
한다
.
Enter the password to open this PDF file:
File name:
-
File size:
-
Title:
-
Author:
-
Subject:
-
Keywords:
-
Creation Date:
-
Modification Date:
-
Creator:
-
PDF Producer:
-
PDF Version:
-
Page Count:
-
Preparing document for printing…
0%
Σχόλια 0
Συνδεθείτε για να κοινοποιήσετε σχόλιο