Permalink
Browse files

Added installation instructions

  • Loading branch information...
1 parent 508dae5 commit a9bd55d23d3003c59dbf9748266b97836020dd6e @jawj committed Apr 16, 2012
Showing with 52 additions and 0 deletions.
  1. +52 −0 INSTALL-EC2.txt
View
@@ -0,0 +1,52 @@
+
+# EC2 basic Linux micro instance -- with open port 22 for me and port 80 for everyone
+
+ssh -i ~/.ssh/ucl-aws-key.pem ec2-user@example.aws.com
+
+sudo yum update
+sudo yum install gcc-c++ make openssl-devel screen
+sudo yum install htop --enablerepo=epel
+
+cd && mkdir src && cd src
+
+wget http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz
+tar xzvf node-[tab]
+cd node-[tab]
+export JOBS=2
+./configure
+make
+sudo make install
+
+sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
+sudo /sbin/service iptables save
+
+
+# create .screenrc
+
+escape ``
+hardstatus alwayslastline
+hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
+
+
+# add to top of .bashrc
+
+# Auto-screen invocation. see: http://taint.org/wk/RemoteLoginAutoScreen
+if [ "$PS1" != "" -a "${STARTED_SCREEN:-x}" = x -a "${SSH_TTY:-x}" != x ]
+then
+ STARTED_SCREEN=1 ; export STARTED_SCREEN
+ sleep 1
+ screen -RR && exit 0
+ # normally, execution of this rc script ends here...
+ echo "Screen failed! continuing with normal bash startup"
+fi
+
+
+sudo useradd nodejs
+sudo su - nodejs
+
+BASE=https://github.com/jawj/robinremote/raw/master
+wget -q -N $BASE/server.coffee $BASE/index.html.gz
+
+npm install websocket coffee-script
+
+node_modules/coffee-script/bin/coffee server.coffee

0 comments on commit a9bd55d

Please sign in to comment.