Для чего надо: требуется для работы openmeetings

  1. Сначала ставим кучу пакетов:
    apt-get install sun-java6-bin sun-java6-jdk sun-java6-jre sun-java6-fonts mysql-server imagemagick gs-gpl libt1-5 zip unzip subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libogg-dev sox libvorbis-dev libgsm1 libgsm1-dev libfaad2 flvtool2 lame gcc-multilib autoconf automake1.9 libtool ffmpeg automake
    apt-get install openoffice.org-writer openoffice.org-calc openoffice.org-impress openoffice.org-draw openoffice.org-math openoffice.org-gcj openoffice.org-filter-binfilter openoffice.org-java-common
    apt-get install openoffice.org-headless
  2. Создаем файл для запуска сервиса:
    vi /etc/init.d/openoffice.sh
    openoffice.sh
    #!/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
    chmod 0755 /etc/init.d/openoffice.sh
    update-rc.d openoffice.sh defaults
    
  3. Запускаем сервис и проверяем его доступность:
    /etc/init.d/./openoffice.sh start
    netstat -nap | grep office
    
openoffice_converter.txt · Последние изменения: 2013/10/23 15:22 (внешнее изменение)
GNU Free Documentation License 1.3
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Яндекс.Метрика