2 useradd -m -s /bin/bash opensrf
4 echo "127.0.1.2 public.localhost public" >> /etc/hosts
5 echo "127.0.1.3 private.localhost private" >> /etc/hosts
6 chown -R opensrf:opensrf /opensrf/
7 /etc/rc.d/ejabberd stop
8 echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd
9 patch -N -p1 /etc/ejabberd/ejabberd.cfg < /etc/ejabberd/opensrf.patch
10 /etc/rc.d/ejabberd start
13 ejabberdctl --node ejabberd@`hostname -s` register router private.localhost password
14 ejabberdctl --node ejabberd@`hostname -s` register opensrf private.localhost password
15 ejabberdctl --node ejabberd@`hostname -s` register router public.localhost password
16 ejabberdctl --node ejabberd@`hostname -s` register opensrf public.localhost password
18 #cp /opensrf/conf/opensrf.xml.example /opensrf/conf/opensrf.xml
19 #cp /opensrf/conf/opensrf_core.xml.example /opensrf/conf/opensrf_core.xml
20 su - opensrf -c "cp /opensrf/conf/srfsh.xml.example /home/opensrf/.srfsh.xml"
22 echo "export PATH=/opensrf/bin:\$PATH" | sudo -u opensrf tee -a /home/opensrf/.bashrc
24 #/etc/rc.d/memcached start
25 #recommended to use opensrf user