Install Open Office Service on Debian/(K)Ubuntu
- Install (Libre)OpenOffice-Headless as root (through su, sudo, etc.):
- Create and edit a file named libreoffice.sh (for example) with you favorite editor over /etc/init.d:
- Change the permssions to this file:
- Install openoffice.sh init script links:
- Start the service:
- You can see if libreofice is running with this command:
sudo apt-get install libreoffice
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
chmod 0755/etc/init.d/libreoffice.sh
update-rc.d libreoffice.sh defaults
/etc/init.d/./libreoffice.sh start
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
Can you please help me as i cannot get through this method?
Thanks
venky