Install an OpenOffice Server на CentOS

Инсталиране на OpenOffice Server

  • Инсталиране на необходимия софтуер
root $ yum install openoffice.org-headless
  • Създаване на скрипт за спиране и пускане на OpenOffice.org съръвра. Създавате файла /etc/init.d/soffice със следното съдържание:
#!/bin/bash
# chkconfig: 345 20 80
# description: init.d script for headless openoffice.org (2.3+ for RHEL5 32bit)
#
# processname: soffice
#
# source function library
. /etc/rc.d/init.d/functions

RETVAL=0
SOFFICE_PATH='/usr/lib64/openoffice.org/program'
SOFFICE_ARGS='-accept="socket,host=localhost,port=8100;urp" -headless'
SOFFICE_PIDFILE=/var/run/soffice.bin.pid

start_soffice() {
       echo -n $"Starting OpenOffice.org"
       daemon $SOFFICE_PATH/soffice.bin $SOFFICE_ARGS &
       [ $? -eq 0 ] && echo_success || echo_failure
       pidof soffice.bin > $SOFFICE_PIDFILE
       echo
}
start() {
       start_soffice
}
stop() {
       echo -n $"Stopping OpenOffice"
       killproc soffice.bin
       echo
}
case "$1" in
       start)
               start
               ;;
       stop)
               stop
               ;;
       restart)
               stop
               start
               ;;
       *)
               echo $"Usage: $0 {start|stop|restart}"
esac
  • Добавяме soffice услугата да се стартира по подразбиране и я стартираме:
root $ chmod +x /etc/init.d/soffice
root $ chkconfig --add soffice
root $ chkconfig soffice on
root $ service soffice start
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License