This is a quick step-by-step process for getting Erlang (R13B04) and Webmachine running on a clean CentOS 5.4 Rackspace cloud server.
Once you create your cloud server on Rackspace, open the Web console.
Follow the instructions for Securing your cloud server. Also do the following:
$ visudo
/sudoers
# Allow sudo cmd access to new user
[new_user] ALL=(ALL) ALL
$ iptables -L
$ sudo /sbin/iptables -I RH-Firewall-1-INPUT 1 -p tcp –dport http -j ACCEPT
$ sudo /sbin/iptables -I RH-Firewall-1-INPUT 1 -p tcp –dport https -j ACCEPT
$ sudo /sbin/iptables -I RH-Firewall-1-INPUT 1 -p tcp –dport ssh -j ACCEPT
$ sudo /sbin/iptables -I RH-Firewall-1-INPUT 1 -p tcp –dport 8000 -j ACCEPT
$ sudo /sbin/services iptables save
$ iptables -L
Logout and close Web console.
Open a terminal (or Putty on Windows) and SSH as [new_user]
$ ssh [new_user]@[your cloud server ip]
$ sudo yum install gcc glibc-devel make ncurses-devel openssl-devel
$ wget http://erlang.org/download/otp_src_R13B04.tar.gz
$ tar zxvf otp_src_R13B04.tar.gz
$ cd otp_src_R13B04
$ ./configure && make && sudo make install
$ yum install python-devel rpm-buildtp://mercurial.selenic.com/release/mercurial-1.4.1.tar.gz
$ wget http://mercurial.selenic.com/release/mercurial-1.4.1.tar.gz
$ cp mercurial-1.4.1.tar.gz mercurial-1.4.1.tar.gz.orig
$ tar zxvf mercurial-1.4.1.tar.gz
$ cd mercurial-1.4.1/
$ cp contrib/mercurial.spec contrib/mercurial.spec.orig
$ sed -i -e’s/snapshot/1\.4\.1/’ contrib/mercurial.spec
$ sed -i -e’s/, docutils >= 0.5//’ contrib/mercurial.spec
$ cd ../
$ tar cvf – mercurial-1.4.1 | gzip > mercurial-1.4.1.tar.gz$ rpmbuild -tb mercurial-1.4.1.tar.gz
$ rpm -Uvh /usr/src/redhat/RPMS/i386/mercurial-1.4.1-0.x86_64.rpm
$ hg –version
$ hg clone http://bitbucket.org/basho/webmachine/
$ cp -r webmachine /home/projects
$ cd /home/projects/webmachine
$ make
$ /scripts/new_webmachine.sh ediaryAPI ..
$ cd ../e*
$ make
$ ./start.sh
Visit http://[ip]:[port]
https://wiki.basho.com/display/RIAK/Installing+Erlang
http://cloudservers.rackspacecloud.com/index.php/Firewalls
http://cloudservers.rackspacecloud.com/index.php/Basic_Cloud_Server_Security
http://cloudservers.rackspacecloud.com/index.php/Common_iptables_rules_for_CentOS_5.3
Leave a Comment