diff options
| author | Tom Harley | 2018-12-24 01:24:32 +0000 |
|---|---|---|
| committer | Tom Harley | 2018-12-24 01:24:32 +0000 |
| commit | c290b476bfda1c1fea3e4f4bae49b4695ca42592 (patch) | |
| tree | 28adedc74d8e38f89c402233c28aa12f2f652047 /getmepostgres.sh | |
| parent | Made more useful build/run scripts and instruction (diff) | |
| download | medicine-c290b476bfda1c1fea3e4f4bae49b4695ca42592.tar.gz medicine-c290b476bfda1c1fea3e4f4bae49b4695ca42592.zip | |
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.
Diffstat (limited to 'getmepostgres.sh')
| -rwxr-xr-x | getmepostgres.sh | 64 |
1 files changed, 0 insertions, 64 deletions
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; |
