Установка Apache OpenOffice разных версий в одну систему

From Apache OpenOffice Wiki
< RU‎ | qa
Revision as of 16:56, 12 May 2010 by Fyva (Talk | contribs)

Jump to: navigation, search

Template:RU/documentation/helpneeded


Для улучшения Apache OpenOffice не обязательно быть программистом, вы можете помогать исправлять ошибки просто установив DEV сборку и используя её как вы обычно это делаете, и докладывать об обнаруженных ошибках.

Обычно, каждая версия устанавливается в свою папку (к примеру, /opt на Linux, Program Files на Windows), например, стабильная сборка Apache OpenOffice 3.2 ставится в папку /opt/openoffice.org3 на *nix системах, и C:\Program Files\OpenOffice.org 3\ на Windows, ну а DEV сборка установится в /opt/ooo-dev3/ (*nix) и C:\Program Files\OOo-dev 3\ (Windows).

В связи с этим, если вы хотите установить несколько DEV сборок или хотите сохранить в системе старые стабильные сборки, обычный способ установки не позволит этого, т.к. одна версия перезапишет другую.

Тут мы объясним, каким способом можно установить параллельно несколько разных сборок.


Linux

В этой части мы покажем, как "установить" любую версию Apache OpenOffice, распространяемую в пакетах RPM или DEB. На самом деле, мы не будем ничего устанавливать, а просто распакуем пакеты.

Заметьте, что с этим методом не имеет значения, распаковывали вы RPM или DEB, и не имет значения, какой формат пакетов использует ваш дистрибутив Linux (т.е., вы можете распаковать RPM пакеты на Debian, или DEB пакеты на Gentoo).

Установка Apache OpenOffice 3.* (трёхслойный OpenOffice.org)

Начиная с DEV300m4, в Apache OpenOffice есть три слоя (см. Three-Layer OOo). Это значит, что если мы распакуем пакеты RPM/DEB, у нас будет 2 директории:

  1. opt/openoffice.org (содержит нижний и средний слои: ure and basis)
  2. opt/openoffice.org3 (содержит верхний слой)

где возможно вам нужно заменить openoffice.org на другое имя продукта типа ooo-dev.

Т.к. мы хотим установить Apache OpenOffice в самодостаточную папку (без интеграции с системой, со своим профилем, который не будет пересекаться с профилями других версий), то нам нужно всего лишь распаковать пакеты и переименовать эту директорию opt так чтобы три слоя по прежнему были вместе.

RPM пакеты

В следующем примере мы "установим"

OOo-Dev_DEV300m77_Linux_x86_install-rpm_en-US.tar.gz

который был закачан в папку

/home/user/download/ooo/

# cd в папку, куда вы скачали файл *.tar.gz
# в этом примере мы скачали 
# файл OOo-Dev_DEV300m77_Linux_x86_install-rpm_en-US.tar.gz
# в папку /home/user/download/ooo/
 
~> cd download/ooo/
 
# создаём временную папку
# в этом примеру назовём её TEMP_INST
 
~/download/ooo> mkdir TEMP_INST 
 
# cd в папку
 
~/download/ooo> cd TEMP_INST/ 
 
# распакуем скачанный файл
~/download/ooo/TEMP_INST> tar -zxvf ../OOo-Dev_DEV300m77_Linux_x86_install-rpm_en-US.tar.gz

Этими командами мы распаковали содержимое пакетов во временную папку.

Теперь нам нужно перейти в папку RPMS.

# теперь нам надо создать ещё одну временную папку для распаковки файлов
# содержащихся в папке RPMS
 
~/download/ooo/TEMP_INST> cd DEV300_m77_native_packed-2_en-US.9496/RPMS/ 
 
# в этом примере мы укоротим имя папки: 
# вместо ~/download/ooo/TEMP_INST/DEV300_m77_native_packed-2_en-US.9496/RPMS>
# напишем: ~/download/ooo/TEMP_INST/ DEV300_m77.../RPMS>
 
# создадим временную папку, которая и станет окончательной папкой установки OpenOffice.org
 
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS> mkdir TEMP_ROOT 
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS> cd TEMP_ROOT/

Заметьте, что в зависимости от версии могут быть разные схемы именований файлов.

Распаковать RPM можно за 1 или 2 шага:

# за 1 шаг
 
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> for i in ../o*.rpm; do rpm2cpio $i | cpio -id; done

Заметьте, мы использовали звёздочку так for i in ../o*.rpm, т.к. среди пакетов может находится пакет с Java Runtime Environment (в данном примере, пакет с JRE называется jre-6u19-linux-i586.rpm), поэтому ../o*.rpm говорит, что нужно распаковывать пакеты с "o" вначале имени файла.

# за 2 шага
# нижний и средний слои
 
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> for i in ../openoffice.org*.rpm; do rpm2cpio $i | cpio -id; done 
 
# распакуйте верхний слой
 
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> for i in ../ooo-dev*.rpm; do rpm2cpio $i | cpio -id; done

Теперь мы можем обнаружить в папке

/home/user/download/ooo/TEMP_INST/DEV300_m77_native_packed-2_en-US.9496/RPMS/TEMP_ROOT

папку opt, в которой есть 2 папки:

  1. /TEMP_ROOT/opt/ooo-dev3
  2. /TEMP_ROOT/opt/ooo-dev

последняя содержит ещё 2 папки: basis3.3 and ure.

Теперь всего лишь нужно скопировать или переместить эту папку opt куда угодно.

# in this example we "install" the new version on home/user/OOo_DEV300_m77
 
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> mv opt ~/OOo_DEV300_m77

И наконец, удалим все временные файлы:

~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> cd ~/download/ooo/
~download/ooo> rm -rf TEMP_INST/

DEB пакеты

В следующем примере мы "установим" сборку

OOo-Dev_DEV300m77_Linux_x86_install-deb_en-US.tar.gz

закачанную в папку

/home/user/download/ooo/

# cd в папку, куда вы скачали файл *.tar.gz
# в этом примере мы скачали
# файл OOo-Dev_DEV300m77_Linux_x86_install-deb_en-US.tar.gz
# в папку /home/user/download/ooo/
 
~> cd download/ooo/
 
# создайте временную папку, куда будет распаковано содержимое скачанного файла
# в этом примере мы называем эту папку TEMP_INST
 
~/download/ooo> mkdir TEMP_INST 
 
# cd в эту папку
 
~/download/ooo> cd TEMP_INST/ 
 
# рапакуйте содержимое скачанного файла
 
~/download/ooo/TEMP_INST> tar -zxvf ../OOo-Dev_DEV300m77_Linux_x86_install-deb_en-US.tar.gz

Теперь у нас во временной папке находятся распакованные файлы.

Теперь нам нужно попасть в папку DEBS с помощью команды cd, там содержатся файлы *.debs.

# теперь нам нужно создать другую временную папку, куда будут распакованы файлы *.deb.
 
~/download/ooo/TEMP_INST> cd DEV300_m77_native_packed-2_en-US.9496/DEBS/ 
 
# мы сократим имя папки:
# вместо ~/download/ooo/TEMP_INST/DEV300_m77_native_packed-2_en-US.9496/DEBS>
# напишем ~/download/ooo/TEMP_INST/DEV300_m77.../DEBS>
 
# создадим временную папку, в которой будет располагаться установленный OpenOffice.org
 
~/download/ooo/TEMP_INST/DEV300_m77.../DEBS> mkdir TEMP_ROOT 
~/download/ooo/TEMP_INST/DEV300_m77 .../DEBS> cd TEMP_ROOT/

Заметьте, что в зависимости от версии OOo, у нас могут быть разные схемы именования файлов:

  1. openoffice.org-*.deb - нижний и средний слои
  2. ooo-dev-*.deb - верхний слой

Можно распаковать все *.deb за 1 или 2 шага:

# за 1 шаг
 
~/download/ooo/TEMP_INST/DEV300_m77.../DEBS/TEMP_ROOT> for i in ../*.deb; do dpkg-deb -x $i . ; done
# за 2 шага
# средний и нижний слои
 
~/download/ooo/TEMP_INST/DEV300_m77.../DEBS/TEMP_ROOT> for i in ../openoffice.org*.deb; do dpkg-deb -x $i . ; done 
 
# верхний слой
~/download/ooo/TEMP_INST/DEV300_m77.../DEBS/TEMP_ROOT> for i in ../ooo-dev*.deb; do dpkg-deb -x $i . ; done

Мы обнаружим после этих команд, что в папке

/home/user/download/ooo/TEMP_INST/DEV300_m77_native_packed-2_en-US.9496/DEBS/TEMP_ROOT

есть папка opt, в которой есть 2 папки:

  1. /TEMP_ROOT/opt/ooo-dev3
  2. /TEMP_ROOT/opt/ooo-dev

последняя содержит ещё 2 папки: basis3.2 и ure.

Теперь нужно всего лишь скопировать или переместить эту папку opt куда угодно.

# в этом примере мы "установим" новую версию в /home/user/OOo_DEV300_m77
 
~/download/ooo/TEMP_INST/DEV300_m77.../DEBS/TEMP_ROOT> mv opt ~/OOo_DEV300_m77

И наконец, удалим все временные файлы.

~/download/ooo/TEMP_INST/DEV300_m77.../DEBS/TEMP_ROOT> cd ~/download/ooo/
~download/ooo> rm -rf TEMP_INST/

Настройки профиля для версий 3.*

Before running this new version, we have to make some changes in the configuration. The procedure is the same for RPM and DEB packages.

By default, an OpenOffice.org version will read and write in the corresponding user directory (for example, a stable OpenOffice.org 2.N version in /home/user/.openoffice.org2/, a developer snapshot in /home/user/.ooo-dev2/). This means that you can not run in parallel two versions that install as openoffice.orgN, or two as ooo-devN, because this could lead to inconsistencies.

To avoid this we must change OpenOffice.org configuration to look for the user's directory somewhere else: we will indicate the same installation root directory, this way we will have all together, being easier to deinstall later.

To do this we must edit the configuration file bootstraprc located in the program directory inside the top layer, in this example:

/home/user/OOo_DEV300_m77/ooo-dev3/program

As this file does not have write permission, change this first

> cd ~/OOo_DEV300_m77/ooo-dev3/program
~/OOo_DEV300_m77/ooo-dev3.0/program> chmod +w bootstraprc

Now you can open this file with your text editor and change the line starting with UserInstallation= as follows:

UserInstallation=$ORIGIN/..

The whole file may look then as follows:

[Bootstrap]
BaseInstallation=${OOO_BASE_DIR}
InstallMode=<installmode>
ProductKey=OOo-dev 3.0
UserInstallation=$ORIGIN/..
[ErrorReport]
ErrorReportPort=80
ErrorReportServer=report.services.openoffice.org

This way the user directory will be in the root directory of OpenOffice.org, and you can run several version in parallel.

Windows

On Windows, you must do a so-called administrative installation of your package. This is something available for all msi-based installations, and basically simply means extracting the .cab files which come with your installation.

If you have a all-in-one executable containing your installation set (one single .exe file having more than 100 MB, named e.g. OOo_2.4.237_Win32Intel_install.exe), you first allow it to extract itself. For this, simply start the executable - it will prompt you for where to extract the files. After extraction, it will automatically run the real installer - cancel it.

In the following, we assume you extracted it to c:\temp\install

Now, open a console (<Windows_Key>+R, following by typing "cmd<enter>", will do), there do a

 ...> c:
 c:\> cd \temp\install
 c:\temp\install> msiexec /a ooodev24.msi

(The above assumes there is a file ooodev24.msi in the given directory. The name changes with the version you're installing, but it should always be exactly one .msi file. Use this one's name.)

msiexec is a tool to, well, execute .msi files. The /a switch tells it to do an administrative install. It will start a UI, where you again are asked for the target location - choose a folder where you finally want to have Apache OpenOffice being installed. Then, click the "Install" button, wait a few minutes, and there you are.

side note for advanced users:

 msiexec /a ooodev24.msi TARGETDIR="c:\Program Files\OOoDev\m237" /qr

will install Apache OpenOffice into the folder "c:\Program Files\OOoDev\m237", without any further user interaction.

Beginning with DEV300m23, the necessary Microsoft Visual C++ runtime files are no longer contained in the installed Apache OpenOffice product, but are rather installed into the system during normal installation (see this interface-announce@openoffice.org mail). As this is not done during an administrative installation, you have to install the Microsoft Visual C++ 2008 Redistributable Package (x86) (or equivalent for different compiler versions) yourself.

Профиль

Like with the Linux version above, you need to make sure the user data of the just installed Apache OpenOffice version doesn't conflict with the user data of other installations. To do so, open the file <OOo_installation>\program\bootstrap.ini in a text editor of your choice, and locate the line

 UserInstallation=$SYSUSERCONFIG/OOo-dev2

(Again, the last part of this depends on the concrete version you installed, but there's only one line starting with UserInstallation.)

Change this to

 UserInstallation=$ORIGIN/..

The entire file may now look like this:

[Bootstrap]
BaseInstallation=${OOO_BASE_DIR}
InstallMode=<installmode>
ProductKey=OpenOffice.org 3.2
UserInstallation=$ORIGIN/..
[ErrorReport]
ErrorReportPort=80
ErrorReportServer=report.services.openoffice.org

Now, your user data will be put into a folder user right besides your program folder. Which has two advantages: Different version's user data don't clash anymore, and you can remove the complete installation, including your user data, by simply deleting the installation folder. Be aware, however, that now different people working on the same Windows machine will all work with the same user data, which is unlike a normal installation.

Настройки для автоматического тестирования

If you plan to use an installation for automated testing with VCLTestTool please check Wiki-page to learn what settings must be made.

To let VCLTestTool find the administrative installation it is required to adapt an option named 'OOoProgramDir'. Simply change this to the program-dir in the brand layer of your Apache OpenOffice Installation

VCLTestTool-options-OOoProgramDir.png

Template:RU/documentation/signtransyear

Template:QaВottom

Personal tools
In other languages