Commit 4a6568f3 authored by Łukasz Nowak's avatar Łukasz Nowak

Xwiki instantation recipe.

parent fb59d5dd
K 25
svn:wc:ra_dav:version-url
V 68
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki
END
CHANGES.txt
K 25
svn:wc:ra_dav:version-url
V 80
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/CHANGES.txt
END
setup.py
K 25
svn:wc:ra_dav:version-url
V 77
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/setup.py
END
MANIFEST.in
K 25
svn:wc:ra_dav:version-url
V 80
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/MANIFEST.in
END
README.txt
K 25
svn:wc:ra_dav:version-url
V 79
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/README.txt
END
setup.cfg
K 25
svn:wc:ra_dav:version-url
V 78
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/setup.cfg
END
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
CHANGES.txt
file
2011-04-15T12:07:28.111799Z
3b08119e86e1b1b69184da3df0eca1f0
2011-04-08T10:52:53.516084Z
45235
luke
56
src
dir
setup.py
file
2011-04-15T12:07:28.112799Z
27530d4d456d6cb7400b8b0087047512
2011-04-08T10:52:53.516084Z
45235
luke
919
MANIFEST.in
file
2011-04-15T12:07:28.112799Z
98e78b503eff1e97f33c34e08afab677
2011-04-08T10:52:53.516084Z
45235
luke
66
README.txt
file
2011-04-15T12:07:28.112799Z
086b81245a351f702a7ce4eed8500d83
2011-04-08T10:52:53.516084Z
45235
luke
66
setup.cfg
file
2011-04-15T12:07:28.112799Z
a1b4f7f3a0e844ee99d0ab77330826d1
2011-04-08T10:52:53.516084Z
45235
luke
49
Changelog
=========
1.0 (unreleased)
----------------
include CHANGES.txt
recursive-include src/slapos/recipe/erp5 *.in
The slapos.recipe.xwiki aims to instantiate an xwiki environment.
[egg_info]
tag_build = .dev
tag_svn_revision = 1
from setuptools import setup, find_packages
name = "slapos.recipe.xwiki"
version = '1.0'
def read(name):
return open(name).read()
long_description=( read('README.txt')
+ '\n' +
read('CHANGES.txt')
)
setup(
name = name,
version = version,
description = "ZC Buildout recipe for create an xwiki instance",
long_description=long_description,
license = "GPLv3",
keywords = "buildout slapos xwiki",
classifiers=[
"Framework :: Buildout :: Recipe",
"Programming Language :: Python",
],
packages = find_packages('src'),
package_dir = {'': 'src'},
include_package_data=True,
install_requires = [
'zc.recipe.egg',
'setuptools',
'slapos.lib.recipe',
],
namespace_packages = ['slapos', 'slapos.recipe'],
entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
)
Changelog
=========
1.0 (unreleased)
----------------
include CHANGES.txt
recursive-include src/slapos/recipe/erp5 *.in
The slapos.recipe.xwiki aims to instantiate an xwiki environment.
[egg_info]
tag_build = .dev
tag_svn_revision = 1
from setuptools import setup, find_packages
name = "slapos.recipe.xwiki"
version = '1.0'
def read(name):
return open(name).read()
long_description=( read('README.txt')
+ '\n' +
read('CHANGES.txt')
)
setup(
name = name,
version = version,
description = "ZC Buildout recipe for create an xwiki instance",
long_description=long_description,
license = "GPLv3",
keywords = "buildout slapos xwiki",
classifiers=[
"Framework :: Buildout :: Recipe",
"Programming Language :: Python",
],
packages = find_packages('src'),
package_dir = {'': 'src'},
include_package_data=True,
install_requires = [
'zc.recipe.egg',
'setuptools',
'slapos.lib.recipe',
],
namespace_packages = ['slapos', 'slapos.recipe'],
entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
)
K 25
svn:wc:ra_dav:version-url
V 72
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src
END
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
slapos
dir
K 25
svn:wc:ra_dav:version-url
V 79
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos
END
__init__.py
K 25
svn:wc:ra_dav:version-url
V 91
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/__init__.py
END
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
__init__.py
file
2011-04-15T12:07:28.109799Z
e8234e1a7b6db4112f8d1e356c985a40
2011-04-08T10:52:53.516084Z
45235
luke
245
recipe
dir
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
K 25
svn:wc:ra_dav:version-url
V 86
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe
END
__init__.py
K 25
svn:wc:ra_dav:version-url
V 98
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/__init__.py
END
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
__init__.py
file
2011-04-15T12:07:28.108799Z
e8234e1a7b6db4112f8d1e356c985a40
2011-04-08T10:52:53.516084Z
45235
luke
245
xwiki
dir
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
K 25
svn:wc:ra_dav:version-url
V 92
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki
END
__init__.py
K 25
svn:wc:ra_dav:version-url
V 104
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/__init__.py
END
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
__init__.py
file
2011-04-15T12:07:28.107799Z
c2c83100d9bb52238ea13f05aefd02e7
2011-04-08T10:52:53.516084Z
45235
luke
6983
template
dir
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.lib.recipe.BaseSlapRecipe import BaseSlapRecipe
import os
import shutil
import pkg_resources
import subprocess
import time
import zc.buildout
class Recipe(BaseSlapRecipe):
def _install(self):
parameter_dict = self.computer_partition.getInstanceParameterDict()
ipv4 = self.getLocalIPv4Address(parameter_dict)
ipv6 = self.getGlobalIPv6Address(parameter_dict)
self.install_mysql_server_configuration(self.getLocalIPv4Address(parameter_dict))
port = '8900'
tomcat_home = os.path.join(self.data_root_directory, 'tomcat')
tomcat_lib = os.path.join(tomcat_home, 'lib')
xwiki_home = os.path.join(tomcat_home, 'webapps', 'xwiki')
for src, dst in (
(self.options['tomcat_location'].strip(), tomcat_home),
(self.options['xwiki_location'].strip(), xwiki_home),
):
if not os.path.isdir(dst):
try:
shutil.copytree(src, dst)
except:
shtuil.rmtree(dst)
raise
shutil.copy(self.options['hsql_location'].strip(), os.path.join(tomcat_lib,
'hsqldb.jar'))
# headless mode
self._writeFile(os.path.join(tomcat_home, 'bin', 'setenv.sh'), '''#!/bin/sh
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
''')
# tomcat wrapper
catalina = os.path.join(tomcat_home, 'bin', 'catalina.sh')
# solve "The BASEDIR environment variable is not defined correctly"
bindir = os.path.join(tomcat_home, 'bin')
for f in os.listdir(bindir):
if f.endswith('.sh'):
os.chmod(os.path.join(bindir, f), 0755)
tomcat_wrapper = self.createRunningWrapper('xwiki', """#!/bin/sh
export JRE_HOME=%(java_home)s
exec %(catalina)s run
""" % dict(java_home=self.options['java_home'].strip(),
catalina = catalina))
tomcat_dict = dict(
http_address=ipv6,
http_port=port,
ajp_address=ipv4,
ajp_port="8009",
)
server_xml = os.path.join(tomcat_home, 'conf', 'server.xml')
self._writeFile(server_xml, pkg_resources.resource_string(__name__,
'template/tomcat-server.xml.in') % tomcat_dict)
hibernate_xml = os.path.join(tomcat_home, 'webapps', 'xwiki', 'WEB-INF', 'hibernate.cfg.xml')
self._writeFile(hibernate_xml, pkg_resources.resource_string(__name__,
'template/hibernate.cfg.xml.in') % dict(mysql_port='45678', mysql_ip = ipv4))
self.computer_partition.setConnectionDict(dict(
http_connection="http://[%s]:%s/xwiki/" % (ipv6, port),
))
return [server_xml, tomcat_wrapper]
def _initializeMysqlServer(self):
# XXX: Protect with proper root password
popen = subprocess.Popen([self.options['mysql_install_binary'],
'--skip-name-resolve', '--no-defaults',
'--datadir=%s' % self.data_directory],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = popen.communicate()[0]
if popen.returncode is None or popen.returncode != 0:
message = """Failed to initialise server in %(data_directory)r.
The error was: %(result)s""" % dict(data_directory=self.data_directory,
result=result)
raise zc.buildout.UserError(message)
def install_mysql_server_configuration(self, ip):
self.data_directory = os.path.join(self.data_root_directory,
'mysql_server')
self.configuration_file = os.path.join(self.etc_directory, 'my.cnf')
self._createDirectory(self.data_directory)
self.options['ip'] = ip
port = '45678'
self.options['tcp_port'] = port
self.options['data_directory'] = self.data_directory
self.options['pid_file'] = os.path.join(self.run_directory, 'mysqld.pid')
self.options['socket'] = os.path.join(self.run_directory, 'mysqld.sock')
self.options['error_log'] = os.path.join(self.log_directory, 'mysqld.log')
self.options['slow_query_log'] = os.path.join(self.log_directory,
'mysql-slow.log')
self._initializeMysqlServer()
mysql_conf_path = self.createConfigurationFile("my.cnf",
self.substituteTemplate(pkg_resources.resource_filename(__name__,
os.path.join('template', 'my.cnf.in')), self.options))
mysql_wrapper_path = self.createRunningWrapper('mysqld',
pkg_resources.resource_string(__name__, os.path.join('template',
'mysqld.bin')) % {'configuration_file': self.configuration_file,
'real_binary': self.options['mysqld_binary']})
mysql_connection_dict = dict(
ip=ip,
port=port,
user='xwiki',
password='xwiki',
database='xwiki',
)
# XXX: Bad thing -- it is required to fill mysql with some data, but there
# is no known any way to do it w/o running mysql (except rewriting
# mysql_install_db)
mysqld = subprocess.Popen([mysql_wrapper_path],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
try:
# XXX: Simplification of bad idea -- wait some time before connecting to
# mysql
time.sleep(2)
mysql = subprocess.Popen([self.options['mysql_binary'].strip(),
'--no-defaults', '-B', '--user=root',
'--socket=%s' % self.options['socket'],
], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = mysql.communicate(pkg_resources.resource_string(__name__,
'template/initmysql.sql.in') % mysql_connection_dict)[0]
if mysql.returncode is None:
mysql.kill()
if mysql.returncode != 0:
raise zc.buildout.UserError('Issue during filling database, mysql '
'command result was: %s' % result)
finally:
mysqld.kill()
self.computer_partition.setConnectionDict(mysql_connection_dict)
return [mysql_conf_path, mysql_wrapper_path]
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.lib.recipe.BaseSlapRecipe import BaseSlapRecipe
import os
import shutil
import pkg_resources
import subprocess
import time
import zc.buildout
class Recipe(BaseSlapRecipe):
def _install(self):
parameter_dict = self.computer_partition.getInstanceParameterDict()
ipv4 = self.getLocalIPv4Address(parameter_dict)
ipv6 = self.getGlobalIPv6Address(parameter_dict)
self.install_mysql_server_configuration(self.getLocalIPv4Address(parameter_dict))
port = '8900'
tomcat_home = os.path.join(self.data_root_directory, 'tomcat')
tomcat_lib = os.path.join(tomcat_home, 'lib')
xwiki_home = os.path.join(tomcat_home, 'webapps', 'xwiki')
for src, dst in (
(self.options['tomcat_location'].strip(), tomcat_home),
(self.options['xwiki_location'].strip(), xwiki_home),
):
if not os.path.isdir(dst):
try:
shutil.copytree(src, dst)
except:
shtuil.rmtree(dst)
raise
shutil.copy(self.options['hsql_location'].strip(), os.path.join(tomcat_lib,
'hsqldb.jar'))
# headless mode
self._writeFile(os.path.join(tomcat_home, 'bin', 'setenv.sh'), '''#!/bin/sh
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
''')
# tomcat wrapper
catalina = os.path.join(tomcat_home, 'bin', 'catalina.sh')
# solve "The BASEDIR environment variable is not defined correctly"
bindir = os.path.join(tomcat_home, 'bin')
for f in os.listdir(bindir):
if f.endswith('.sh'):
os.chmod(os.path.join(bindir, f), 0755)
tomcat_wrapper = self.createRunningWrapper('xwiki', """#!/bin/sh
export JRE_HOME=%(java_home)s
exec %(catalina)s run
""" % dict(java_home=self.options['java_home'].strip(),
catalina = catalina))
tomcat_dict = dict(
http_address=ipv6,
http_port=port,
ajp_address=ipv4,
ajp_port="8009",
)
server_xml = os.path.join(tomcat_home, 'conf', 'server.xml')
self._writeFile(server_xml, pkg_resources.resource_string(__name__,
'template/tomcat-server.xml.in') % tomcat_dict)
hibernate_xml = os.path.join(tomcat_home, 'webapps', 'xwiki', 'WEB-INF', 'hibernate.cfg.xml')
self._writeFile(hibernate_xml, pkg_resources.resource_string(__name__,
'template/hibernate.cfg.xml.in') % dict(mysql_port='45678', mysql_ip = ipv4))
self.computer_partition.setConnectionDict(dict(
http_connection="http://[%s]:%s/xwiki/" % (ipv6, port),
))
return [server_xml, tomcat_wrapper]
def _initializeMysqlServer(self):
# XXX: Protect with proper root password
popen = subprocess.Popen([self.options['mysql_install_binary'],
'--skip-name-resolve', '--no-defaults',
'--datadir=%s' % self.data_directory],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = popen.communicate()[0]
if popen.returncode is None or popen.returncode != 0:
message = """Failed to initialise server in %(data_directory)r.
The error was: %(result)s""" % dict(data_directory=self.data_directory,
result=result)
raise zc.buildout.UserError(message)
def install_mysql_server_configuration(self, ip):
self.data_directory = os.path.join(self.data_root_directory,
'mysql_server')
self.configuration_file = os.path.join(self.etc_directory, 'my.cnf')
self._createDirectory(self.data_directory)
self.options['ip'] = ip
port = '45678'
self.options['tcp_port'] = port
self.options['data_directory'] = self.data_directory
self.options['pid_file'] = os.path.join(self.run_directory, 'mysqld.pid')
self.options['socket'] = os.path.join(self.run_directory, 'mysqld.sock')
self.options['error_log'] = os.path.join(self.log_directory, 'mysqld.log')
self.options['slow_query_log'] = os.path.join(self.log_directory,
'mysql-slow.log')
self._initializeMysqlServer()
mysql_conf_path = self.createConfigurationFile("my.cnf",
self.substituteTemplate(pkg_resources.resource_filename(__name__,
os.path.join('template', 'my.cnf.in')), self.options))
mysql_wrapper_path = self.createRunningWrapper('mysqld',
pkg_resources.resource_string(__name__, os.path.join('template',
'mysqld.bin')) % {'configuration_file': self.configuration_file,
'real_binary': self.options['mysqld_binary']})
mysql_connection_dict = dict(
ip=ip,
port=port,
user='xwiki',
password='xwiki',
database='xwiki',
)
# XXX: Bad thing -- it is required to fill mysql with some data, but there
# is no known any way to do it w/o running mysql (except rewriting
# mysql_install_db)
mysqld = subprocess.Popen([mysql_wrapper_path],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
try:
# XXX: Simplification of bad idea -- wait some time before connecting to
# mysql
time.sleep(2)
mysql = subprocess.Popen([self.options['mysql_binary'].strip(),
'--no-defaults', '-B', '--user=root',
'--socket=%s' % self.options['socket'],
], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = mysql.communicate(pkg_resources.resource_string(__name__,
'template/initmysql.sql.in') % mysql_connection_dict)[0]
if mysql.returncode is None:
mysql.kill()
if mysql.returncode != 0:
raise zc.buildout.UserError('Issue during filling database, mysql '
'command result was: %s' % result)
finally:
mysqld.kill()
self.computer_partition.setConnectionDict(mysql_connection_dict)
return [mysql_conf_path, mysql_wrapper_path]
K 25
svn:wc:ra_dav:version-url
V 101
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template
END
my.cnf.in
K 25
svn:wc:ra_dav:version-url
V 111
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/my.cnf.in
END
tomcat-server.xml.in
K 25
svn:wc:ra_dav:version-url
V 122
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/tomcat-server.xml.in
END
mysqld.bin
K 25
svn:wc:ra_dav:version-url
V 112
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/mysqld.bin
END
hibernate.cfg.xml.in
K 25
svn:wc:ra_dav:version-url
V 122
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/hibernate.cfg.xml.in
END
initmysql.sql.in
K 25
svn:wc:ra_dav:version-url
V 118
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/initmysql.sql.in
END
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
my.cnf.in
file
2011-04-15T12:07:28.105799Z
4e14aadbd4cc702f79be73d30e43910a
2011-04-08T10:52:53.516084Z
45235
luke
1748
tomcat-server.xml.in
file
2011-04-15T12:07:28.106799Z
e2f38e13d03651be5e315648486d5037
2011-04-08T10:52:53.516084Z
45235
luke
6832
mysqld.bin
file
2011-04-15T12:07:28.106799Z
c8d25b8de5d48ec743ef96765510295c
2011-04-08T10:52:53.516084Z
45235
luke
70
hibernate.cfg.xml.in
file
2011-04-15T12:07:28.106799Z
6b232131d3aa1cf19c9b1bf07db98aaf
2011-04-08T10:52:53.516084Z
45235
luke
7107
initmysql.sql.in
file
2011-04-15T12:07:28.106799Z
0b2a21fe9fb6578bfa7756978cabd26e
2011-04-08T10:52:53.516084Z
45235
luke
129
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Please refer to the installation guide on
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your
database. You'll need to do 2 things:
1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory
2) Uncomment the properties below for your specific DB (and comment the default
database configuration if it doesn't match your DB)
-->
<!-- Generic parameters common to all Databases -->
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="dbcp.defaultAutoCommit">false</property>
<property name="dbcp.maxActive">50</property>
<property name="dbcp.maxIdle">5</property>
<property name="dbcp.maxWait">30000</property>
<property name="dbcp.whenExhaustedAction">1</property>
<property name="dbcp.ps.whenExhaustedAction">1</property>
<property name="dbcp.ps.maxActive">20</property>
<property name="dbcp.ps.maxWait">120000</property>
<property name="dbcp.ps.maxIdle">20</property>
<!-- Without it, some queries fail in MS SQL. XWiki doesn't need scrollable result sets, anyway. -->
<property name="jdbc.use_scrollable_resultset">false</property>
<!-- Configuration for the default database.
Comment out this section and uncomment other sections below if you want to use another database.
Note that the database tables will be created automatically if they don't already exist.
<property name="connection.url">jdbc:hsqldb:file:database/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database configurations.
We need to set the sql_mode to a less strict value, see XWIKI-1945
-->
<property name="connection.url">jdbc:mysql://%(mysql_ip)s:%(mysql_port)s/xwiki?useServerPrepStmts=false&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<!-- HSQLDB configuration.
Uncomment if you want to use HSQLDB and comment out other database configurations.
<property name="connection.url">jdbc:hsqldb:file:/some/path/xwikidb;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- PostgreSQL configuration.
Uncomment if you want to use PostgreSQL and comment out other database configurations.
<property name="connection.url">jdbc:postgresql:xwiki</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- Oracle configuration.
Uncomment if you want to use Oracle and comment out other database configurations.
Note: the 2 properties named "hibernate.connection.SetBigStringTryClob" and
"hibernate.jdbc.batch_size". They are required to tell Oracle to allow CLOBs larger than
32K.
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<property name="hibernate.connection.SetBigStringTryClob">true</property>
<property name="hibernate.jdbc.batch_size">0</property>
<mapping resource="xwiki.oracle.hbm.xml"/>
<mapping resource="feeds.oracle.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- Derby configuration.
Uncomment if you want to use Derby and comment out other database configurations.
<property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</property>
<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="dialect">org.hibernate.dialect.DerbyDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.derby.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
</session-factory>
</hibernate-configuration>
CREATE DATABASE IF NOT EXISTS xwiki;
GRANT ALL PRIVILEGES ON %(database)s.* TO %(user)s@'%%' IDENTIFIED BY '%(password)s';
EXIT
# ERP5 buildout my.cnf template based on my-huge.cnf shipped with mysql
# The MySQL server
[mysqld]
# ERP5 by default requires InnoDB storage. MySQL by default fallbacks to using
# different engine, like MyISAM. Such behaviour generates problems only, when
# tables requested as InnoDB are silently created with MyISAM engine.
#
# Loud fail is really required in such case.
sql-mode="NO_ENGINE_SUBSTITUTION"
skip-show-database
port = %(tcp_port)s
bind-address = %(ip)s
socket = %(socket)s
datadir = %(data_directory)s
pid-file = %(pid_file)s
log-error = %(error_log)s
log-slow-queries = %(slow_query_log)s
long_query_time = 5
skip-locking
key_buffer = 384M
max_allowed_packet = 128M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Disable Federated by default
skip-federated
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Force utf8 usage
collation_server = utf8_unicode_ci
character_set_server = utf8
default-character-set = utf8
skip-character-set-client-handshake
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
socket = %(socket)s
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
#!/bin/sh
exec %(real_binary)s --defaults-file=%(configuration_file)s
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="-1" shutdown="SHUTDOWN">
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector address="%(http_address)s" port="%(http_port)s" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector address="%(ajp_address)s" port="%(ajp_port)s" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
</Host>
</Engine>
</Service>
</Server>
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Please refer to the installation guide on
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your
database. You'll need to do 2 things:
1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory
2) Uncomment the properties below for your specific DB (and comment the default
database configuration if it doesn't match your DB)
-->
<!-- Generic parameters common to all Databases -->
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="dbcp.defaultAutoCommit">false</property>
<property name="dbcp.maxActive">50</property>
<property name="dbcp.maxIdle">5</property>
<property name="dbcp.maxWait">30000</property>
<property name="dbcp.whenExhaustedAction">1</property>
<property name="dbcp.ps.whenExhaustedAction">1</property>
<property name="dbcp.ps.maxActive">20</property>
<property name="dbcp.ps.maxWait">120000</property>
<property name="dbcp.ps.maxIdle">20</property>
<!-- Without it, some queries fail in MS SQL. XWiki doesn't need scrollable result sets, anyway. -->
<property name="jdbc.use_scrollable_resultset">false</property>
<!-- Configuration for the default database.
Comment out this section and uncomment other sections below if you want to use another database.
Note that the database tables will be created automatically if they don't already exist.
<property name="connection.url">jdbc:hsqldb:file:database/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database configurations.
We need to set the sql_mode to a less strict value, see XWIKI-1945
-->
<property name="connection.url">jdbc:mysql://%(mysql_ip)s:%(mysql_port)s/xwiki?useServerPrepStmts=false&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<!-- HSQLDB configuration.
Uncomment if you want to use HSQLDB and comment out other database configurations.
<property name="connection.url">jdbc:hsqldb:file:/some/path/xwikidb;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- PostgreSQL configuration.
Uncomment if you want to use PostgreSQL and comment out other database configurations.
<property name="connection.url">jdbc:postgresql:xwiki</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- Oracle configuration.
Uncomment if you want to use Oracle and comment out other database configurations.
Note: the 2 properties named "hibernate.connection.SetBigStringTryClob" and
"hibernate.jdbc.batch_size". They are required to tell Oracle to allow CLOBs larger than
32K.
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<property name="hibernate.connection.SetBigStringTryClob">true</property>
<property name="hibernate.jdbc.batch_size">0</property>
<mapping resource="xwiki.oracle.hbm.xml"/>
<mapping resource="feeds.oracle.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
<!-- Derby configuration.
Uncomment if you want to use Derby and comment out other database configurations.
<property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</property>
<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="dialect">org.hibernate.dialect.DerbyDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.derby.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
-->
</session-factory>
</hibernate-configuration>
CREATE DATABASE IF NOT EXISTS xwiki;
GRANT ALL PRIVILEGES ON %(database)s.* TO %(user)s@'%%' IDENTIFIED BY '%(password)s';
EXIT
# ERP5 buildout my.cnf template based on my-huge.cnf shipped with mysql
# The MySQL server
[mysqld]
# ERP5 by default requires InnoDB storage. MySQL by default fallbacks to using
# different engine, like MyISAM. Such behaviour generates problems only, when
# tables requested as InnoDB are silently created with MyISAM engine.
#
# Loud fail is really required in such case.
sql-mode="NO_ENGINE_SUBSTITUTION"
skip-show-database
port = %(tcp_port)s
bind-address = %(ip)s
socket = %(socket)s
datadir = %(data_directory)s
pid-file = %(pid_file)s
log-error = %(error_log)s
log-slow-queries = %(slow_query_log)s
long_query_time = 5
skip-locking
key_buffer = 384M
max_allowed_packet = 128M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Disable Federated by default
skip-federated
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Force utf8 usage
collation_server = utf8_unicode_ci
character_set_server = utf8
default-character-set = utf8
skip-character-set-client-handshake
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
socket = %(socket)s
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
#!/bin/sh
exec %(real_binary)s --defaults-file=%(configuration_file)s
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="-1" shutdown="SHUTDOWN">
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector address="%(http_address)s" port="%(http_port)s" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector address="%(ajp_address)s" port="%(ajp_port)s" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
</Host>
</Engine>
</Service>
</Server>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment