Skip to content

Instantly share code, notes, and snippets.

@tsubakimoto
Created June 19, 2014 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubakimoto/1feb628b467a4c144b68 to your computer and use it in GitHub Desktop.
Save tsubakimoto/1feb628b467a4c144b68 to your computer and use it in GitHub Desktop.
#!/bin/bash
#yum update -y
# optional
#yum install -y vim
# Setup packages
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
rpm -Uvh remi-release-6.rpm
cp -af ./vagrant_resources/epel.repo /etc/yum.repos.d/epel.repo
# Install require packages for PostgreSQL
rpm -i http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
yum install -y postgresql93-server postgresql93-contrib
# PostgreSQL initialize
su postgres -c '/usr/pgsql-9.3/bin/initdb --no-locale -D /var/lib/pgsql/9.3/data'
# PostgreSQL initialize 2
#adduser postgres
#mkdir /usr/local/pgsql/data
#chown postgres /usr/local/pgsql/data
#su - postgres
#/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
#/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
#/usr/local/pgsql/bin/createdb test
#/usr/local/pgsql/bin/psql test
# iptables off
iptables -F
service iptables stop
chkconfig iptables off
echo 'complete provisioning!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment