Automaticlly install mysql ree rails on Amazon EC2 Amazon Linux

yum remove -y ruby
yum install -y gcc make patch zlib-devel  openssl-devel  c++  gcc  gcc-c++   gcc-c++  readline-devel curl-devel mysql mysql-server curl mysql-devel

mkdir ~/src
cd ~/src
wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.03.tar.gz
tar xzvf ruby-enterprise-1.8.7-2011.03.tar.gz
./ruby-enterprise-1.8.7-2011.03/install

ln -s /opt/ruby-enterprise-1.8.7-2011.03/bin/ruby /usr/bin/ruby
ln -s /opt/ruby-enterprise-1.8.7-2011.03/bin/gem /usr/bin/gem
ln -s /opt/ruby-enterprise-1.8.7-2011.03/bin/rake /usr/bin/rake
ln -s /opt/ruby-enterprise-1.8.7-2011.03/bin/bundle /usr/bin/bundle

sudo service mysqld start

/usr/bin/mysqladmin -u root password 'new-password'

你可能感兴趣的:(Install)