Last active
September 28, 2017 09:37
-
-
Save nunosilva800/e9b919cb8b47e88cd10a to your computer and use it in GitHub Desktop.
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
echo "* Updating system" | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
echo "* Installing packages" | |
sudo apt-get -y install build-essential libxml2-dev libxslt1-dev git-core nginx redis-server postgresql-client libpq5 libpq-dev curl nodejs htop | |
sudo locale-gen pt_PT.UTF-8 | |
sudo dpkg-reconfigure locales | |
echo "* Installing rvm" | |
. /etc/profile.d/rvm.sh &> /dev/null | |
type rvm &> /dev/null | |
if [ $? -ne 0 ] | |
then | |
curl -L https://get.rvm.io | bash -s | |
echo "source /etc/profile.d/rvm.sh" >> /etc/bash.bashrc | |
. /etc/profile.d/rvm.sh &> /dev/null | |
else | |
echo "* rvm already installed" | |
fi | |
cat /etc/environment | grep RAILS_ENV | |
if [ $? -ne 0 ] | |
then | |
echo "RAILS_ENV=production" >> /etc/environment | |
fi | |
echo "* Install ruby version 2.2.0" | |
ruby -v &> /dev/null | |
if [ $? -ne 0 ] | |
then | |
rvm install 2.2.0 | |
else | |
echo "* Ruby already installed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
after this, using capistrano:
setup .env , etc...