Saturday, February 25, 2012

Bagaimana nak jadikan Open Office sebagai service running on background?

Panduan untuk Lucid - Ubuntu 10.04

Dilampirkan skrip untuk kawan2 guna,

Langkah pertaman bagi angkut dulu dari repositori:
First of all install the headless openoffice from the repositories:

sudo apt-get install openoffice.org-headless openoffice.org-writer openoffice.org-draw
 
Sekarang kita kena buat skrip untuk jalan kan servisnya,
Now you need to create a script to start it as a service:

sudo vim /etc/init.d/openoffice.sh
Macam biasa kasi salin dan tampal ajer..  
Paste the following code into that file:
#!/bin/bash
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by [email protected]
#
OOo_HOME=/usr/bin
SOFFICE_PATH=$OOo_HOME/soffice <- pastikan lokasi file ini
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
Save dan keluar dari VIM Editor,
Exit the VIM text editor saving the file as you do.

Sekarang masa utk jadikan skrip itu executable,
Now make the script executable:

sudo chmod 0755 /etc/init.d/openoffice.sh
 
Jangan lupa untuk jadikan skrip itu berjalan secara automatis setiap kali kita reboot server
Make it start automatically on reboot by executing this command:

sudo update-rc.d openoffice.sh defaults
 
Sekarang jalan kan servis itu dengan arahan dibawah,
Now start the service by running

sudo /etc/init.d/openoffice.sh start
 
Sepatutnya semua akan berjalan dengan lancar! Tahniah. 
Now all should be good!

Sekiranya masih ada masalah, sila hubungi kami di [email protected]

4 comments:

oakleyses said...

oakley sunglasses, polo outlet, nike free, uggs outlet, longchamp outlet, christian louboutin shoes, oakley sunglasses, ray ban sunglasses, christian louboutin uk, burberry handbags, christian louboutin, michael kors outlet, jordan shoes, louis vuitton outlet, replica watches, longchamp outlet, christian louboutin outlet, michael kors outlet online, kate spade outlet, polo ralph lauren outlet online, nike outlet, louis vuitton outlet, uggs on sale, longchamp outlet, ray ban sunglasses, uggs outlet, prada outlet, oakley sunglasses wholesale, oakley sunglasses, burberry outlet, nike air max, nike air max, tory burch outlet, louis vuitton, gucci handbags, ugg boots, michael kors outlet, ray ban sunglasses, michael kors outlet online, louis vuitton, replica watches, chanel handbags, cheap oakley sunglasses, michael kors outlet online, louis vuitton outlet, ugg boots, prada handbags

oakleyses said...

mulberry uk, nike air max, nike air max uk, hollister uk, hogan outlet, abercrombie and fitch uk, nike air force, nike roshe run uk, true religion outlet, nike roshe, lululemon canada, nike blazer pas cher, true religion outlet, polo lacoste, ray ban uk, guess pas cher, michael kors outlet, michael kors, oakley pas cher, nike free uk, true religion jeans, replica handbags, kate spade, sac hermes, new balance, sac longchamp pas cher, longchamp pas cher, north face uk, north face, vans pas cher, true religion outlet, burberry pas cher, jordan pas cher, louboutin pas cher, hollister pas cher, polo ralph lauren, michael kors pas cher, timberland pas cher, nike air max uk, ray ban pas cher, sac vanessa bruno, nike tn, coach outlet store online, coach purses, converse pas cher, air max, coach outlet, nike free run, michael kors, ralph lauren uk

oakleyses said...

iphone 6 cases, instyler, babyliss, ghd hair, herve leger, lululemon, s6 case, iphone 6s cases, asics running shoes, soccer jerseys, nike huaraches, reebok outlet, wedding dresses, oakley, nike roshe run, north face outlet, hollister, nike air max, nfl jerseys, hermes belt, north face outlet, nike trainers uk, mont blanc pens, timberland boots, bottega veneta, mac cosmetics, iphone 5s cases, valentino shoes, jimmy choo outlet, ferragamo shoes, louboutin, abercrombie and fitch, ipad cases, chi flat iron, ralph lauren, p90x workout, longchamp uk, beats by dre, vans outlet, mcm handbags, giuseppe zanotti outlet, iphone 6 plus cases, iphone cases, baseball bats, hollister clothing, new balance shoes, soccer shoes, celine handbags, iphone 6s plus cases, insanity workout

oakleyses said...

karen millen uk, ugg,uggs,uggs canada, converse outlet, barbour, thomas sabo, montre pas cher, wedding dresses, louis vuitton, canada goose jackets, doudoune moncler, pandora charms, ugg uk, hollister, moncler uk, barbour uk, toms shoes, supra shoes, ugg,ugg australia,ugg italia, pandora jewelry, ugg, canada goose outlet, louis vuitton, louis vuitton, marc jacobs, replica watches, vans, canada goose, canada goose outlet, moncler, converse, moncler, juicy couture outlet, hollister, swarovski crystal, moncler outlet, coach outlet, pandora jewelry, doke gabbana, moncler, moncler outlet, canada goose uk, juicy couture outlet, canada goose, ray ban, canada goose outlet, links of london, louis vuitton, canada goose, lancel, pandora uk, louis vuitton, gucci