-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprovision-centos
executable file
·68 lines (52 loc) · 1.83 KB
/
provision-centos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# This actually needs to be a script that runs remotely using SSH so that we can also copy across the bosh_environment file to AWS
if [ ! -d ~/workspace ]; then
mkdir -p ~/workspace
fi
echo "install: --no-ri --no-rdoc
update: --no-ri --no-rdoc
" >~/.gemrc
sudo yum -y groupinstall 'Development Tools'
sudo yum install -y git gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel postgresql postgresql-devel mysql-server mysql-devel sqlite-devel golang gcc-c++
# Install Chruby version 1.9.3-p547 using RVM or RBENV package managers
wget -O chruby-0.3.8.tar.gz https://github.com/postmodern/chruby/archive/v0.3.8.tar.gz
tar -xzvf chruby-0.3.8.tar.gz
cd chruby-0.3.8/
sudo make install
# Setup chruby Ruby etc
sudo ./scripts/setup.sh
cd ..
#add to ~/.bashrc
echo "source /usr/local/share/chruby/chruby.sh" >> ~/.bashrc
echo "chruby 1.9.3" >> ~/.bashrc
ruby-install ruby 1.9.3
#and run at command line
source /usr/local/share/chruby/chruby.sh
echo "chruby 1.9.3" >> ~/.bashrc
chruby 1.9.3
chruby #check that you have ruby 1.9.3
gem install nokogiri -- --use-system-libraries
gem install bundler
gem install -V bosh_cli
gem install -V bosh_cli_plugin_micro
gem install -V bosh_cli_plugin_aws
#Install Spiff
cd ~/workspace
wget https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.3/spiff_linux_amd64.zip
unzip spiff_linux_amd64.zip
sudo mv spiff /usr/local/bin
rm spiff_linux_amd64.zip
#Install CF CLI
wget "https://cli.run.pivotal.io/stable?release=linux64-binary&source=github"
mv "stable?release=linux64-binary&source=github" cli.tar.gz
tar -zxvf cli.tar.gz
sudo mv cf /usr/local/bin
#install Silver Searcher
sudo yum install -y pcre-devel
sudo yum install xz-devel
cd /usr/local/src
sudo git clone https://github.com/ggreer/the_silver_searcher.git
cd the_silver_searcher
sudo ./build.sh
sudo make install
which ag