PostgreSQLのインストール
OSSのRDMSとして,MySQL/MariaDBと共にWebアプリケーション開発でよく使われるPostgreSQLをソースコードからインストールする。
項目 | 説明 |
---|---|
配布元 | PostgreSQL: The world’s most advanced open source database |
手順 | PostgreSQL: Documentation: 10: Chapter 16. Installation from Source Code |
依存情報 | PostgreSQL: Documentation: 10: 16.2. Requirements |
依存先 | GNU Make 3.80+, GNU Readline or libedit, zlib For git version: GNU Flex 2.5.31+, GNU Bison1.875+, Perl 5.8.3+. |
依存元 |
sh -ex <<-EOT
LOCAL=~/.local J=$(grep -cs '^processor' /proc/cpuinfo || echo 2)
PKG=postgresql VER=10.5 TAG=REL_$(echo $VER | sed 's/\./_/')
cd $LOCAL/src
if command -v git >/dev/null; then
[ -e $PKG ] || git clone --depth 1 git://git.postgresql.org/git/$PKG.git
cd $PKG
git fetch --depth 1 origin tag $TAG
git checkout $TAG
else
[ -e $PKG-$VER ] || wget https://ftp.postgresql.org/pub/source/v$VER/$PKG-$VER.tar.bz2
tar -xf $PKG-$VER.*
cd $PKG-$VER
fi
./configure --prefix=$LOCAL/stow/$PKG-$VER
make -j $J && make install
cd "$LOCAL/stow"
stow -S $PKG-$VER -D $PKG-*
EOT
日付 | バージョン | OS | 依存関係 |
---|---|---|---|
2018-09-23 | 10.5 | Ubuntu 16.04 | GNU Make 4.2.1, GCC 8.1.0, GNU Readline 7.0 |