Skip to content

Instantly share code, notes, and snippets.

@madmanlear
Created June 20, 2012 18:28
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 madmanlear/2961417 to your computer and use it in GitHub Desktop.
Save madmanlear/2961417 to your computer and use it in GitHub Desktop.
Setting up a new Ubuntu Server for Git, Ruby on Rails, and MySql
User setup
http://articles.slicehost.com/2010/4/30/ubuntu-lucid-setup-part-1
(follow all the steps up until ipTables)
Install essentials and compilers
# sudo aptitude update
# sudo apt-get install build-essential zlib1g zlib1g-dev
Install CURL
# sudo apt-get install curl
Install GIT and Ruby/Rails
http://aaronvb.com/articles/38-setting-up-an-ubuntu-server-with-ruby-1-9-2-and-rails-3-1
Install MySql
# sudo apt-get install mysql-server
# sudo apt-get install libmysql-ruby libmysqlclient-dev
Setup Deploy
Use above link again
Setup Apache and Passenger
# sudo aptitude install apache2
# rvmsudo gem install passenger
# sudo apt-get install apache2-prefork-dev
# sudo apt-get install libapr1-dev
# sudo apt-get install libaprutil1-dev
# rvmsudo passenger-install-apache2-module
(Some of these items will have likely been installed in previous steps)
Add these lines to Apache config file (probably at /etc/apache2/apache2.conf):
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.13
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p320/ruby
Keep going with above link to create a virtual host for the default site
If you have issues with deploy (can't find Bundle), add this to your Capfile:
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require "rvm/capistrano" # Load RVM's capistrano plugin.
Install and setup Sendmail to... send mail
http://www.seanbehan.com/linux/using-sendmail-to-send-mail-on-ubuntu-box/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment