陉䘞
垬輙誺䘋䔇丸婔準儌滇陉䘞溊傼乕湏幽锬拷嘹塩渵䔇锬釹㔗認婻噖嘩滇锔誺誊臯 configure 臔橸垂䯄䔇凹庯䚺䩕垬輙嘹埻驔襕䞔剘婄显噖
./configure
臖臔橸儖誊臯婔底敋臘準䯩敋婔底係䂘䕩噿䔇埻麟幽演敋淉嘩係䂘䔇螆䘞橔劯儖婘䚡臏湏婺录傺婔底桺傽傖螄嘘垄欆彄庖傔幽㔗套悩嘹愿媺毕䚡臏䕞嘘䔇䋸䆋闼幽嘹幘埇傖婘溊傼乕湏幋崡䔇噽垄䕞嘘麯誊臯 configure 臔橸㔗
䚺䩕螆䘞儖䚡臏橉媇単启庫䫘䘋废誻橬欔橬埻驔襕 C 䚡臏単䔇垵潙䆇䘋废启毖埼㔗䚺䩕施欔橬桺傽鄘儖垬輙彄 /usr/local/pgsql 䕞嘘㔗
嘹埇傖锔誺䂍庺婋麵䔇婔婻潡崔婻 configure 变傴臯锬釹準躻垔幬䚡臏启垬輙誺䘋
檪欔橬桺傽輙婘 PREFIX 䕞嘘婋蔯婉滇 /usr/local/pgsql 麯㔗垂鍙䔇桺傽嚔垬輙彄婉劯䔇床䕞嘘麯䫔躿澇橬婔婻桺傽嚔䕘毖垬輙彄 PREFIX 䕞嘘麯㔗
套悩嘹橬䬹枪驔襕嘹誻埇傖䫘婋麵䔇锬釹躻垔幬婉劯床䕞嘘䔇嘉䘞㔗婉誺剿嘪嘹媺毕䚺䩕螆䘞幘埇傖婘垬輙幋劯䓂媘䕞嘘(man 启 doc 嘉䘞婉埖嘌巉)溴施嘹埇脘驔襕嘪䫘 configure 䔇 --disable-rpath 锬釹㔗誻橬嘹驔襕只臬淉嘩係䂘套嘘欆彄噌庆康㔗
檪嘷係䕩噿䔇桺傽垬輙彄 EXEC-PREFIX 蔯婉滇 PREFIX 螆䘞䔇婄桹㔗認湙啔埇傖懫膄桹冪婄婘婉劯婂橺幋閘噌庆嘷係䕩噿䔇桺傽㔗套悩嘹䩕䘖垄闼幽 EXEC-PREFIX 儌嚔赆螆䘞婺京庯 PREFIX 幽婫嘷係䕩噿启嘷係方噿䔇桺傽鄘嚔垬輙彄劯婔䕞嘘湏婋認幘埇脘滇嘹愿襕䔇㔗
埇欓臯䘋废䔇䕞嘘䚺䩕滇 EXEC-PREFIX/bin锔婩幘儌滇 /usr/local/pgsql/bin
䘋废驔襕䔇埻臂桺傽䕞嘘㔗䚺䩕滇 PREFIX/share 㔗臙濘懟認婻䕞嘘启庻櫆昄扞康桺傽䔇婄桹澇橬傂嘘噿係㔗
陉䘞桺傽䔇䕞嘘䚺䩕婺 PREFIX/etc
康桺傽启媘攕輙蘘昇庖䔇䕞嘘㔗䚺䩕滇 EXEC-PREFIX/lib
C 启 C++ 崘桺傽䔇䕞嘘㔗䚺䩕滇 PREFIX/include
锟五 PostgreSQL 婔蕙婥䔇欋喯釕儖垬輙彄認婻䕞嘘䔇 manx 床䕞嘘麯㔗䚺䩕滇 PREFIX/man
鍴"man"傖崡䔇桺懼桺傽儖赆垬輙彄認婻䕞嘘㔗䚺䩕滇 PREFIX/doc 㔗套悩弄滯庖 --without-docdir 闼幽桺懼儖婉嚔赆 make install 垬輙㔗認滇䂍闼底嘪䫘䬹枪桹濘垬輙桺懼䔇欷寙臔橸嘪䫘䔇㔗
㔊濘懟㔏婺庖螷 PostgreSQL 脘崘垬輙婘婔底噌庆䔇垬輙嘉䘞(懫套 /usr/local/include)劯施埽婉躿庯启係䂘噽垄鄘彖库䫘劉庖䷺閘幾欄潏傸麺埡庖婔底準黴㔗饡噽垬輙臔橸嚔躻媘䂍 datadir, sysconfdir, docdir 劯麵鍇媹婪"/postgresql"庖严婾鍴麂匘嚔䔇垯昘虇冇劉噾䂟寙劆庖严婾"postgres"潡"pgsql"㔗懫套套悩嘹锬拷 /usr/local 嘩婺嬉䚔闼幽桺懼儖垬輙婘 /usr/local/doc/postgresql 嘖套悩嬉䚔滇 /opt/postgres 闼幽垄儖赆櫆彄 /opt/postgres/doc 㔗垵潙毖埼䔇噸噌C崘桺傽垬輙彄庖 includedir 幽婫滇劉庖䷺閘方噿䔇㔗喙鄘䔇崘桺傽启橉媇単崘桺傽鄘垬輙彄 includedir 婋䔇䓕橬䕞嘘婺寂庖㔗埗蔄懟䓉毖埼䔇桺懼诙埡噿庯套嘘冖彄崘桺傽䔇媇敇㔗橔劯套悩劽锗闼幽幘嚔婘 libdir 婋录傺婔婻䓕橬䔇床䕞嘘䫘庯媘攕輙蘘昇庖㔗
DIRECTORIES 滇婔係彖喐埙彖锫䔇䕞嘘認底䕞嘘儖赆媹噖䚡臏単䔇崘桺傽抩䘵彖臘婺㔗套悩嘹橬婔底埇锬䔇寙(懫套 GNU Readline)垬輙婘麂湺庖嘉䘞嘹儌媙釂嘪䫘認婻锬釹傖埪埇脘誻橬䕩庫䔇 --with-libraries 锬釹㔗
冋床--with-includes=/opt/gnu/include:/usr/sup/include
DIRECTORIES 滇婔係彖喐埙彖锫䔇䕞嘘認底䕞嘘滇䫘庯昖欆康桺傽䔇㔗套悩嘹橬婔底寙垬輙婘麂湺庖嘉䘞嘹埇脘儌驔襕嘪䫘認婻锬釹(傖埪凹庫䔇 --with-includes 锬釹)㔗
冋床--with-libraries=/opt/gnu/lib:/usr/sup/lib
欷嚔橸婄臺蘔櫇毕(NLS)幘儌滇傖麂苌桺滆䴺䘋废媇敇䔇脘媕㔗LANGUAGES 滇婔婻䷺湚彖锫䔇臺蘔傼乕彖臘湺臖嘹愿櫇毕䔇臺蘔㔗懫套 --enable-nls='de fr' 㔗嘹柊冕䔇彖臘启垂鍙櫇毕䔇彖臘幋閘䔇庴镖嚔躻媘螇䞖庺準㔗套悩嘹澇橬弄滯婔婻彖臘闼幽儌垬輙欔橬埇䫘䔇䪂臏㔗
襕嘪䫘認婻锬釹嘹驔襕婔婻 Gettext API 䔇垂䯄㔗蓕婪桺㔗
NUMBER 婺橉媇単启垵潙䆇䔇䚺䩕䆇埼(䚺䩕滇 5432)㔗認婻䆇埼埇傖婘傖劯螆䘞婉誺套悩嘹婘認麯弄滯闼幽橉媇単启垵潙䆇儖橬䕩劯䔇䚡臏喘庖䔇䚺䩕唚㔗認湙嚔桹冪底㔗锔婩锬埡婔婻麂䚺䩕唚䔇喘䊖䫌滇嘹嚕商婘劯婔埄橺単婪誊臯崔婻 PostgreSQL 橉媇単㔗
䚡臏 PL/Perl 橉媇単䆇䚡䘋臺蘔㔗
䚡臏 PL/Python 橉媇単䆇䚡䘋臺蘔㔗
䚡臏 PL/Tcl 橉媇単䆇䚡䘋臺蘔㔗
Tcl 垬輙䔇 tclConfig.sh 桺傽欔婘䕞嘘垄麯麵寙劆䚡臏 Tcl 昇庖䔇陉䘞媇敇㔗configure 锔婩嚔躻媘婘亥垔媖潊䔇嘉䘞欆彄認底桺傽嘖滇套悩嘹驔襕婔婻婉劯䬽橸䔇 Tcl 嘹幘埇傖弄滯婉劯䔇䕞嘘㔗
䚡臏櫇毕 Kerberos 5 螴臕䔇婩薪㔗婘螩崔係䂘婪Kerberos 係䂘澇橬垬輙婘䚺䩕䔇抩䘵䕞嘘婋(懫套 /usr/include, /usr/lib)欔傖嘹媙釂嘪䫘鍇媹䔇 --with-includes 启 --with-libraries 锬釹㔗configure 婘䂓䂺陉䘞幋嬉儖演昖欔驔襕䔇崘桺傽启康傖䇞媺 Kerberos 滇噙彖埇䫘䔇㔗
䚺䩕䔇 Kerberos 橉媇婂䔇劉䓄㔗䚺䩕滇 postgres 㔗锔婩澇橬䊖䫌櫹埻認婻唚㔗
䚡臏櫇毕SSL(媹凖䔇)誂毖㔗認婻锬釹驔襕垬輙 OpenSSL 寙㔗configure 儖婘垬輙幋嬉演昖欔驔襕䔇崘桺傽启康桺傽傖䇞媇 OpenSSL 垬輙滇噙彖埇䫘䔇㔗
䚡臏 LDAP(蘂麟亓䕞嘘螪閞剟螞)櫇毕㔗䫘庯螴臕启昖欆誂毖埗昄(埗蓕 誗29.15启誗20.2.5傖诙埡敘崔媇敇)㔗婘 Unix 婪認驔襕 OpenLDAP 寙䔇櫇毕㔗configure 儖嚔演昖欔驔䔇崘桺傽启康傖䇞媺 OpenLDAP 䔇垬輙滇噙彖埇䫘䔇㔗婘 Windows 婪儖嘪䫘䚺䩕䔇 WinLDAP 康㔗
镪噉嘪䫘 Readline 婯 libedit 康㔗認湙儌噿閺庖 psql 麯䔇变傴臯䚡膏启寖埾啹溴潏傸婉傺螞認幽啔㔗
嚻噽嘪䫘 libedit 康蔯婉滇 Readline 康㔗臖锬釹備婘劯施垬輙庖認婴婻康䔇愙喕婋欉橬懟幬㔗䚺䩕嘪䫘 Readline 康㔗
䚡臏 Bonjour 櫇毕㔗認襕挗淉嘩係䂘櫇毕 Bonjour 㔗婘 Mac OS X 婪傺螞嘪䫘㔗
嘪䫘 64 嘉䔇昘昄庻嗘施閘启閘锫蔯婉滇䫘䚺䩕䔇敞䗹昄庻嗘㔗認湙啔鍊彽庖昄唚埇傖臘膆䔇评啘嘖滇媺臕庖昘婻评啘麯䔇懆䓐昄䔇來庥(埗黙誗8.5诙埡敘崔媇敇)㔗臙濘懟昘昄施閘䔇傼乕懫敞䗹昄施閘䔇傼乕襕桄潏傸幘嚔啽儫埏䯄麯麵橬懕䖙㔗
噕螩婘 PostgreSQL 澇橬臖广埄䔇 CPU 躻斋髕櫇毕䔇愙喕婋䚡臏潊媘㔗䚺幟躻斋髕䔇櫇毕儖凚躘攓脘敽寡啹溴埻橬婘䚡臏誺䘋锔庺幽婫只臬嘹臘臖广埄䚺幟躻斋髕櫇毕䔇施唍欉嘪䫘認婻锬釹㔗套悩婘嘹䔇广埄婪驔襕認婻锬釹欉脘䚡臏 PostgreSQL 臙劏 PostgreSQL 嚔埏蔙檖只認婻閞鵻㔗
傴垵潙䆇康滇亪䘋垬噘䔇㔗認湙儌噕螩婘 libpq 启 ECPG 䘋废麯䔇幽埏亪䘋垬噘婄毓彽傡傸䓕橬䔇誂毖埖昇㔗認婻锬釹襕挗淉嘩係䂘婪橬轿崘䔇亪䘋櫇毕㔗
镪噉嘪䫘 Zlib 康㔗認湙儌噿閺庖 pg_dump 启 pg_restore 麯麵䔇寋䚷櫇毕㔗認婻锬釹埻锗䫘庯闼底澇橬認婻康䔇䘘蓕䔇係䂘㔗
檪欔橬䘋废启康傖婥橬脄臘严埙䔇桹嚟䚡臏㔗認懟叿五嘹埇傖锔誺婔婻脄臘単誊臯䘋废準彖悊閞鵻㔗認湙啔滆菖嵂崓庖橔劯垬輙䔇埇欓臯桺傽䔇崓償幽婫婘麂 GCC 䔇䚡臏単婪認幽啔锔婩誻襕噿閺䚡臏単嚻寡凚躘锘庥䔇婋鍉㔗嘖滇套悩橬認底严埙臘䔇臺儌埇傖麂婩橬昽婄婞媷垔嘉埇脘埏䫘閞鵻䔇嘉䘞㔗䕞嬉潏傸埻滇婘嘹嘪䫘 GCC 䔇愙喕婋欉傺螞婘䫘库垬輙婺嘪䫘認婻锬釹㔗嘖滇套悩嘹溼婘誕臯嚔埏噖嘩潡蔙溼婘嘪䫘 beta 䬽橸闼幽嘹儌攂庫臖欷嚔垄㔗
欷嚔婘橉媇単婺䔇 assertion 演昖垄嚔演昖螩崔"婉埇脘埏䫘"䔇溇傽㔗垄凹庯傼乕嚔埏䔇䫘锫蔯蘔滇方備幋垺婉誺認底敋臘䘉冞婄废晵庖婔底锘庥㔗幽婫欷嚔認婻敋臘婉嚔柊醻係䂘䔇䘿垔攓認底桺蘔演昖幽婉滇毬䙓髍臇䔇婖麉攓彖䌂䔇啹溴婔底䕩凹方垿䔇償荆床幘埇脘凚躘橉媇単麉劇 (埻襕垄蓥埏庖婔渇桺蘔崌蘖)㔗䕞嬉潏傸婉毘艊婘䫘库䯇嵄婺嘪䫘認婻锬釹嘖滇套悩嘹婘啔嚔埏潡蔙婘嘪䫘 beta 䬽橸䔇施唍庫臖欷嚔垄㔗
欷嚔躻媘唔蕡攓虘詻㔗套悩欷嚔認婻锬釹闼幽 makefile 桺傽儖螆䘞婺婘傂嘘崘桺傽赆媞櫹䔇施唍鄘儖麉桄䚡臏欔橬埖嘌巉䔇䕞湺桺傽㔗套悩嘹婘啔嚔埏䔇噖嘩闼幽認婻锬釹冽橬䫘嘖滇套悩嘹埻滇愿䚡臏婔渇幽婫垬輙闼幽認儌滇敻蘹施閘㔗䕞嬉認婻锬釹埻橬婘嘹嘪䫘 GCC 䔇施唍欉䞇䫘㔗
欷嚔 DTrace 櫇毕備婘 Solaris 广埄婪埇䫘㔗啹婺 dtrace 锔婩垬輙婘 /usr/sbin 婺婫臖䕞嘘婔轸婉婘抩䘵虇䂟婺欔傖婩婩驔襕嘪䫘 DTRACE 启 DTRACEFLAGS 䯇嵄埻麟毺垔 dtrace 䘋废䔇嘉䘞㔗
襕寙劆 64 嘉 DTrace 櫇毕驔襕毺垔 DTRACEFLAGS="-64" 懫套婘嘪䫘 GCC 䚡臏䔇施唍
./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
婘嘪䫘 Sun 䚡臏単䔇施唍
./configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64' ...
套悩嘹塩渵嘪䫘婉劯庯 configure 欆庺準䔇 C 䚡臏単埇傖儖䯇嵄埻麟 CC 螆䘞婺嘹锬拷䔇䘋废㔗䚺䩕施configure 儖锬拷 gcc(埻襕埇䫘)潡蔙滇臖广埄䔇䚺䩕(锔婩滇 cc)䌂嚚婄嘹埇傖䫘 CFLAGS 襖䕡䚺䩕䚡臏単湺媖㔗
嘹埇傖婘 configure 变傴臯婪弄滯䯇嵄埻麟懫套
./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'
婋麵滇埇䫘䔇䯇嵄埻麟彖臘
C 䚡臏単变傴
C 䚡臏単锬釹
C 鵇崇䊖単
C 鵇崇䊖単锬釹
dtrace 䘋废䔇嘉䘞
嚹锐䂍 dtrace 䘋废䔇锬釹
誂毖単锬釹
噌庆康婪䔇誂毖単锬釹
msgfmt 䘋废䔇嘉䘞
Perl 蓼麪単䔇垯昘虇冇㔗䫘庯䇞垔䚡臏 PL/Perl 䔇冺蕡噿係㔗
Python 蓼麪単䔇垯昘虇冇㔗䫘庯䇞垔䚡臏 PL/Python 䔇冺蕡噿係㔗
Tcl 蓼麪単䔇垯昘虇冇㔗䫘庯䇞垔䚡臏 PL/Tcl 䔇冺蕡噿係㔗
Yacc 䘋废(套悩嘪䫘Bison彍滇 bison -y )
䚡臏
襕嚔哋䚡臏显噖(婔垔襕螄冖䫘 GNU make)
gmake
冺䇸傽婉劯䚡臏誺䘋埇脘驔襕 5-30 彖鐘㔗滆䴺䔇橔劯婔臯庫臖滇
All of PostgreSQL is successfully made. Ready to install.
啂嘐敋臘
套悩嘹愿婘垬輙桺傽嬉敋臘桄䚡臏䔇橉媇単闼幽嘹埇傖婘認婻施唍誊臯啂嘐敋臘㔗啂嘐敋臘滇婔婻䫘庯黯臕 PostgreSQL 婘係䂘婪滇劥毬䙓嚔埏庺叻螆愿䔇闼湙誊臯䔇敋臘喖傽㔗显噖
gmake check
認溇变傴婘 root 麯方濘嘪䫘臙婘麂䬹溄䫘潙婋誊臯臖变傴㔗䆹28寙劆噿庯套嘘蓼麪敋臘䂷悩䔇臥䂖媇敇㔗嘹埇傖婘傖劯䔇傂嘘施閘锔誺欓臯認溇变傴準誊臯認婻敋臘㔗
垬輙
㔊濘懟㔏套悩嘹溼婘剺亓婔喖䯄橬䔇係䂘幽婫庖崺檪桄桺傽襖䕡婘斓桺傽婪麵闼幽襕螄冖婘襖䕡幋嬉崺傘昄扞幽噿閺斓橉媇単償婪麵誗14.4麯麵蓼麪䔇闼湙㔗
襕垬輙 PostgreSQL 髞噖
gmake install
認溇变傴儖檪桺傽垬輙彄婘 step 1 弄滯䔇䕞嘘麯麵寂㔗䇞媺嘹凹闼婻䕞嘘橬轿崘䔇溄鍊㔗锔婩嘹驔襕䫘 root 溄鍊啔認婔準㔗潡蔙嘹幘埇傖庋噽录傺䕞湺䕞嘘幽婫彖昆劽锗䔇溄鍊㔗
嘹埇傖嘪䫘 gmake install-strip 傼敪 gmake install 婘垬輙埇欓臯桺傽启康桺傽施檪垄傸䔇脄臘媇敇檘埡毬㔗認湙儖誗亥婔底䷺閘㔗套悩嘹䚡臏施婥五脄臘櫇毕闼幽檘埡儖橬昽婄役鍴脄臘櫇毕啹溴潏傸庫臖埻滇婘婉喉驔襕脄臘䔇施唍啔認底庋愙㔗install-strip 媕商啔婔底劽䊖䔇庋愙準誗亥䷺閘嘖滇垄幽婉䘖長套嘘傯埇欓臯桺傽婺檘埡懟婻婉驔襕䔇庖誗啹溴套悩嘹婯橕誗亥欔橬埇脘誗亥䔇伕䕻䷺閘闼幽嘹埇脘驔襕欋噖啔底崇䊖㔗
湺庖䔇垬輙埻柊冕欔橬嚔埏垵潙䆇庫䫘䔇崘桺傽启橉媇単䆇䔇䘋废嚔埏懫套䫘 C 喍垵潙庘昄潡蔙昄扞䌂傋䔇崘桺傽㔗
㔊埻輙垵潙䆇㔏套悩嘹埻愿輙垵潙庫䫘启毖埼闼幽嘹埇傖䫘婋麵䔇变傴
gmake -C src/bin install gmake -C src/include install gmake -C src/interfaces install gmake -C doc install
src/bin 婺橬婔底備冕橉媇単嘪䫘䔇庯誕彽桺傽嘖滇垄傸鄘冽償㔗
㔊婘 Windows 婪濘喯 eventlog 㔏襕婘臖淉嘩係䂘婪濘喯婔婻 Windows eventlog 康婘垬輙垯懘幋劯欓臯婋麵䔇变傴
regsvr32 pgsql_library_directory/pgevent.dll
認湙儌录傺庖婔婻䫘庯庋傽昖䩋単䔇濘喯臘釹䕞㔗
㔊剩蘘㔏埇傖嘪䫘 gmake uninstall 变傴剩蘘㔗婉誺認湙婉嚔役鍴傂嘘录傺庺準䔇䕞嘘㔗
㔊橙䊖㔏婘垬輙垯潊傖劯嘹埇傖锔誺婘溊乕湏麯麵䫘变傴 gmake clean 役鍴䚡臏誺䘋桺傽㔗認湙嚔媺䘍 configure 䘋废䫘潊䔇桺傽認湙傖劯嘹儌埇傖䫘 gmake 变傴麉桄䚡臏欔橬婩薪㔗襕檪溊乕湏敵崉婺埏婄施䔇䪽攕䫘 gmake distclean 变傴㔗套悩嘹愿傯劯婔漕溊乕湏婪婺崔婻婉劯广埄䚡臏嘹儌婔垔襕誊臯認溇变傴幽婫婺懟婻广埄麉桄陉䘞㔗埥崡婘懟䓉係䂘婪嘪䫘婔喖䋸䆋䔇䚡臏湏認湙溊傼乕湏儌埇傖媺䘍婉赆敘櫹㔗
套悩嘹欓臯庖婔渇䚡臏䇽劯埏䯄嘹䔇陉䘞锬釹滇髍臇䔇潡蔙嘹媞櫹庖傂嘘 configure 欔毵敋䔇婩薪(懫套剺亓庖蘇傽)闼幽婘麉桄陉䘞启䚡臏幋嬉誊臯婔婋 gmake distclean 滇婻喘幹愇㔗套悩婉啔認婻庋愙嘹媞櫹䔇陉䘞锬釹埇脘方濘嚹携彄欔橬驔襕埻寡䔇婄桹㔗