Last active
December 20, 2015 23:48
-
-
Save joaodubas/6214862 to your computer and use it in GitHub Desktop.
install postgres from source in #!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumindo que o usuario ja tem o codigo fonte do postgres | |
export SRCDIR=$HOME/local/src | |
# estes cabecalhos estao definidos por conta do configure | |
apt-get install libreadline-dev | |
apt-get install libxml2-dev | |
apt-get install libxslt1-dev | |
apt-get install libperl-dev | |
# configure make | |
./configure --prefix=$SRCDIR/pgsql --with-perl --with-python --with-libxml --with-libxslt | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://www.postgresql.org/docs/current/static/install-short.html | |
adduser postgres | |
mkdir /usr/local/pgsql/data | |
chown postgres /usr/local/pgsql/data | |
su - postgres | |
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data | |
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & | |
/usr/local/pgsql/bin/createdb test | |
/usr/local/pgsql/bin/psql test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment