Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isochrone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institut für Informatik
dbis
dbis-isochrone
isochrone
Commits
b7f0178f
Commit
b7f0178f
authored
11 years ago
by
Nikolaus Krismer
Browse files
Options
Downloads
Patches
Plain Diff
using latest apache-tomcat version now (not version from yum)
parent
6c4f7e2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
etc/vagrant/bootstrap.sh
+42
-29
42 additions, 29 deletions
etc/vagrant/bootstrap.sh
etc/vagrant/conf/tomcat_startscript.sh
+56
-0
56 additions, 0 deletions
etc/vagrant/conf/tomcat_startscript.sh
with
98 additions
and
29 deletions
etc/vagrant/bootstrap.sh
+
42
−
29
View file @
b7f0178f
...
@@ -83,8 +83,10 @@ REPO_RPMFORGE_CONFIG=/etc/yum.repos.d/rpmforge.repo
...
@@ -83,8 +83,10 @@ REPO_RPMFORGE_CONFIG=/etc/yum.repos.d/rpmforge.repo
TABLE_PREFIX_BZ
=
bz_
TABLE_PREFIX_BZ
=
bz_
TABLE_PREFIX_IBK
=
ibk_
TABLE_PREFIX_IBK
=
ibk_
TEMPLATE_PROJECT_FILE
=
$NEXUS_PATH
/de/krismer/CanIGet2/0.1/CanIGet2-0.1.war
TEMPLATE_PROJECT_FILE
=
$NEXUS_PATH
/de/krismer/CanIGet2/0.1/CanIGet2-0.1.war
TOMCAT_VERSION
=
7.0.47
TOMCAT_FILE
=
apache-tomcat-
$TOMCAT_VERSION
.zip
TOMCAT_NAME
=
tomcat
TOMCAT_USER
=
tomcat
TOMCAT_USER
=
tomcat
TOMCAT_VERSION
=
7
TOPOLOGY_TOLERANCE
=
0.0005
TOPOLOGY_TOLERANCE
=
0.0005
## Calculated variables
## Calculated variables
...
@@ -100,7 +102,7 @@ fi
...
@@ -100,7 +102,7 @@ fi
if
$INSTALL_NEO4J_SPATIAL
;
then
if
$INSTALL_NEO4J_SPATIAL
;
then
INSTALL_MAVEN
=
$IMPORT_OSMDATA
||
$IMPORT_OSMDATA_CACHED
INSTALL_MAVEN
=
$IMPORT_OSMDATA
||
$IMPORT_OSMDATA_CACHED
fi
fi
if
$INSTALL_GEOSERVER
||
$INSTALL_NEO4J
||
$INSTALL_NEO4J_SPATIAL
||
$IMPORT_OSMDATA
||
$IMPORT_OSMDATA_CACHED
;
then
if
$INSTALL_TOMCAT
||
$INSTALL_GEOSERVER
||
$INSTALL_NEO4J
||
$INSTALL_NEO4J_SPATIAL
||
$IMPORT_OSMDATA
||
$IMPORT_OSMDATA_CACHED
;
then
INSTALL_JAVA
=
true
INSTALL_JAVA
=
true
fi
fi
if
$INSTALL_PGROUTING
;
then
if
$INSTALL_PGROUTING
;
then
...
@@ -114,16 +116,15 @@ DISTRI=$(cat /etc/issue | head -n 1 | cut -d " " -f 1)
...
@@ -114,16 +116,15 @@ DISTRI=$(cat /etc/issue | head -n 1 | cut -d " " -f 1)
if
[
$DISTRI
==
"CentOS"
]
;
then
if
[
$DISTRI
==
"CentOS"
]
;
then
POSTGRESQL_REPO_RPM
=
http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
POSTGRESQL_REPO_RPM
=
http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
REPO_BASE_CONFIG
=
/etc/yum.repos.d/CentOS-Base.repo
REPO_BASE_CONFIG
=
/etc/yum.repos.d/CentOS-Base.repo
TOMCAT_VERSION
=
6
# TOMCAT_VERSION=6
# TOMCAT_NAME=tomcat6
elif
[
$DISTRI
!=
"Fedora"
]
;
then
elif
[
$DISTRI
!=
"Fedora"
]
;
then
echo
"Unsupported OS. Only CentOS and Fedora are supported!"
echo
"Unsupported OS. Only CentOS and Fedora are supported!"
exit
1
;
exit
1
;
fi
fi
START
=
$(
date
+%s
)
START
=
$(
date
+%s
)
TOMCAT_PKG_NAME
=
tomcat
$TOMCAT_VERSION
TOMCAT_WEBAPP_DIR
=
$DEPLOY_DIR
/
$TOMCAT_NAME
/webapps
TOMCAT_SERVICE_NAME
=
$TOMCAT_PKG_NAME
TOMCAT_WEBAPP_DIR
=
$DEPLOY_DIR
/
$TOMCAT_PKG_NAME
/webapps
WORKING_DIR
=
`
pwd
`
WORKING_DIR
=
`
pwd
`
## Functions
## Functions
...
@@ -352,17 +353,45 @@ if $INSTALL_PGROUTING; then
...
@@ -352,17 +353,45 @@ if $INSTALL_PGROUTING; then
cd
$WORKING_DIR
cd
$WORKING_DIR
fi
fi
if
$INSTALL_JAVA
;
then
echo
"Installing java (oracle jdk-
$JAVA_VERSION
)"
fn_download_newer
$DOWNLOAD_DIR
/
$JAVA_FILE
$CACHE_DIR_REMOTE
/
$JAVA_FILE
yum
-y
localinstall
$DOWNLOAD_DIR
/
$JAVA_FILE
>
install_java.log 2>&1
ln
-sf
/usr/java/latest
$DEPLOY_DIR
/jdk
>
setup_java.log 2>&1
ln
-sf
/usr/java/latest/jre
$DEPLOY_DIR
/jre
>
setup_java.log 2>&1
echo
"Configuring java
$JAVA_VERSION
"
alternatives
--install
/usr/bin/java java
$DEPLOY_DIR
/jre/bin/java 200000
>>
setup_java.log 2>&1
alternatives
--install
/usr/bin/javaws javaws
$DEPLOY_DIR
/jre/bin/javaws 200000
>>
setup_java.log 2>&1
alternatives
--set
java
$DEPLOY_DIR
/jre/bin/java
>>
setup_java.log 2>&1
alternatives
--install
/usr/bin/javac javac
$DEPLOY_DIR
/jdk/bin/javac 200000
>>
setup_java.log 2>&1
alternatives
--install
/usr/bin/jar jar
$DEPLOY_DIR
/jdk/bin/jar 200000
>>
setup_java.log 2>&1
fi
if
$INSTALL_TOMCAT
;
then
if
$INSTALL_TOMCAT
;
then
echo
"Installing
$TOMCAT_PKG_NAME
servlet container"
echo
"Installing
$TOMCAT_NAME
$TOMCAT_VERSION
servlet container"
yum
-y
install
$TOMCAT_PKG_NAME
$TOMCAT_PKG_NAME
-webapps
$TOMCAT_PKG_NAME
-admin-webapps
>
install_tomcat.log 2>&1
# yum -y install $TOMCAT_NAME $TOMCAT_NAME-webapps $TOMCAT_NAME-admin-webapps > install_tomcat.log 2>&1
ln
-sf
/usr/share/
$TOMCAT_PKG_NAME
$DEPLOY_DIR
/
$TOMCAT_PKG_NAME
# ln -sf /usr/share/$TOMCAT_NAME $DEPLOY_DIR/$TOMCAT_NAME
fn_download_newer
$DOWNLOAD_DIR
/
$TOMCAT_FILE
http://tweedo.com/mirror/apache/tomcat/tomcat-7/v
$TOMCAT_VERSION
/bin/
$TOMCAT_FILE
cp
$DOWNLOAD_DIR
/
$TOMCAT_FILE
$DEPLOY_DIR
/
$TOMCAT_FILE
unzip
-o
-d
$DEPLOY_DIR
$DEPLOY_DIR
/
$TOMCAT_FILE
>
install_tomcat.log 2>&1
ln
-sf
$DEPLOY_DIR
/apache-tomcat-
$TOMCAT_VERSION
$DEPLOY_DIR
/
$TOMCAT_NAME
>>
install_tomcat.log 2>&1
groupadd
-g
521
$TOMCAT_USER
>>
install_tomcat.log 2>&1
useradd
-u
521
-g
521
-c
"Tomcat Service Account"
-d
$DEPLOY_DIR
/apache-tomcat-
$TOMCAT_VERSION
$TOMCAT_USER
>>
install_tomcat.log 2>&1
chown
-R
$TOMCAT_USER
:
$TOMCAT_USER
$DEPLOY_DIR
/apache-tomcat-
$TOMCAT_VERSION
>>
install_tomcat.log 2>&1
chown
-R
$TOMCAT_USER
:
$TOMCAT_USER
$DEPLOY_DIR
/
$TOMCAT_NAME
>>
install_tomcat.log 2>&1
cp
$SHARED_CONF_DIR
/tomcat_startscript.sh /etc/init.d/
$TOMCAT_NAME
>>
install_tomcat.log 2>&1
chmod
755 /etc/init.d/
$TOMCAT_NAME
>>
install_tomcat.log 2>&1
fi
fi
if
$INSTALL_GEOSERVER
;
then
if
$INSTALL_GEOSERVER
;
then
echo
"Installing geoserver
$GEOSERVER_VERSION
"
echo
"Installing geoserver
$GEOSERVER_VERSION
"
fn_download_newer
$DOWNLOAD_DIR
/
$GEOSERVER_FILE
http://sourceforge.net/projects/geoserver/files/GeoServer/
$GEOSERVER_VERSION
/
$GEOSERVER_FILE
fn_download_newer
$DOWNLOAD_DIR
/
$GEOSERVER_FILE
http://sourceforge.net/projects/geoserver/files/GeoServer/
$GEOSERVER_VERSION
/
$GEOSERVER_FILE
unzip
-o
-d
$TOMCAT_WEBAPP_DIR
$DOWNLOAD_DIR
/
$GEOSERVER_FILE
geoserver.war
>
install_geoserver.log 2>&1
unzip
-o
-d
$TOMCAT_WEBAPP_DIR
$DOWNLOAD_DIR
/
$GEOSERVER_FILE
geoserver.war
>
install_geoserver.log 2>&1
echo
"CATALINA_OPTS=
\"
-Djava.awt.headless=true -Xmx512m -Xms128m -XX:MaxPermSize=128m -DGEOSERVER_DATA_DIR=
$DEPLOY_DIR
/geoserver/data
\"
"
>>
/usr/share/
$TOMCAT_
PKG_
NAME
/conf/
$TOMCAT_
PKG_
NAME
.conf
echo
"CATALINA_OPTS=
\"
-Djava.awt.headless=true -Xmx512m -Xms128m -XX:MaxPermSize=128m -DGEOSERVER_DATA_DIR=
$DEPLOY_DIR
/geoserver/data
\"
"
>>
/usr/share/
$TOMCAT_NAME
/conf/
$TOMCAT_NAME
.conf
echo
"Installing geoserver web archive into tomcat"
echo
"Installing geoserver web archive into tomcat"
mkdir
-p
$TOMCAT_WEBAPP_DIR
/geoserver
mkdir
-p
$TOMCAT_WEBAPP_DIR
/geoserver
...
@@ -389,22 +418,6 @@ if $INSTALL_TEMPLATE_PROJECT; then
...
@@ -389,22 +418,6 @@ if $INSTALL_TEMPLATE_PROJECT; then
rm
-f
$TOMCAT_WEBAPP_DIR
/caniget2.war
>>
install_caniget2.log 2>&1
rm
-f
$TOMCAT_WEBAPP_DIR
/caniget2.war
>>
install_caniget2.log 2>&1
fi
fi
if
$INSTALL_JAVA
;
then
echo
"Installing java (oracle jdk-
$JAVA_VERSION
)"
fn_download_newer
$DOWNLOAD_DIR
/
$JAVA_FILE
$CACHE_DIR_REMOTE
/
$JAVA_FILE
yum
-y
localinstall
$DOWNLOAD_DIR
/
$JAVA_FILE
>
install_java.log 2>&1
ln
-sf
/usr/java/latest
$DEPLOY_DIR
/jdk
>
setup_java.log 2>&1
ln
-sf
/usr/java/latest/jre
$DEPLOY_DIR
/jre
>
setup_java.log 2>&1
echo
"Configuring java
$JAVA_VERSION
"
alternatives
--install
/usr/bin/java java
$DEPLOY_DIR
/jre/bin/java 200000
>>
setup_java.log 2>&1
alternatives
--install
/usr/bin/javaws javaws
$DEPLOY_DIR
/jre/bin/javaws 200000
>>
setup_java.log 2>&1
alternatives
--set
java
$DEPLOY_DIR
/jre/bin/java
>>
setup_java.log 2>&1
alternatives
--install
/usr/bin/javac javac
$DEPLOY_DIR
/jdk/bin/javac 200000
>>
setup_java.log 2>&1
alternatives
--install
/usr/bin/jar jar
$DEPLOY_DIR
/jdk/bin/jar 200000
>>
setup_java.log 2>&1
fi
if
$INSTALL_MAVEN
;
then
if
$INSTALL_MAVEN
;
then
echo
"Installing maven
$MAVEN_VERSION
"
echo
"Installing maven
$MAVEN_VERSION
"
mkdir
-p
$CACHE_DIR_LOCAL
/maven
mkdir
-p
$CACHE_DIR_LOCAL
/maven
...
@@ -513,7 +526,7 @@ fi
...
@@ -513,7 +526,7 @@ fi
if
$INSTALL_TOMCAT
;
then
if
$INSTALL_TOMCAT
;
then
echo
"Configuring tomcat users"
echo
"Configuring tomcat users"
cp
$SHARED_CONF_DIR
/tomcat-users.xml /usr/share/
$TOMCAT_
PKG_
NAME
/conf/tomcat-users.xml
cp
$SHARED_CONF_DIR
/tomcat-users.xml /usr/share/
$TOMCAT_NAME
/conf/tomcat-users.xml
echo
"Configuring tomcat permissions"
echo
"Configuring tomcat permissions"
chown
-R
$TOMCAT_USER
:
$TOMCAT_USER
$TOMCAT_WEBAPP_DIR
/geoserver
chown
-R
$TOMCAT_USER
:
$TOMCAT_USER
$TOMCAT_WEBAPP_DIR
/geoserver
...
@@ -534,8 +547,8 @@ if $INSTALL_NEO4J; then
...
@@ -534,8 +547,8 @@ if $INSTALL_NEO4J; then
chkconfig
$NEO4J_SERVICE_NAME
on
>>
start_neo4j.log 2>&1
chkconfig
$NEO4J_SERVICE_NAME
on
>>
start_neo4j.log 2>&1
fi
fi
if
$INSTALL_TOMCAT
;
then
if
$INSTALL_TOMCAT
;
then
service
$TOMCAT_
SERVICE_
NAME
start
>
start_tomcat.log 2>&1
service
$TOMCAT_NAME
start
>
start_tomcat.log 2>&1
chkconfig
$TOMCAT_
SERVICE_
NAME
on
>>
start_tomcat.log 2>&1
chkconfig
$TOMCAT_NAME
on
>>
start_tomcat.log 2>&1
fi
fi
if
$INSTALL_POSTGRES
;
then
if
$INSTALL_POSTGRES
;
then
...
...
This diff is collapsed.
Click to expand it.
etc/vagrant/conf/tomcat_startscript.sh
0 → 100644
+
56
−
0
View file @
b7f0178f
#!/bin/bash
# Tomcat7: Start/Stop Tomcat 7
#
# chkconfig: - 90 10
# description: Tomcat is a Java application Server.
# Source function library
.
/etc/init.d/functions
#. /etc/sysconfig/network
CATALINA_HOME
=
/opt/apache-tomcat-7.0.39
CATALINA_BASE
=
/opt/apache-tomcat-7.0.39
TOMCAT_USER
=
tomcat
LOCKFILE
=
/var/lock/subsys/tomcat
RETVAL
=
0
start
(){
echo
"Starting Tomcat7: "
su -
$TOMCAT_USER
-c
"
$CATALINA_HOME
/bin/startup.sh"
RETVAL
=
$?
echo
[
$RETVAL
-eq
0
]
&&
touch
$LOCKFILE
return
$RETVAL
}
stop
(){
echo
"Shutting down Tomcat7: "
$CATALINA_HOME
/bin/shutdown.sh
RETVAL
=
$?
echo
[
$RETVAL
-eq
0
]
&&
rm
-f
$LOCKFILE
return
$RETVAL
}
case
"
$1
"
in
start
)
start
;;
stop
)
stop
;;
restart
)
stop
start
;;
status
)
status tomcat
;;
*
)
echo
$"Usage:
$0
{start|stop|restart|status}"
exit
1
;;
esac
exit
$?
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment