Skip to content

Instantly share code, notes, and snippets.

@marcofanti
Created September 8, 2013 17:39
Show Gist options
  • Save marcofanti/6486799 to your computer and use it in GitHub Desktop.
Save marcofanti/6486799 to your computer and use it in GitHub Desktop.
MAP version 2.5 prerequisites
#install java
sudo yum -y install java-1.6.0-openjdk-devel.x86_64
sudo yum -y install curl-devel
#dependencies needed by RVM
sudo yum -y install which gcc gcc-c++ make gettext-devel expat-devel zlib-devel openssl-devel
sudo yum -y install perl cpio gettext-devel wget bzip2
sudo yum -y install sendmail mailx
sudo yum -y install libxml2 libxml2-devel libxslt libxslt-devel readline-devel patch git
echo '************* Done part 1 ***********'
# install RVM
curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer -o /tmp/rvm-installer
chmod +x /tmp/rvm-installer
sudo su
export PATH=$PATH:/usr/sbin/
rvm_bin_path=/usr/local/rvm/bin rvm_man_path=/usr/local/rvm/man /tmp/rvm-installer --version latest
exit
echo '************* Done part 2 ***********'
# install Ruby 1.8.7
sudo rvm autolibs enable
sudo rvm install ruby-1.8.7-p370
sudo rvm alias create default ruby-1.8.7-p370
# install SQLITE (needed for gems)
sudo yum -y install curl-devel sqlite-devel
mkdir -p /tmp/sqlite-lite
pushd /tmp/sqlite-lite
wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
tar xvzf sqlite-autoconf-3070500.tar.gz
cd sqlite-autoconf-3070500
./configure
make
sudo make install
popd
rm -rf /tmp/sqlite-lite
# install BUNDLER
sudo gem install bundler
# install PASSENGER
sudo yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel
export rvmsudo_secure_path=1
rvmsudo gem install --no-rdoc --no-ri rails passenger
source /usr/local/rvm/environments/ruby-1.8.7-p370
rvmsudo /usr/local/rvm/gems/ruby-1.8.7-p370/bin/passenger-install-apache2-module
sudo chcon -R -h -t httpd_sys_content_t /usr/local/rvm/gems/ruby-1.8.7-p370
# install TOMCAT6
sudo wget http://jpackage.org/jpackage50.repo -P /etc/yum.repos.d/
mkdir -p /tmp/tomcat6
pushd /tmp/tomcat6
wget https://github.com/downloads/pallet/pallet/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
sudo /bin/rpm -ivh --replacepkgs jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
sudo yum -y install tomcat6 tomcat6-webapps tomcat6-admin-webapps
popd
rm -rf /tmp/tomcat6
#install MOD_JK
mkdir -p /tmp/mod_jk
pushd /tmp/mod_jk
wget http://www.carfab.com/apachesoftware//tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.37-src.tar.gz
tar xvf tomcat-connectors-1.2.37-src.tar.gz
cd tomcat-connectors-1.2.37-src/native
./configure -with-apxs=/usr/sbin/apxs
make
sudo make install
popd
rm -rf /tmp/mod_jk
#
# sudo vi /etc/httpd/conf/httpd.conf
#
# /usr/lib64/httpd/modules/mod_jk.so
#
# install ANDROID
sudo mkdir -p /usr/local/android/sdk
wget http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz -O - | sudo /bin/tar -xzC /usr/local/android/sdk --strip-components=1
sudo /usr/local/android/sdk/tools/android update sdk --no-ui --filter tool,platform-tool
export PATH=$PATH:/usr/local/android/sdk/platform-tools
echo '************* Done part 3 ***********'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment