`

openoffice linux 服务安装

 
阅读更多

1. 启动脚本编写(cd /etc/Init.d)

 

#!/bin/bash  
  
# Boot open office so that Alfresco can do transforms.  
# chkconfig: 2345 55 25  
# description: OpenOffice Headless  
#  
# processname: soffice  
  
# source function library  
. /etc/rc.d/init.d/functions  
  
RETVAL=0  
  
VDISPLAY='99'  
SOFFICE_PATH='/opt/openoffice4/program/'  
SOFFICE_ARGS1="-nofirststartwizard -nologo -headless -display :$VDISPLAY "  
SOFFICE_ARGS2='-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager'  
SOFFICE_PIDFILE=/var/run/soffice.pid  
  
start_soffice() {  
       echo -n $"Starting OpenOffice"  
       $SOFFICE_PATH/soffice $SOFFICE_ARGS1 $SOFFICE_ARGS2 >/dev/null 2>&1 &  
       [ $? -eq 0 ] && echo_success || echo_failure  
       pidof soffice > $SOFFICE_PIDFILE  
       echo  
}  
  
start() {  
       start_soffice  
}  
stop() {  
       echo -n $"Stopping OpenOffice"  
       killproc soffice  
       echo  
}  
case "$1" in  
       start)  
               start  
               ;;  
       stop)  
               stop  
               ;;  
       restart)  
               stop  
               start  
               ;;  
       *)  
               echo $"Usage: $0 {start|stop|restart}"  
esac  

 2.命令授权

 

   

chmod 755 soffice  

 

 3.命令启动

 

service soffice start/stop/restart  

 

参考自:http://blog.sina.com.cn/s/blog_6c969b4a0102vmsn.html

   

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics