Install Open Office Service on Debian/(K)Ubuntu


  1. Install (Libre)OpenOffice-Headless as root (through su, sudo, etc.):
  2. sudo apt-get install libreoffice
  3. Create and edit a file named libreoffice.sh (for example) with you favorite editor over /etc/init.d:
  4. vi /etc/init.d/libreoffice.sh
    #!/bin/bash# libreoffice.org  headless server script## chkconfig: 2345 80 30# description: headless libreoffice server script# processname: libreoffice# # Author: Vic Vijayakumar# Modified by Federico Ch. Tomasczik# Modified by Manuel Vega UlloaOOo_HOME=/usr/bin
    SOFFICE_PATH=$OOo_HOME/soffice
    PIDFILE=/var/run/libreoffice-server.pid
    set-e
    case"$1"in
        start)if[-f $PIDFILE ];then
          echo "LibreOffice headless server has already started."
          sleep 5exitfi
          echo "Starting LibreOffice headless server"
          $SOFFICE_PATH -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp"&>/dev/null2>&1
          touch $PIDFILE
        ;;
        stop)if[-f $PIDFILE ];then
          echo "Stopping LibreOffice headless server."
          killall -9 soffice && killall -9 soffice.bin
          rm -f $PIDFILE
          exitfi
          echo "LibreOffice headless server is not running."exit;;*)
        echo "Usage: $0 {start|stop}"exit1esacexit0
  5. Change the permssions to this file:
  6. chmod 0755/etc/init.d/libreoffice.sh
  7. Install openoffice.sh init script links:
  8. update-rc.d libreoffice.sh defaults
  9. Start the service:
  10. /etc/init.d/./libreoffice.sh start
  11. You can see if libreofice is running with this command:
  12. netstat -nap | grep office

You should get something like this:

tcp        00127.0.0.1:81000.0.0.0:*
LISTEN     2467/soffice.bin 
  • Service libreoffice start automatically when you restart the next time your server.

Comentarios

Venky ha dicho que…
I need installation of libraoffice which can be access via webrowser, as specified by this link https://wiki.documentfoundation.org/Using_LibreOffice_in_a_Web_Browser#Compiling_LibreOffice

Can you please help me as i cannot get through this method?

Thanks
venky

Entradas populares