censhare uses LibreOffice/OpenOffice to preview Word and Excel documents.



Linux LibreOffice


For more information, see download latest RPM.


create install folder

{ # as corpus@application_host test -d /opt/corpus/install | mkdir -p /opt/corpus/install  }
CODE

copy LibreOffice to corpus@application_host:install/

scp ~/Downloads/LibreOffice_*.tar.gz  corpus@application_host:install/
CODE

install packages

{ # as root@application_host
pkglist="cairo-devel cups-devel libpng-devel libXinerama libSM libICE"
test -f /etc/SuSE-release && {
zypper install $pkglist
} || {
   test -f /etc/redhat-release && {
      yum install $pkglist
      } } || {
      echo "Unknown OS. Please install $pkglist."
   }
}
CODE

identify software to install

{ # as root@application_host
    cd /opt/corpus/install
      loinst=$(\ls -1tr LibreOffice*.tar.gz | tail -1); test -z "$loinst" && {
        echo "nothing found to unpack..."
      } || {
        echo "'$loinst' becomes installed."
      }
}
CODE

extract and install

{ # as root@application_host tar xvfz $loinst; cd LibreOffice_*/RPMS && rpm -Uvih --force *rpm }
CODE

verify your LibreOffice installation

{ # as corpus@application_host
/opt/libreoffice5.2/program/soffice.bin --accept="socket,host=127.0.0.1,port=17777,tcpNoDelay=1;urp;" --nodefault --nofirststartwizard --nolockcheck --nologo --norestore --headless --nofirststartwizard
}
CODE

Port 17777 should be open.

Linux OpenOffice

For more information, see download latest English US release.

check OpenOffice is not installed already

{ # as root@application_host
rpm -qa | grep -i openoffice
}
CODE

no output=no office installed -> go on

create install and tools folder

{ # as corpus@application_host
test -d /opt/corpus/install | mkdir -p /opt/corpus/install; test -d /opt/corpus/tools | mkdir -p /opt/corpus/tools; 
}
CODE

copy OpenOffice to corpus@application_host:install/

scp Apache_OpenOffice_*.tar.gz  corpus@application_host:install/
CODE

identify software to install

{ # as root@application_host
    cd /opt/corpus/install
      OO=$(\ls -1tr Apache_OpenOffice*.tar.gz | tail -1); test -z "$OO" && {
        echo "nothing found to unpack..."
      } || {
        echo "'$OO' becomes installed."
      }
}
CODE

extract and install

{ # as root@application_host tar xvfz $OO; cd en-US/RPMS/ && rpm -Uvih --force --relocate /opt/=/opt/corpus/tools/ *rpm }
CODE

install glibc, netcat, freetype-devel

{ # as root@application_host
test -f /etc/SuSE-release && {
zypper install glibc netcat libXext libXt freetype-devel
} || {
   test -f /etc/redhat-release && {
      yum install glibc nc libXext libXt freetype-devel
      } } || {
      echo "unknown OS. Please install glibc, netcat, libXext, libXt, freetype-devel."
   }
}
CODE

verify your OpenOffice installation

{ # as corpus@application_host
/opt/corpus/tools/openoffice4/program/soffice -accept="socket,host=127.0.0.1,port=17777,tcpNoDelay=1;urp;" -nodefault -nofirststartwizard -nolockcheck -nologo -norestore -headless -nofirststartwizard
}
CODE

Port 17777 should be open

LEGACY: Solaris 11

enter directory and create folder

corpus:~>
test -d /opt/corpus/install/openoffice | mkdir -p /opt/corpus/install/openoffice && cd /opt/corpus/install/openoffice
CODE

download

corpus:~> wget http://www.openfoundry.org/of/download_path/osscd/3.4.0-1/Apache_OpenOffice_incubating_3.4.0_Solaris_x86_install_en-US.tar.gz
CODE

extract

corpus:~> tar xvfz Apache_OpenOffice_incubating_3.4.0_Solaris_x86_install_en-US.tar.gz
CODE

search for freetye and install The FreeType Project

corpus:~> pkg search freetype
CODE

install freetype

Example:

root:~> pkg install pkg:/system/library/freetype-2@2.4.9-0.175.1.0.0.24.1317
CODE

add packages

root:~> cd /opt/corpus/install/openoffice && pkgadd -R /opt/corpus/tools/ -d en-US/packages
corpus:~> cd /opt/corpus/tools/ && ln -s /opt/corpus/tools/opt/openoffice.org . && ln -s /opt/corpus/tools/opt/openoffice.org3
CODE

Verify your installation


LEGACY: Solaris 10


enter directory and create folder

test -d /data/install/openoffice | mkdir -p /data/install/openoffice && cd /data/install/openoffice
CODE

download

wget http://www.openfoundry.org/of/download_path/osscd/3.4.0-1/Apache_OpenOffice_incubating_3.4.0_Solaris_x86_install_en-US.tar.gz
CODE

extract

tar xvfz Apache_OpenOffice_incubating_3.4.0_Solaris_x86_install_en-US.tar.gz
CODE

install freetye including dependencies (zlib, libgcc, gcc)

For more information, see this www.sunfreeware.com.

local:~> scp /Volumes/Files/censhare/censhare-3rdParty/Sunfreeware/Sol10/freetype-2.4.2-sol10-x86-local.gz corpus@cust-srv:install/
root:~> cd /opt/corpus/install/ && pkgadd -d freetype-2.4.2-sol10-x86-local
CODE

add packages 

root:~> cd /opt/corpus/install/openoffice && pkgadd -d en-US/packages
corpus:~> cd /opt/corpus/tools/ && ln -s /opt/openoffice.org . && ln -s /opt/openoffice.org3
CODE

Verify your installation.