설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


총 게시물 162건, 최근 0 건
   

Github를 이용한 Postgres Source Build Install

글쓴이 : 윤명식 날짜 : 2017-11-01 (수) 12:04 조회 : 5739
Github 에서 소스를 받아서 build 하는 샘플 입니다.
ubuntu 에서 작성 했는데 centos 나 기타 freebsd 이런 타 os 에서도 package 부분만 마춰 주면 build 됩니다.

--
-- 01. 기본 패키지 설치 and User Create
--

apt-get update
apt-get install gcc g++ make bison flex autoconf automake perl-dev python3-dev python3-pip libaio-dev libssl-dev libxml-dev zlib1g-dev zip unzip gdb libxslt-dev dtrace 

useradd -d /home/postgres -s /bin/bash postgres
id postgres

systemctl disable firewalld

--
-- 02.Git 소스 복제 
--

git clone https://www.github.com/postgres/postgres

cd postgres

/*
 master branch 는 11.0 devel
 REL9_6_STABLE
 REL_10_STABLE

*/

git branch -a

git checkout REL_10_STABLE  -- 10.0 stable 
git pull

--
-- 03.Configure
--

./configure --prefix=/opt/pgsql/10 --enable-thread-safety --with-perl --with-python --with-libxml --with-libxslt --with-openssl --enable-dtrace

--
-- 04. Main Make
--

make -j 4
make -j 4 install-world

--
-- 05. Make Extension
--
cd contrib
make -j 4 install

--
-- 07. Make Tutorial
--
cd src/tutorial
make -j 4 install

--
-- 08. Create DB Cluster
--

export PGHOME=/opt/pgsql/10
export PGDATA=/data/PGSQL/10
export PATH=$PGHOME/bin:$PATH
export LD_LIBRARY_PATH=$PGHOME/lib:/lib64:/usr/lib64:.

initdb -D /data/PGSQL/10

mkidir /data/PGSQL/10/pg_log
pg_ctl -D /data/PGSQL/10 -l /data/PGSQL/10/pg_log/logfile start


   

postgresdba.com