Skip to content

Instantly share code, notes, and snippets.

@numberisnan
Created April 8, 2025 00:29
Show Gist options
  • Save numberisnan/247e6842120bd059242dbccea997241c to your computer and use it in GitHub Desktop.
Save numberisnan/247e6842120bd059242dbccea997241c to your computer and use it in GitHub Desktop.
#!/bin/bash
# A simple bash script that downloads, installs, and inits postgres made for CSCD43 at UTSC
# Make sure you have all the dependancies installed first!
wget https://ftp.postgresql.org/pub/source/v17.2/postgresql-17.2.tar.gz
tar -xzvf postgresql-17.2.tar.gz
rm postgresql-17.2.tar.gz
cd postgresql-17.2
mkdir build pgsql
cd build
../configure --prefix=$(pwd)/../pgsql --enable-debug --enable-depend CFLAGS=-O0
make
make install
cd ../pgsql
mkdir data
cd ..
pgsql/bin/initdb -D pgsql/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment