diff options
| author | cjd24 | 2018-02-06 21:23:03 +0000 |
|---|---|---|
| committer | cjd24 | 2018-02-06 21:23:03 +0000 |
| commit | de143da2021f8b972966be36b6bce26245c87e37 (patch) | |
| tree | e92e80940f110eef905b9e3a69908dab738178e8 /getmepostgres.sh | |
| parent | Merge branch 'jl247/db' into 'master' (diff) | |
| parent | Filled in some of the first method stubs, added serverconfig.ts, and added sc... (diff) | |
| download | medicine-de143da2021f8b972966be36b6bce26245c87e37.tar.gz medicine-de143da2021f8b972966be36b6bce26245c87e37.zip | |
Merge branch ‘cjd24/stubsgres’ into ‘master’
Filled in some of the first method stubs, added serverconfig.ts, and added…
See merge request cs3099group-be-4/project-code!5
Diffstat (limited to 'getmepostgres.sh')
| -rwxr-xr-x | getmepostgres.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/getmepostgres.sh b/getmepostgres.sh new file mode 100755 index 0000000..05db59d --- /dev/null +++ b/getmepostgres.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +echo "> Checking for postgres at ~/pg"; +if [ -d "~/pg" ]; then + echo "Postgres Directory exists, nevermind..."; + exit 1; +fi + +echo "> Making postgres directory at ~/pg"; +mkdir ~/pg; +currentDir=$(pwd); + +echo "> Chaning dir to ~/pg"; +cd ~/pg; + +echo "> Cloning Repo"; +git clone https://github.com/postgres/postgres.git; + +echo "> Checking out to version 10"; +cd ./postgres; +git reset --hard REL_10_0; + +echo "> Configuring"; +sleep 2; +./configure --prefix=$HOME/pg/postgres/ --with-python PYTHON=/usr/bin/python2.7; + + +read -p "Press [Enter] key to Build Postgres..."; +echo "> Building Postgres"; +make -j 5; + +read -p "Press [Enter] key to Install Postgres..."; +echo "> Installing Postgres"; +make install; + +echo "> Creating the Database"; +~/pg/postgres/bin/initdb -D ~/pg/postgres/data/; + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo "> Completed the installation of Postgres. Please use `./runmepostgres.sh` to run."; +cd $currentDir; |
