#!/bin/bash mkdir /mnt/resource/riak ln -s /mnt/resource/riak /var/lib/ yum -y install http://yum.basho.com/gpg/basho-release-6-1.noarch.rpm yum -y install riak IP=`hostname -i` perl -pi -e "s/127\.0\.0\.1/$IP/g" /etc/riak/vm.args perl -pi -e "s/127\.0\.0\.1/$IP/g" /etc/riak/app.config perl -pi -e 's/\{http, \[/\{http, \[\{\"127.0.0.1\",8098\},/' /etc/riak/app.config iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8098 -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 6000:7999 -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 4369 -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8099 -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8087 -j ACCEPT iptables-save > /etc/sysconfig/iptables service iptables restart cd /etc/riak patch -p1 <