From 84ef4db188b1988227feba832e5779587de42a48 Mon Sep 17 00:00:00 2001 From: cjd24 Date: Tue, 6 Feb 2018 21:20:00 +0000 Subject: Filled in some of the first method stubs, added serverconfig.ts, and added script to install postgres on lab machine for doing db stuff --- getmepostgres.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 getmepostgres.sh (limited to 'getmepostgres.sh') 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; -- cgit v1.2.1