Opened 11 years ago
Closed 11 years ago
#793 closed (fixed)
Linux install script improvement
Reported by: | Fredrik Levander | Owned by: | olle |
---|---|---|---|
Milestone: | Proteios SE 2.18.0 | Keywords: | |
Cc: |
Description (last modified by )
To facilitate updates of Linux systems, the Linux installation script should use the config file of an existing installation if it exists, and the --force flag was given. The proposed procedure would be to look for the file $CATALINA_HOME/webapps/proteios/WEB_INF/config. If it exists, it should be used instead of the one under www/WEB-INF. Furthermore, if $CATALINA_HOME was not set, /var/lib/tomcat6 should also be tested as alternative location (Ubuntu default for CATALINA_HOME).
Change History (17)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
Status: | new → assigned |
---|
comment:3 Changed 11 years ago by
Traceability note:
- Unix/Linux install script
misc/install/install.sh
was latest updated in Ticket #788 (Update of template files and scripts to allow new versions of external software).
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
Summary: | Linux install script improvment → Linux install script improvement |
---|
comment:6 Changed 11 years ago by
Design discussion: CATALINA_HOME vs CATALINA_BASE
Originally the Tomcat executables were located in directories $CATALINA_HOME/bin/
and $CATALINA_HOME/lib/
, while each servlet was located in its own directory under $CATALINA_HOME/webapps/
. However, in order to allow more than one instance of Tomcat to run simultaneously, e.g. with different port numbers, environment variable CATALINA_BASE
was introduced to specify the location of the webapps/
directory, where the servlets for a specific Tomcat instance were installed, while $CATALINA_HOME
specified the location of the Tomcat application itself.
To start several Tomcat instances with different configurations, $CATALINA_BASE
is first set to the location for the servlets, the Tomcat instance in question should use, after which Tomcat is started (often from a start-up script) with desired configurations for the instance, including port number. $CATALINA_BASE
is then set to the location for the servlets, the next Tomcat instance should use, and a new Tomcat instance is started with new configuration, and so on. The current value of $CATALINA_BASE
can therefore only be used to find the location of servlets, for the last Tomcat instance started (provided its value has not been changed after that).
Unlike $CATALINA_HOME
, CATALINA_BASE
is not intended to be set to a fixed value for a system and remain unchanged for a considerable time, but is intended to tell Tomcat and related scripts what subset of servlets a specific operation concerns. However, on systems where only one instance of Tomcat is used, $CATALINA_BASE
will specify the location of the webapps/
directory, where servlets are installed. This gives the administrator freedom to have the Tomcat application installed in one place, and servlet code in another. Some Linux distributions like Ubuntu have different default locations for these, $CATALINA_HOME
is /usr/share/tomcat6/
, while $CATALINA_BASE
is /var/lib/tomcat6/
for Tomcat version 6. For a Tomcat installation with both application and webapps
directory under the same root directory, $CATALINA_BASE
will simply have the same value as $CATALINA_HOME
.
Impact on Proteios SE:
- In order to allow for the servlet code to be installed at another location than the Tomcat application, Proteios SE scripts should use
$CATALINA_BASE
instead of$CATALINA_HOME
. This includes Ant build.xml files, that use the variable to determine where the executable code should be installed. - Since environment variable
$CATALINA_BASE
is not set to a value on many Unix/Linux systems, Proteios SE install scripts should check if the value is set, and if not, set it to the value of$CATALINA_HOME
. If$CATALINA_HOME
is not set to a value neither, different default directories should be tested for$CATALINA_BASE
, and if none exist, the user will be notified to set a value for the variable. - Proteios SE scripts should no longer attempt to set a value for environment variable
$CATALINA_HOME
.
comment:7 Changed 11 years ago by
Design discussion.
The following Unix shell scripts currently refer to environment variable $CATALINA_HOME:
client/servlet/www/WEB-INF/config
client/servlet/www/WEB-INF/init.sh
misc/install/install.sh
The following Unix shell script template files currently refer to environment variable $CATALINA_HOME:
client/ftpd/proteios_ftp_server.sh.in
The following Ant build.xml files currently refer to environment variable $CATALINA_HOME:
build.xml
api/core/build.xml
api/core/test/build.xml
api/waf/build.xml
client/ftpd/build.xml
client/servlet/build.xml
client/servlet/test/build.xml
contrib/immun/build.xml
contrib/SpectrumFileInspector/build.xml
contrib/SpectrumLibraryExport/build.xml
misc/myExtension/build.xml
plugin/build.xml
plugin/test/build.xml
Design update:
- The Unix shell scripts and Ant build.xml files above should be updated to refer to
$CATALINA_BASE
instead of$CATALINA_HOME
. - In addition, Unix shell script
misc/install/install.sh
and Unix shell script template fileclient/ftpd/proteios_ftp_server.sh.in
should be updated to implement the functionality in the ticket description.
comment:8 Changed 11 years ago by
comment:9 Changed 11 years ago by
comment:10 Changed 11 years ago by
(In [4388]) Refs #793. Installation Unix shell script install.sh
in misc/install/
updated:
- Environment variable
$CATALINA_BASE
is now referenced instead of$CATALINA_HOME
for installation location. - If
$CATALINA_BASE
is not set, it is initially set to the value of$CATALINA_HOME
. - If the "
--force
" flag is used and a previous Proteios SE installation is found, configuration script$CATALINA_BASE/webapps/proteios/WEB-INF/config
is executed, elsewww/WEB-INF/config
. - If
$CATALINA_BASE
is not set to a valid directory, a number of different default directories are tested, and if none exist, the user is notified to set a value for the variable.
comment:11 Changed 11 years ago by
(In [4389]) Refs #793. Unix shell script template file proteios_ftp_server.sh.in
in client/ftpd/
updated:
- Environment variable
$CATALINA_BASE
is now referenced instead of$CATALINA_HOME
for installation location. - If
$CATALINA_BASE
is not set, it is initially set to the value of$CATALINA_HOME
. - If
$CATALINA_BASE
is not set to a valid directory, a number of different default directories are tested, and if none exist, the user is notified to set a value for the variable.
comment:12 Changed 11 years ago by
Design update:
- A problem with the current design of
misc/install/install.sh
for an existing installation, is that although configuration script$CATALINA_BASE/webapps/proteios/WEB-INF/config
is executed instead ofwww/WEB-INF/config
, the script will later copy the latter file to$CATALINA_BASE/webapps/proteios/WEB-INF/config
. The next timeinstall.sh
is executed, it is therefore not the originalconfig
file that will be used. This is not a desired result, and the simplest solution is that "./install.sh --force
" for an existing installation first copies$CATALINA_BASE/webapps/proteios/WEB-INF/config
towww/WEB-INF/config
, and then executes the latter file.
comment:13 Changed 11 years ago by
(In [4390]) Refs #793. Installation Unix shell script install.sh
in misc/install/
updated:
- If the "
--force
" flag is used and a previous Proteios SE installation is found, configuration script$CATALINA_BASE/webapps/proteios/WEB-INF/config
is first copied towww/WEB-INF/config
before the latter script is executed.
comment:14 Changed 11 years ago by
(In [4391]) Refs #793. Ant build.xml
files updated to refer to environment variable $CATALINA_BASE
instead of $CATALINA_HOME
:
build.xml
api/core/build.xml
api/core/test/build.xml
api/waf/build.xml
client/ftpd/build.xml
client/servlet/build.xml
client/servlet/test/build.xml
contrib/immun/build.xml
contrib/SpectrumFileInspector/build.xml
contrib/SpectrumLibraryExport/build.xml
misc/myExtension/build.xml
plugin/build.xml
plugin/test/build.xml
comment:15 Changed 11 years ago by
(in [69]) Refs #793. Proteios SE wiki page Proteios 2 Installation updated with new note on "CATALINA_HOME vs CATALINA_BASE" under Requirements.
comment:16 Changed 11 years ago by
comment:17 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ticket closed as the Linux install scripts have been extended with a number of features, intended to facilitate installation.
Ticket accepted.