setting-up etherpad in centos 6

To add to my tutorial collection, here’s how to setup EtherPad on CentOS 6 (x64). As in the IRC tutorial, I used a Digital Ocean VM for this 🙂

What is EtherPad? It’s an open-source collaborative text editor that works like Google Docs – ie, all editors/viewers can see changes from everyone else in realtime.

Here’s how I did it: (props to the EtherPad docs and this other tutorial on Node.js)

  • acquire a CentOS server – I used Digital Ocean
  • make sure you have enough swap space (if you use the smallest Digital Ocean “droplet”, you really need to give yourself 2-4G swap)
    • dd if=/dev/zero of=/swapfile bs=8192 count=524288
    • mkswap swapfile
    • swapon swapfile
    • add this line to the end of your /etc/fstab:
      • /swapfile swap swap defaults 0 0
  • run the following as root:
    • yum -y install gzip git-core curl python openssl-devel && yum groupinstall
    • yum -y install screen gcc gcc-c++ make wget curl
      • note – it’s not always called “gcc-c++”; make sure you use the correct package name for your platform
      • you can find out the correct package name by doing a `yum provides */g++` search
    • yum -y upgrade
      • bring everything up to date – it’s equivalent to `yum -y update –obsoletes`
    • adduser etherpad
    • su – etherpad
    • git clone git://github.com/ry/node.git
    • cd node && ./configure && make && make install
    • cd
    • git clone git://github.com/ether/etherpad-lite.git
    • cd etherpad-lite
    • screen bin/run.sh
  • load http://127.0.0.1:9001 in your browser (substitute the IP/DNS name of your server as appropriate – mine was http://107.170.150.57:9001)
  • for maintenance purposes, you should also do a `git pull origin` for EtherPad periodically

Some notes on the above:

  • if you already have swap space and/or don’t want to worry about it (though I recommend you do), you can skip it
  • I’ve put the `-y` option after every `yum` call presuming you really mean to run it, and you don’t care about dependencies
    • if you aren’t using a fresh server (EtherPad certainly doesn’t require it’s own), you may want to be a little more cautious about the `yum` commands 🙂
  • you should create a start-up script to ensure EtherPad is running if you need to reboot
  • the EtherPad docs have all kinds of further things you can do – this is just a “get it going and start using it” tutorial 🙂