Update to Rails, MySQL, Ubuntu stack on AWS post
This is an update to my first post on how to setup a working environment on Amazon EC2 with Ruby on Rails, Passenger, MySQL, and Ubuntu.
Quiet a lot has changed in last three years, so I thought I’d do a quick post to improve the installation, seeing as how the old post still receives a bit of traffic.
I’m using the official Ubuntu Server 12.04 LTS ami. Here is the rundown:
# Setup Ruby on Rails, MySql, Apache + Passenger # on Amazon Ubuntu instance (12.04 LTS) # 9/7/2012 echo Updating operating system and components... sudo apt-get update -y sudo apt-get dist-upgrade -y sudo apt-get install build-essential -y sudo apt-get install libxslt-dev libxml2-dev -y sudo apt-get install curl libcurl4-openssl-dev -y sudo apt-get install zlib1g-dev libssl-dev libexpat1-dev -y echo Installing apache server, mysql utils, ruby, and git sudo apt-get install apache2 apache2-threaded-dev -y sudo apt-get install mysql-server mysql-client-core-5.5 -y sudo apt-get install git-core gitweb -y sudo apt-get install ruby1.9.2 -y sudo apt-get install imagemagick -y sudo apt-get install libmagickwand-dev -y sudo curl -L https://get.rvm.io | bash -s stable source /home/ubuntu/.rvm/scripts/rvm sudo apt-get install automake -y sudo apt-get install bison -y rvm install 1.9.2-head gem install passenger sudo passenger-install-apache2-module
A couple of big items. First, you’ll notice the addition of RVM. I found it makes my life a lot easier when managing ruby installations. Second, no gems. This is because now you’ll be managing all your gems through the bundler, which will make your life a lot easier too.
If you are using git, don’t forget to set
git config --global user.name "USERNAME" git config --global user.email "EMAIL@WEBSITE.COM"
Cheers,
Mikhail
Reblogged this on Gigable – Tech Blog.