Skip to content

Instantly share code, notes, and snippets.

@thenoseman
Created September 11, 2009 12:37
Show Gist options
  • Save thenoseman/185270 to your computer and use it in GitHub Desktop.
Save thenoseman/185270 to your computer and use it in GitHub Desktop.
ALLES ALS ROOT:
---------------
apt-get -y install build-essential libssl-dev libreadline5-dev zlib1g-dev libxslt-dev libxml2-dev lynx telnet subversion
mkdir -p /opt/local/ruby/sources
mkdir -p /opt/local/ruby/runtimes
cd /opt/local/ruby/sources
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.7-p174.tar.bz2
tar xzf ruby-1.8.7-p174.tar.bz2
cd ruby-1.8.7-p174
cd /opt/local/ruby/sources/ruby-1.8.7-p174
./configure --prefix=/opt/local/ruby/runtimes/1.8.7-p174 --with-openssl-dir=/usr --with-readline-dir=/usr --with-zlib-dir=/usr make; make install
ln -s /opt/local/ruby/runtimes/1.8.7-p174 /opt/local/ruby/runtimes/current
export PATH=/opt/local/ruby/runtimes/current/bin:$PATH
echo "export RAILS_ENV=production" >> /home/autozworld/.bashrc
echo "export PATH=/opt/local/ruby/runtimes/current/bin:\$PATH" >> /home/autozworld/.bashrc
#Test:
ruby -ropenssl -rzlib -rreadline -e "puts :success"
cd /opt/local/ruby/sources/
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xzf rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb
gem sources -a http://gems.github.com
gem install mysql rails passenger nokogiri --no-ri --no-rdoc
/opt/local/ruby/runtimes/1.8.7-p174/bin/passenger-install-apache2-module
Edit vi /etc/apache2/mods-available/passenger.conf :
LoadModule passenger_module /opt/local/ruby/runtimes/1.8.7-p174/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /opt/local/ruby/runtimes/1.8.7-p174/lib/ruby/gems/1.8/gems/passenger-2.2.5
PassengerRuby /opt/local/ruby/runtimes/1.8.7-p174/bin/ruby
ln -s /etc/apache2/mods-available/passenger.conf /etc/apache2/mods-enabled/
apache2ctl configtest
apache2ctl restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment