Install and configure LibreOffice-4 Amazon Ec2 Instance (Amazon Linux)

  1. Login into Ec2 instance via SSH.
  2. Upgrade Amazon Linux.a) > sudo yum updateb) Reboot instance
  3. Login into Ec2 instance via SSH.
  4. Download LibreOffice (Select package depends on OS Architecture)> sudo wget LibreOffice
  5. Extract source from tar file.> sudo tar -xvzf LibreOffice_4.0.4_Linux_x86-64_rpm.tar.gz
  6. Enter into extracted directory then RPMS folder> cd LibreOffice_4.0.4.2_Linux_x86-64_rpm> cd RPMS
  7. Now need to install all rpms except one, you can remove that.> rm -rf libobasis4.0-gnome-integration-4.0.4.2-2.x86_64.rpm
  8. Now you can able to convert document.> /opt/libreoffice4.0/program/soffice.bin –headless –convert-to pdf test.rtf
  9. If you are getting any dependencies while document conversation please fulfill dependency.
  1. All packages almost available for all Linux flavors from two sources.

          – http://pkgs.org

          – http://rpm.pbone.net

11) In my case there was dependencies for dbus-glib-0 while document conversation.

> sudo wget http://mirror.centos.org/centos/6/updates/x86_64/Packages/dbus-glib-0.86-6.el6.x86_64.rpm

OR

> sudo rpm -Uvh http://mirror.centos.org/centos/6/updates/x86_64/Packages/dbus-glib-0.86-6.el6.x86_64.rpm

Able to perform document convent process headless after successful installation of LibreOffice.

Feel free to contact if anyone need help !