Auto Install OpenOffice1.1.2

No Hastle Network Deployment

John Stile <john@stilen.com>

linuxdojo.net

Background

To setup OpenOffice on a large network for many users, at least 2 installs are required.

Netowrk/System Install (200Mb) by the Sys Admin (creates main program)

Per User Install (1.9 Mb) by each user (creates config files)

The Per User Install creates confusion for end users, which leads to support calls.

Avoid support calls by automating the Per User Install

This lecture covers:

Manual Network/System Install

An Automated Per User Install

A script that makes it easy for end users.

John Stile <john@stilen.com>

linuxdojo.net

John Stile <john@stilen.com>

linuxdojo.net

Overview of Procedure

Install JRE and system wide OO.

Modify networked OO files.

Create responce file for automated per user set up.

Run OO setup with responce file via my scritp.

John Stile <john@stilen.com>

linuxdojo.net

Setup JRE

Good JRE install How-To:

http://www.goland.org/Tech/Installing_Java_in_Mandrake_9_1.html

Summery:

Download J2SE from java.sun.com.

As root, run the downloaded binary.

As root, install the resulting rpm

Set JAVA_HOME and PATH before Network Install:

export JAVA_HOME=/opt/j2sdk_nb/j2sdk1.4.2/jre/bin

export PATH=$PATH:$JAVA_HOME

For a networked jdk:

export JAVA_HOME=/net/j2sdk_nb/j2sdk1.4.2/jre/bin

John Stile <john@stilen.com>

linuxdojo.net

Download OpenOffice

Download OpenOffice from

http://download.openoffice.org/1.1.2/index.html

Fill in the “Download OpenOffice.org” form

Language:	English

OS:	Linux (x86)

Site:	Sueden-Sunet

Note: Ooo_1.1.2_LinuxIntel_install.tar.gz is about 77Mb

John Stile <john@stilen.com>

linuxdojo.net

Network Install

Unpack script:

tar -zxvpf ../OOo_1.1.2_LinuxIntel_install.tar.gz

Become RootChange

su

Change umask

umask 0022

Run network installation

./OOo_1.1.2_LinuxIntel_install/setup -net -d /opt/OpenOffice.org1.1.2

John Stile <john@stilen.com>

linuxdojo.net

Prevent Inital Registration Dialog:

Don't prompted users to register:

Edit:

/opt/OpenOffice.org1.1.0/share/registry/schema/org/openoffice/Office/Common.xcs

Modify:

<prop oor:name="RequestDialog" oor:type="xs:int">

<value>1</value>

</prop>

<prop oor:name="ShowMenuItem" oor:type="xs:boolean">

<value>true</value>

</prop>

To:

<prop oor:name="RequestDialog" oor:type="xs:int">

<value>0</value>

</prop>

<prop oor:name="ShowMenuItem" oor:type="xs:boolean">

<value>false</value>

</prop>

John Stile <john@stilen.com>

linuxdojo.net

Share OO on Network (optional)

Setup nfs share and automounts

On NFS server, edit /etc/exports

# Offer opt apps to network

/opt/ 192.168.0.0/255.255.255.0 (ro,root_squash)

Start nfsd

/etc/init.d/nfs start

On Clients, edit /etc/auto.master

/net /etc/auto.net --timeout=60

On Clients, edit /etc/auto.net

opt -ro,soft,intr 127.0.0.1:/opt

Move Auto Install Script Files

Get a copy of my files:

http://www.stilen.com/scripts/openoffice/

Copy these filese to the Network Install root

cp Ooo_printer.txt /opt/OpenOffice.org1.1.2/

cp Ooo_answer.txt /opt/OpenOffice.org1.1.2/

cp Ooo_setup.sh /opt/OpenOffice.org1.1.2/

cd /opt/OpenOffice.org1.1.2/

chmod 644 Ooo_answer.tx Ooo_printer.txt

chmod 755 Ooo_setup.sh

John Stile <john@stilen.com>

linuxdojo.net

Response File Anatomy

Documentation: http://installation.openoffice.org/01RESPONSE_SO52_final_rev2.pdf

[[Environment]

[Environment]

InstallationMode=INSTALL_WORKSTATION

InstallationType=WORKSTATION

DestinationPath=<home>/OpenOfficeHome

StartProcedure=MyStartProc

EndProcdeure=MyEndProc

[Procedures]

Sub MyStartProc

SetUserFirstName ( "First_Name" )

SetUserLastName ( "Last_Name" )

SetUserID ( "Me" )

SetUserEMail ( "MyEMail" )

SetUserStreet ( "MyStreet" )

SetUserZip ( "MyZip" )

SetUserCity ( "MyCity" )

SetUserCompanyname ( "MyCompanyname" )

End Sub

Sub MyEndProc

HideSetup

MsgBox "End"

DefuseRestart(True)

ShowBrowser

End Sub

Qmail – Süreçler

Environment section:

InstallMode:

INSTALL_WORKSTATION

- Use a shared install for the main OpenOffice files.

(Others options: INSTALL_NORMAL, INSTALL_NETWORK, DEINSTALL, REPAIR, REINSTALL)

InstallType:

WORKSTATION

- Minimum number of files coppied to clinet home dir.

(Others: STANDARD, SPECIFY, MINIMUM)

DestinationPath:

<home>OpenOfficeHome

- Location for minimum install in users home directory.

- My script will replace these words with data.

StartProcedure/EndProcedure

- These are the tow basic secions.

- Can add other custom secions.

Set variables in Ooo_setup.sh

Set these variables in Ooo_setup.sh:

OpenOfficeHome="OpenOffice.org1.1.2"

SetupDirectory="/opt/$OpenOfficeHome"

PrinterTemplate="/opt/$OpenOfficeHome/OOo_printer.txt"

AnserFileTemplate="/opt/$OpenOfficeHome/OOo_answer.txt"

#If you have an NIS environmnet:

# Me=`ypmatch -k $USER passwd | awk '{print $1}'`

# FirstName=`ypmatch -k $Me passwd | awk -F: '{print $5}' | awk '{print $1}'`

# LastName=`ypmatch -k $Me passwd | awk -F: '{print $5}' | awk '{print $2}'`

#If you use /etc/shadow and /etc/passwd

Me=`grep ^$USER /etc/passwd |awk -F: '{print $1}'`

FirstName=`grep ^$USER /etc/passwd |awk -F: '{print $5}' |sed 's/\(.*\)\ .*/\1/'`

LastName=`grep ^$USER /etc/passwd |awk -F: '{print $5}' |sed 's/.*\ \(.*\)/\1/'`

Clients Start Using OpenOffice.org

Clients run 'Ooo_setup.sh' to setup OpenOffice

After the first time, they can just run 'soffice'.

If script fails, comment out line 106, that removes the temp answer file from /usr/tmp/openoffice_response_file.txt

The user will see OpenOffice.org open

bash# /opt/OpenOffice.org1.1.2/OOo_setup.sh

Adding a printer named to your OpenOffice config.

To change printer: run ~/OpenOffice.org1.1.0/spadmin

Making link ~/bin/soffice

Setup Completed. To run, type 'soffice'

John Stile <john@stilen.com>

linuxdojo.net

What Does The Script Do?

Steps taken by the scrpt:

1. A custom answer file is created in /usr/tmp/openoffice_answer_file.txt

2. If the enviornment variable PRINTER is set, a default printer is configured for the user.

I assume a HP LaserJet compantable.

3. If they have a ~/bin directory, a link to 'soffice' is created.

cp -l /opt/OpenOffice.org1.1.2/program/soffice bin/

4. Star soffice for them, using the link .

~/bin/soffice

John Stile <john@stilen.com>

linuxdojo.net

OpenOffice Research Data

Auto Install scripts:

http://stilen.com/scripts/openoffice/

URL's:

http://www.openoffice.org/http://www.openoffice.org/dev_docs/source/download.html

http://www.openoffice.org/documentation.html

Template fro this lecture from:

A qmail lecture, www.metin.org, Barış Metin <baris@metin.org>

Scripts and Research data:

http://stilen.com/notes/presentation/OpenOffice/

The End

John Stile <john@stilen.com>

linuxdojo.net

Baris Metin

2002-12-06T14:13:25

jstile jstile