From c290b476bfda1c1fea3e4f4bae49b4695ca42592 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Mon, 24 Dec 2018 01:24:32 +0000 Subject: Combine install scripts into single script file The `getmeX.sh` scripts have all been replaced with a single script, `install.sh`, that downloads and builds all uncommon required software to the `ext` folder. Since everything is installed in `ext`, it's necessary to prepend `ext/bin` to the `PATH` to run commands. The alternative is to change the target folder in `install.sh`, or install the required dependencies manually. The Postgres database data is now stored in a folder `db` in the root of the project, instead of a folder based on the user's home. --- getmepostgres.sh | 64 -------------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100755 getmepostgres.sh (limited to 'getmepostgres.sh') diff --git a/getmepostgres.sh b/getmepostgres.sh deleted file mode 100755 index bd8fffd..0000000 --- a/getmepostgres.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -PGDIR=${1-"$PWD/pg"} - -echo "> Checking for postgres at $PGDIR"; -if [ -d "$PGDIR" ]; then - echo "Postgres Directory exists, nevermind..."; - exit 1; -fi - -echo; -echo; -echo; -echo "This installation process takes ~3:50 minutes to complete."; -echo; -echo; -echo; - -echo "> Making postgres directory at $PGDIR"; -mkdir -p "$PGDIR"; -currentDir=$(pwd); - -echo "> Changing dir to $PGDIR"; -cd "$PGDIR"; - -echo "> Cloning Repo"; -git clone https://github.com/postgres/postgres.git; - -echo "> Checking out to version 10.1"; -cd ./postgres; -git reset --hard REL_10_1; - -echo "> Configuring"; -./configure --prefix="$PWD" --with-python PYTHON="/usr/bin/python2.7"; - -echo "> Building Postgres"; -make; - -echo "> Installing Postgres"; -make install; - -echo "> Initialise the Database"; -"$PGDIR/postgres/bin/initdb" -D "$PGDIR/postgres/data/"; -echo; -echo; -echo; -echo; -echo "> Starting the postgres server"; -"$PGDIR/postgres/bin/pg_ctl" -D "$PGDIR/postgres/data/" -l POSTGRES_logfile start; -echo "> Create the Database"; -"$PGDIR/postgres/bin/createdb" be4; -echo "> Creating Admin user"; -"$PGDIR/postgres/bin/psql" -U ${USER} postgres -c "CREATE USER admin;"; -echo "> Granting Admin Permissions"; -"$PGDIR/postgres/bin/psql" -U ${USER} postgres -c "ALTER DATABASE be4 OWNER TO admin;"; - - -echo; -echo; -echo; -echo; -echo; -echo "> Completed the installation of Postgres."; -cd $currentDir; -- cgit v1.2.1