Skip to content

Commit

Permalink
rails app db creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinphatak committed Sep 30, 2010
1 parent 6bea0ca commit b566964
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pem
20 changes: 18 additions & 2 deletions ffcrm-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
apt-get update
echo "mysql-server mysql-server/root_password select root" | debconf-set-selections
echo "mysql-server mysql-server/root_password_again select root" | debconf-set-selections
apt-get install -y ruby-full build-essential
apt-get install -y libopenssl-ruby ruby1.8-dev irb
apt-get install -y apache2 apache2-mpm-prefork apache2-prefork-dev
Expand All @@ -21,8 +23,22 @@ wget http://rubygems.org/downloads/rake-0.8.3.gem
gem install -l rails-2.3.8.gem --no-ri --no-rdoc
gem install passenger -v2.2.15 --no-ri --no-rdoc
gem install rmagick -v2.13.1 --no-ri --no-rdoc
/var/lib/gems/1.8/bin/passenger-install-apache2-module
/var/lib/gems/1.8/bin/passenger-install-apache2-module -a
wget http://download.github.com/michaeldv-fat_free_crm-0.10.1-0-ga897de7.tar.gz
tar -xzf *.tar.gz
tar -xzf michaeldv-fat_free_crm-0.10.1-0-ga897de7.tar.gz
mv michaeldv-fat_free_crm-d5315a2/ fatfreecrm
cd fatfreecrm
mysql -uroot -proot -e "create database fat_free_crm_production"
cp config/database.mysql.yml config/database.yml
sed -i 's/password:/password: root/g' config/database.yml
sed -i 's/socket: \/tmp\/mysql\.sock/hostname: localhost/g' config/database.yml
/var/lib/gems/1.8/bin/rake crm:setup RAILS_ENV=production
echo "" >> /etc/apache2/apache2.conf
echo "# Passenger configuration" >> /etc/apache2/apache2.conf
echo "LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so" >> /etc/apache2/apache2.conf
echo "PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.15" >> /etc/apache2/apache2.conf
echo "PassengerRuby /usr/bin/ruby1.8" >> /etc/apache2/apache2.conf
echo "" >> /etc/apache2/apache2.conf



0 comments on commit b566964

Please sign in to comment.