install open office (headless) service

install openoffice headless dengan perintah

g3n1k@g3n1k:~$ sudo apt-get install openoffice.org-headless

pada ubuntu 10.10 open office sudah terinstall otomatis, jika mencoba untuk menginstall layanan headless pasti akan diberikan pesan seperti berikut

buat sebuah file shell script untuk menginstall service

g3n1k@g3n1k:~$ sudo nano /etc/init.d/openoffice.sh

pastekan

#!/bin/bash
# openoffice.org  headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
#
OOo_HOME=/usr/bin
SOFFICE_PATH=$OOo_HOME/soffice
PIDFILE=/var/run/openoffice-server.pid

set -e

case "$1" in
 start)
 if [ -f $PIDFILE ]; then
 echo "OpenOffice headless server has already started."
 sleep 5
 exit
 fi
 echo "Starting OpenOffice headless server"
 $SOFFICE_PATH -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
 touch $PIDFILE
 ;;
 stop)
 if [ -f $PIDFILE ]; then
 echo "Stopping OpenOffice headless server."
 killall -9 soffice && killall -9 soffice.bin
 rm -f $PIDFILE
 exit
 fi
 echo "Openoffice headless server is not running."
 exit
 ;;
 *)
 echo "Usage: $0 {start|stop}"
 exit 1
esac
exit 0

memberi ijin eksekusi

g3n1k@g3n1k:~$ sudo chmod 0755 /etc/init.d/openoffice.sh

menambahkan dalam start service -> ini akan membuat service berjalan setiap kali server restart

g3n1k@g3n1k:~$ sudo update-rc.d openoffice.sh defaults

start service

g3n1k@g3n1k:~$ sudo /etc/init.d/./openoffice.sh start

memberikan keterangan
Starting OpenOffice headless server

check layanan net office

g3n1k@g3n1k:~$ sudo netstat -nap | grep office

Published by

G3n1k

just to remember what i had known :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s