5 if test ! -e "reset.sh" ; then
6 cat > "reset.sh" << FIN
8 curl https://s3.amazonaws.com/finalsclub.org/boot.sh | sh
16 yes | yum --nogpgcheck install gcc-c++
17 yes | yum --nogpgcheck install openssl-devel
18 yes | yum --nogpgcheck install make
19 yes | yum --nogpgcheck install git
20 yes | yum --nogpgcheck install sqlite-devel
22 yes | yum --nogpgcheck install mysql-server
23 # /etc/init.d/mysqld start
24 # /usr/bin/mysqladmin -u root password 'foobarbazquX'
28 if test ! -e mongodb.tgz ; then
29 curl http://fastdl.mongodb.org/linux/mongodb-linux-i686-$mongover.tgz > mongodb-linux-i686-$mongover.tgz
30 tar xzf mongodb-linux-i686-$mongover.tgz
31 cd mongodb-linux-i686-$mongover/bin
34 cp -f * /usr/local/bin
35 echo "/usr/local/bin &> /var/log/mongod.log &" >> /etc/rc.local
37 /usr/local/bin/mongod -v --rest --replSet finalsclubset &> /var/log/mongod.log &
39 ## optional arbiter start command
40 ## mkdir -p /data/arbiterdb
41 ## /usr/local/bin/mongod -v --dbpath /data/arbiterdb --port 27021 --rest --replSet finalsclubset &> /var/log/mongod-arbiter.log &
47 if test ! -e node-$nodever ; then
48 curl http://nodejs.org/dist/node-$nodever.tar.gz > node-$nodever.tar.gz
49 tar xzvf node-$nodever.tar.gz
57 if test ! -e npm ; then
58 git clone http://github.com/isaacs/npm.git
64 npm install nodemon -g
65 npm install forever -g
67 ## make it easier for root to run node
69 ln -sf /usr/local/bin/node .
70 ln -sf /usr/local/bin/forever .
74 ## haproxy install (optional)
75 # assumes this script is running as root
76 mkdir /usr/local/haproxy
78 wget http://haproxy.1wt.eu/download/1.4/bin/haproxy-1.4.17-pcre-40kses-linux-i586.notstripped.gz
79 gunzip haproxy-1.4.17-pcre-40kses-linux-i586.notstripped.gz
80 ln -sf haproxy-1.4.17-pcre-40kses-linux-i586.notstripped haproxy
82 wget https://s3.amazonaws.com/finalsclub.org/haproxy.cfg
85 ## command to start haproxy (from /usr/local/haproxy dir)
86 # sudo /usr/local/haproxy/haproxy -f /usr/local/haproxy/haproxy.cfg -p /var/run/haproxy.pid &
90 curl https://s3.amazonaws.com/finalsclub.org/start.sh | sudo -u ec2-user sh