April 29, 2008
Here is more or less what I did to install git on OS X and on Media Temple. Newer versions of the below files will exist by the time you are reading this i.e. now.
I got the below mostly from http://dysinger.net/2007/12/30/installing-git-on-mac-os-x-105-leopard/
# GPG (if you didn’t have it already)
curl ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.7.tar.bz2 | tar xj
cd gnupg-1.4.7
./configure
make
sudo make install
cd ..
# GetText
curl http://mirrors.usc.edu/pub/gnu/gettext/gettext-0.17.tar.gz | tar xz
cd gettext-0.17
./configure
make
sudo make install
cd ..
# GIT
curl http://kernel.org/pub/software/scm/git/git-1.5.4.4.tar.bz2 | tar xj
cd git-1.5.4.4
./configure
make
sudo make install
cd ..
curl http://www.kernel.org/pub/software/scm/git/git-manpages-1.5.4.4.tar.bz2 |
sudo tar xj -C /usr/local/share/man
# Setup GIT
git config –global user.name ‘My Name’
git config –global user.email me@mydomain.net
#can you see two dashes before “global”?
5 Comments |
Uncategorized |
Permalink
Posted by Chris Hobbs
April 15, 2008
HAPPY TAX DAY!
Deploying to Media Temple isn’t easy. You have to add a domain, make an alternate domain and configure a lot of things through something called “mtr”. In order to deploy there with capistrano and git I first compiled git on my server to the following location:
/home/####/users/.home/usr/bin/git
Then I capify my project and copy in the below deploy.rb with my custom settings and passwords. There are some tasks included such as mtr_init, mtr_generate_htaccess and mtr_create_link that help with media temple commands.
deploy.rb:
require 'mt-capistrano'
#gem install mt-capistrano --source=http://gems.mediatemple.net/
set :site, "SITE_NUMBER (4 digits probably)"
set :application, "APPLICATION"
set :webpath, "APPLICATION.com"
set :domain, "MEDIA TEMPLE DOMAIN"
set :user, "MEDIA TEMPLE USER"
set :password, "MEDIA TEMPLE PASSWORD"
set :scm, :git
set :scm_command, "/home/####/users/.home/usr/bin/git"
set :repository, "git://github.com/ckhsponge/remindblast.git"
set :deploy_to, "/home/#{site}/containers/rails/#{application}"
set :current_deploy_dir, "#{deploy_to}/current"
set :tmp_dir, "#{deploy_to}/tmp"
set :checkout, "export"
role :web, "#{domain}"
role :app, "#{domain}"
role :db, "#{domain}", :primary => true
task :after_update_code, :roles => :app do
put(File.read('config/database.yml'), "#{release_path}/config/database.yml", :mode => 0444)
end
task :mtr_init, :roles => :app do
run "cd $HOME/../../containers && mkdir -p rails && cd rails && mkdir -p #{application} && cd #{application} && mkdir -p current && cd current && mtr add #{application} $PWD #{webpath}"
run "mkdir -p $HOME/../../containers/rails/#{application}/shared"
run "mkdir -p $HOME/../../containers/rails/#{application}/shared/log"
end
task :mtr_create_link, :roles => :app do
run "mtr create_link #{application}"
end
namespace :deploy do
task :restart, :roles => :app do
#run "mtr restart #{application} -u #{user} -p #{password}"
#run "mtr generate_htaccess #{application} -u #{user} -p #{password}"
run "mtr restart #{application} -u #{user} -p #{password}"
run "mtr generate_htaccess #{application} -u #{user} -p #{password}"
#migrate
end
end
4 Comments |
Technology |
Permalink
Posted by Chris Hobbs