Created
May 6, 2014 08:50
-
-
Save ahmadsoe/10e36cf0d899d4cb4d9d to your computer and use it in GitHub Desktop.
Install postgresql 9.3, latest redis on ubuntu 12.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Update System | |
echo "System Update" | |
sudo apt-get -y update | |
echo "Update completed" | |
# Dependency Package Install | |
sudo apt-get -y install libssl-dev build-essential pkg-config git | |
sudo apt-get -y install python-software-properties python | |
# Add Package | |
echo "Add Redis repository" | |
sudo add-apt-repository ppa:rwky/redis | |
# Update System | |
echo "System Update" | |
sudo apt-get -y update | |
echo "Update completed" | |
# Install Redis - http://askubuntu.com/questions/88265/how-to-find-the-latest-version-of-redis-server-in-repos | |
echo "Install Redis" | |
sudo apt-get -y install redis-server | |
echo "Redis install completed." | |
### Postgresql | |
REPO_FILE=/etc/apt/sources.list.d/pgdg.list | |
if [[ ! -f $REPO_FILE ]]; then | |
touch $REPO_FILE | |
fi | |
REPOSITORY="deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | |
if [[ -z $(grep $REPOSITORY $REPO_FILE) ]]; then | |
echo $REPOSITORY >> $REPO_FILE | |
end | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ | |
sudo apt-key add - | |
apt-get -y update | |
apt-get install -y postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 postgresql-doc-9.3 | |
echo " * DONE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment