init
This commit is contained in:
commit
0cb022d3f5
16
apache/Dockerfile
Normal file
16
apache/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
# Use the official Apache HTTP Server image as the base image
|
||||
FROM httpd:latest
|
||||
|
||||
# Install OpenSSL for SSL configuration
|
||||
RUN apt-get update && apt-get install -y openssl
|
||||
|
||||
# Copy custom configuration files into the container
|
||||
COPY ./conf/httpd.conf /usr/local/apache2/conf/httpd.conf
|
||||
COPY ./conf/ssl/ /usr/local/apache2/conf/ssl/
|
||||
|
||||
# Expose ports for HTTP and HTTPS
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
# Start Apache in the foreground
|
||||
CMD ["httpd-foreground"]
|
||||
BIN
apache/conf/desktop.ini
Normal file
BIN
apache/conf/desktop.ini
Normal file
Binary file not shown.
625
apache/conf/httpd.conf
Normal file
625
apache/conf/httpd.conf
Normal file
@ -0,0 +1,625 @@
|
||||
#
|
||||
# This is the main Apache HTTP server configuration file. It contains the
|
||||
# configuration directives that give the server its instructions.
|
||||
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
|
||||
# In particular, see
|
||||
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
|
||||
# for a discussion of each configuration directive.
|
||||
#
|
||||
# Do NOT simply read the instructions in here without understanding
|
||||
# what they do. They're here only as hints or reminders. If you are unsure
|
||||
# consult the online docs. You have been warned.
|
||||
#
|
||||
# Configuration and logfile names: If the filenames you specify for many
|
||||
# of the server's control files begin with "/" (or "drive:/" for Win32), the
|
||||
# server will use that explicit path. If the filenames do *not* begin
|
||||
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
|
||||
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
|
||||
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
|
||||
# will be interpreted as '/logs/access_log'.
|
||||
|
||||
#
|
||||
# ServerRoot: The top of the directory tree under which the server's
|
||||
# configuration, error, and log files are kept.
|
||||
#
|
||||
# Do not add a slash at the end of the directory path. If you point
|
||||
# ServerRoot at a non-local disk, be sure to specify a local disk on the
|
||||
# Mutex directive, if file-based mutexes are used. If you wish to share the
|
||||
# same ServerRoot for multiple httpd daemons, you will need to change at
|
||||
# least PidFile.
|
||||
#
|
||||
ServerRoot "/usr/local/apache2"
|
||||
|
||||
#
|
||||
# Mutex: Allows you to set the mutex mechanism and mutex file directory
|
||||
# for individual mutexes, or change the global defaults
|
||||
#
|
||||
# Uncomment and change the directory if mutexes are file-based and the default
|
||||
# mutex file directory is not on a local disk or is not appropriate for some
|
||||
# other reason.
|
||||
#
|
||||
# Mutex default:logs
|
||||
|
||||
#
|
||||
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
||||
# ports, instead of the default. See also the <VirtualHost>
|
||||
# directive.
|
||||
#
|
||||
# Change this to Listen on specific IP addresses as shown below to
|
||||
# prevent Apache from glomming onto all bound IP addresses.
|
||||
#
|
||||
#Listen 12.34.56.78:80
|
||||
|
||||
|
||||
#
|
||||
# Dynamic Shared Object (DSO) Support
|
||||
#
|
||||
# To be able to use the functionality of a module which was built as a DSO you
|
||||
# have to place corresponding `LoadModule' lines at this location so the
|
||||
# directives contained in it are actually available _before_ they are used.
|
||||
# Statically compiled modules (those listed by `httpd -l') do not need
|
||||
# to be loaded here.
|
||||
#
|
||||
# Example:
|
||||
# LoadModule foo_module modules/mod_foo.so
|
||||
#
|
||||
LoadModule mpm_event_module modules/mod_mpm_event.so
|
||||
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
|
||||
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
|
||||
LoadModule authn_file_module modules/mod_authn_file.so
|
||||
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
|
||||
#LoadModule authn_anon_module modules/mod_authn_anon.so
|
||||
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
|
||||
#LoadModule authn_socache_module modules/mod_authn_socache.so
|
||||
LoadModule authn_core_module modules/mod_authn_core.so
|
||||
LoadModule authz_host_module modules/mod_authz_host.so
|
||||
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
|
||||
LoadModule authz_user_module modules/mod_authz_user.so
|
||||
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
|
||||
#LoadModule authz_owner_module modules/mod_authz_owner.so
|
||||
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
|
||||
LoadModule authz_core_module modules/mod_authz_core.so
|
||||
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
|
||||
#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
|
||||
LoadModule access_compat_module modules/mod_access_compat.so
|
||||
LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||
#LoadModule auth_form_module modules/mod_auth_form.so
|
||||
#LoadModule auth_digest_module modules/mod_auth_digest.so
|
||||
#LoadModule allowmethods_module modules/mod_allowmethods.so
|
||||
#LoadModule isapi_module modules/mod_isapi.so
|
||||
#LoadModule file_cache_module modules/mod_file_cache.so
|
||||
#LoadModule cache_module modules/mod_cache.so
|
||||
#LoadModule cache_disk_module modules/mod_cache_disk.so
|
||||
#LoadModule cache_socache_module modules/mod_cache_socache.so
|
||||
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
|
||||
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
|
||||
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
|
||||
#LoadModule socache_redis_module modules/mod_socache_redis.so
|
||||
#LoadModule watchdog_module modules/mod_watchdog.so
|
||||
#LoadModule macro_module modules/mod_macro.so
|
||||
#LoadModule dbd_module modules/mod_dbd.so
|
||||
#LoadModule bucketeer_module modules/mod_bucketeer.so
|
||||
#LoadModule dumpio_module modules/mod_dumpio.so
|
||||
#LoadModule echo_module modules/mod_echo.so
|
||||
#LoadModule example_hooks_module modules/mod_example_hooks.so
|
||||
#LoadModule case_filter_module modules/mod_case_filter.so
|
||||
#LoadModule case_filter_in_module modules/mod_case_filter_in.so
|
||||
#LoadModule example_ipc_module modules/mod_example_ipc.so
|
||||
#LoadModule buffer_module modules/mod_buffer.so
|
||||
#LoadModule data_module modules/mod_data.so
|
||||
#LoadModule ratelimit_module modules/mod_ratelimit.so
|
||||
LoadModule reqtimeout_module modules/mod_reqtimeout.so
|
||||
#LoadModule ext_filter_module modules/mod_ext_filter.so
|
||||
#LoadModule request_module modules/mod_request.so
|
||||
#LoadModule include_module modules/mod_include.so
|
||||
LoadModule filter_module modules/mod_filter.so
|
||||
#LoadModule reflector_module modules/mod_reflector.so
|
||||
#LoadModule substitute_module modules/mod_substitute.so
|
||||
#LoadModule sed_module modules/mod_sed.so
|
||||
#LoadModule charset_lite_module modules/mod_charset_lite.so
|
||||
LoadModule deflate_module modules/mod_deflate.so
|
||||
#LoadModule xml2enc_module modules/mod_xml2enc.so
|
||||
#LoadModule proxy_html_module modules/mod_proxy_html.so
|
||||
LoadModule brotli_module modules/mod_brotli.so
|
||||
LoadModule mime_module modules/mod_mime.so
|
||||
#LoadModule ldap_module modules/mod_ldap.so
|
||||
LoadModule log_config_module modules/mod_log_config.so
|
||||
#LoadModule log_debug_module modules/mod_log_debug.so
|
||||
#LoadModule log_forensic_module modules/mod_log_forensic.so
|
||||
#LoadModule logio_module modules/mod_logio.so
|
||||
#LoadModule lua_module modules/mod_lua.so
|
||||
LoadModule env_module modules/mod_env.so
|
||||
#LoadModule mime_magic_module modules/mod_mime_magic.so
|
||||
#LoadModule cern_meta_module modules/mod_cern_meta.so
|
||||
#LoadModule expires_module modules/mod_expires.so
|
||||
LoadModule headers_module modules/mod_headers.so
|
||||
#LoadModule ident_module modules/mod_ident.so
|
||||
#LoadModule usertrack_module modules/mod_usertrack.so
|
||||
#LoadModule unique_id_module modules/mod_unique_id.so
|
||||
LoadModule setenvif_module modules/mod_setenvif.so
|
||||
LoadModule version_module modules/mod_version.so
|
||||
#LoadModule remoteip_module modules/mod_remoteip.so
|
||||
#LoadModule proxy_module modules/mod_proxy.so
|
||||
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
||||
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
||||
#LoadModule proxy_http_module modules/mod_proxy_http.so
|
||||
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
|
||||
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
|
||||
#LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
|
||||
#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
|
||||
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
|
||||
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
||||
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
|
||||
#LoadModule proxy_express_module modules/mod_proxy_express.so
|
||||
#LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
|
||||
#LoadModule session_module modules/mod_session.so
|
||||
#LoadModule session_cookie_module modules/mod_session_cookie.so
|
||||
#LoadModule session_crypto_module modules/mod_session_crypto.so
|
||||
#LoadModule session_dbd_module modules/mod_session_dbd.so
|
||||
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
|
||||
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
|
||||
LoadModule ssl_module modules/mod_ssl.so
|
||||
#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
|
||||
#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
|
||||
#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
|
||||
#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
|
||||
#LoadModule dialup_module modules/mod_dialup.so
|
||||
LoadModule http2_module modules/mod_http2.so
|
||||
#LoadModule proxy_http2_module modules/mod_proxy_http2.so
|
||||
#LoadModule md_module modules/mod_md.so
|
||||
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
|
||||
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
|
||||
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
|
||||
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
|
||||
LoadModule unixd_module modules/mod_unixd.so
|
||||
#LoadModule heartbeat_module modules/mod_heartbeat.so
|
||||
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
|
||||
#LoadModule dav_module modules/mod_dav.so
|
||||
LoadModule status_module modules/mod_status.so
|
||||
LoadModule autoindex_module modules/mod_autoindex.so
|
||||
#LoadModule asis_module modules/mod_asis.so
|
||||
#LoadModule info_module modules/mod_info.so
|
||||
#LoadModule suexec_module modules/mod_suexec.so
|
||||
<IfModule !mpm_prefork_module>
|
||||
#LoadModule cgid_module modules/mod_cgid.so
|
||||
</IfModule>
|
||||
<IfModule mpm_prefork_module>
|
||||
#LoadModule cgi_module modules/mod_cgi.so
|
||||
</IfModule>
|
||||
#LoadModule dav_fs_module modules/mod_dav_fs.so
|
||||
#LoadModule dav_lock_module modules/mod_dav_lock.so
|
||||
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
||||
#LoadModule negotiation_module modules/mod_negotiation.so
|
||||
LoadModule dir_module modules/mod_dir.so
|
||||
#LoadModule imagemap_module modules/mod_imagemap.so
|
||||
#LoadModule actions_module modules/mod_actions.so
|
||||
#LoadModule speling_module modules/mod_speling.so
|
||||
#LoadModule userdir_module modules/mod_userdir.so
|
||||
LoadModule alias_module modules/mod_alias.so
|
||||
#LoadModule rewrite_module modules/mod_rewrite.so
|
||||
|
||||
<IfModule unixd_module>
|
||||
#
|
||||
# If you wish httpd to run as a different user or group, you must run
|
||||
# httpd as root initially and it will switch.
|
||||
#
|
||||
# User/Group: The name (or #number) of the user/group to run httpd as.
|
||||
# It is usually good practice to create a dedicated user and group for
|
||||
# running httpd, as with most system services.
|
||||
#
|
||||
User www-data
|
||||
Group www-data
|
||||
|
||||
</IfModule>
|
||||
|
||||
# 'Main' server configuration
|
||||
#
|
||||
# The directives in this section set up the values used by the 'main'
|
||||
# server, which responds to any requests that aren't handled by a
|
||||
# <VirtualHost> definition. These values also provide defaults for
|
||||
# any <VirtualHost> containers you may define later in the file.
|
||||
#
|
||||
# All of these directives may appear inside <VirtualHost> containers,
|
||||
# in which case these default settings will be overridden for the
|
||||
# virtual host being defined.
|
||||
#
|
||||
|
||||
#
|
||||
# ServerAdmin: Your address, where problems with the server should be
|
||||
# e-mailed. This address appears on some server-generated pages, such
|
||||
# as error documents. e.g. admin@your-domain.com
|
||||
#
|
||||
ServerAdmin you@example.com
|
||||
|
||||
#
|
||||
# ServerName gives the name and port that the server uses to identify itself.
|
||||
# This can often be determined automatically, but we recommend you specify
|
||||
# it explicitly to prevent problems during startup.
|
||||
#
|
||||
# If your host doesn't have a registered DNS name, enter its IP address here.
|
||||
#
|
||||
#ServerName www.example.com:80
|
||||
|
||||
#
|
||||
# Deny access to the entirety of your server's filesystem. You must
|
||||
# explicitly permit access to web content directories in other
|
||||
# <Directory> blocks below.
|
||||
#
|
||||
<Directory />
|
||||
AllowOverride none
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
||||
#
|
||||
# Note that from this point forward you must specifically allow
|
||||
# particular features to be enabled - so if something's not working as
|
||||
# you might expect, make sure that you have specifically enabled it
|
||||
# below.
|
||||
#
|
||||
|
||||
#
|
||||
# DocumentRoot: The directory out of which you will serve your
|
||||
# documents. By default, all requests are taken from this directory, but
|
||||
# symbolic links and aliases may be used to point to other locations.
|
||||
#
|
||||
DocumentRoot "/usr/local/apache2/htdocs"
|
||||
<Directory "/usr/local/apache2/htdocs">
|
||||
#
|
||||
# Possible values for the Options directive are "None", "All",
|
||||
# or any combination of:
|
||||
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
||||
#
|
||||
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
||||
# doesn't give it to you.
|
||||
#
|
||||
# The Options directive is both complicated and important. Please see
|
||||
# http://httpd.apache.org/docs/2.4/mod/core.html#options
|
||||
# for more information.
|
||||
#
|
||||
Options Indexes FollowSymLinks
|
||||
|
||||
#
|
||||
# AllowOverride controls what directives may be placed in .htaccess files.
|
||||
# It can be "All", "None", or any combination of the keywords:
|
||||
# AllowOverride FileInfo AuthConfig Limit
|
||||
#
|
||||
AllowOverride None
|
||||
|
||||
#
|
||||
# Controls who can get stuff from this server.
|
||||
#
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
#
|
||||
# DirectoryIndex: sets the file that Apache will serve if a directory
|
||||
# is requested.
|
||||
#
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.html
|
||||
</IfModule>
|
||||
|
||||
#
|
||||
# The following lines prevent .htaccess and .htpasswd files from being
|
||||
# viewed by Web clients.
|
||||
#
|
||||
<Files ".ht*">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
#
|
||||
# ErrorLog: The location of the error log file.
|
||||
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
||||
# container, error messages relating to that virtual host will be
|
||||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
#
|
||||
ErrorLog /proc/self/fd/2
|
||||
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
# Possible values include: debug, info, notice, warn, error, crit,
|
||||
# alert, emerg.
|
||||
#
|
||||
LogLevel warn
|
||||
|
||||
<IfModule log_config_module>
|
||||
#
|
||||
# The following directives define some format nicknames for use with
|
||||
# a CustomLog directive (see below).
|
||||
#
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
|
||||
<IfModule logio_module>
|
||||
# You need to enable mod_logio.c to use %I and %O
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||
</IfModule>
|
||||
|
||||
#
|
||||
# The location and format of the access logfile (Common Logfile Format).
|
||||
# If you do not define any access logfiles within a <VirtualHost>
|
||||
# container, they will be logged here. Contrariwise, if you *do*
|
||||
# define per-<VirtualHost> access logfiles, transactions will be
|
||||
# logged therein and *not* in this file.
|
||||
#
|
||||
CustomLog /proc/self/fd/1 common
|
||||
|
||||
#
|
||||
# If you prefer a logfile with access, agent, and referer information
|
||||
# (Combined Logfile Format) you can use the following directive.
|
||||
#
|
||||
#CustomLog "logs/access_log" combined
|
||||
</IfModule>
|
||||
|
||||
<IfModule alias_module>
|
||||
#
|
||||
# Redirect: Allows you to tell clients about documents that used to
|
||||
# exist in your server's namespace, but do not anymore. The client
|
||||
# will make a new request for the document at its new location.
|
||||
# Example:
|
||||
# Redirect permanent /foo http://www.example.com/bar
|
||||
|
||||
#
|
||||
# Alias: Maps web paths into filesystem paths and is used to
|
||||
# access content that does not live under the DocumentRoot.
|
||||
# Example:
|
||||
# Alias /webpath /full/filesystem/path
|
||||
#
|
||||
# If you include a trailing / on /webpath then the server will
|
||||
# require it to be present in the URL. You will also likely
|
||||
# need to provide a <Directory> section to allow access to
|
||||
# the filesystem path.
|
||||
|
||||
#
|
||||
# ScriptAlias: This controls which directories contain server scripts.
|
||||
# ScriptAliases are essentially the same as Aliases, except that
|
||||
# documents in the target directory are treated as applications and
|
||||
# run by the server when requested rather than as documents sent to the
|
||||
# client. The same rules about trailing "/" apply to ScriptAlias
|
||||
# directives as to Alias.
|
||||
#
|
||||
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
|
||||
|
||||
</IfModule>
|
||||
|
||||
<IfModule cgid_module>
|
||||
#
|
||||
# ScriptSock: On threaded servers, designate the path to the UNIX
|
||||
# socket used to communicate with the CGI daemon of mod_cgid.
|
||||
#
|
||||
#Scriptsock cgisock
|
||||
</IfModule>
|
||||
|
||||
#
|
||||
# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
|
||||
# CGI directory exists, if you have that configured.
|
||||
#
|
||||
<Directory "/usr/local/apache2/cgi-bin">
|
||||
AllowOverride None
|
||||
Options None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<IfModule headers_module>
|
||||
#
|
||||
# Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
|
||||
# backend servers which have lingering "httpoxy" defects.
|
||||
# 'Proxy' request header is undefined by the IETF, not listed by IANA
|
||||
#
|
||||
RequestHeader unset Proxy early
|
||||
</IfModule>
|
||||
|
||||
<IfModule mime_module>
|
||||
#
|
||||
# TypesConfig points to the file containing the list of mappings from
|
||||
# filename extension to MIME-type.
|
||||
#
|
||||
TypesConfig conf/mime.types
|
||||
|
||||
#
|
||||
# AddType allows you to add to or override the MIME configuration
|
||||
# file specified in TypesConfig for specific file types.
|
||||
#
|
||||
#AddType application/x-gzip .tgz
|
||||
#
|
||||
# AddEncoding allows you to have certain browsers uncompress
|
||||
# information on the fly. Note: Not all browsers support this.
|
||||
#
|
||||
#AddEncoding x-compress .Z
|
||||
#AddEncoding x-gzip .gz .tgz
|
||||
#
|
||||
# If the AddEncoding directives above are commented-out, then you
|
||||
# probably should define those extensions to indicate media types:
|
||||
#
|
||||
AddType application/x-compress .Z
|
||||
AddType application/x-gzip .gz .tgz
|
||||
|
||||
#
|
||||
# AddHandler allows you to map certain file extensions to "handlers":
|
||||
# actions unrelated to filetype. These can be either built into the server
|
||||
# or added with the Action directive (see below)
|
||||
#
|
||||
# To use CGI scripts outside of ScriptAliased directories:
|
||||
# (You will also need to add "ExecCGI" to the "Options" directive.)
|
||||
#
|
||||
#AddHandler cgi-script .cgi
|
||||
|
||||
# For type maps (negotiated resources):
|
||||
#AddHandler type-map var
|
||||
|
||||
#
|
||||
# Filters allow you to process content before it is sent to the client.
|
||||
#
|
||||
# To parse .shtml files for server-side includes (SSI):
|
||||
# (You will also need to add "Includes" to the "Options" directive.)
|
||||
#
|
||||
#AddType text/html .shtml
|
||||
#AddOutputFilter INCLUDES .shtml
|
||||
</IfModule>
|
||||
|
||||
#
|
||||
# The mod_mime_magic module allows the server to use various hints from the
|
||||
# contents of the file itself to determine its type. The MIMEMagicFile
|
||||
# directive tells the module where the hint definitions are located.
|
||||
#
|
||||
#MIMEMagicFile conf/magic
|
||||
|
||||
#
|
||||
# Customizable error responses come in three flavors:
|
||||
# 1) plain text 2) local redirects 3) external redirects
|
||||
#
|
||||
# Some examples:
|
||||
#ErrorDocument 500 "The server made a boo boo."
|
||||
#ErrorDocument 404 /missing.html
|
||||
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
|
||||
#ErrorDocument 402 http://www.example.com/subscription_info.html
|
||||
#
|
||||
|
||||
#
|
||||
# MaxRanges: Maximum number of Ranges in a request before
|
||||
# returning the entire resource, or one of the special
|
||||
# values 'default', 'none' or 'unlimited'.
|
||||
# Default setting is to accept 200 Ranges.
|
||||
#MaxRanges unlimited
|
||||
|
||||
#
|
||||
# EnableMMAP and EnableSendfile: On systems that support it,
|
||||
# memory-mapping or the sendfile syscall may be used to deliver
|
||||
# files. This usually improves server performance, but must
|
||||
# be turned off when serving from networked-mounted
|
||||
# filesystems or if support for these functions is otherwise
|
||||
# broken on your system.
|
||||
# Defaults: EnableMMAP On, EnableSendfile Off
|
||||
#
|
||||
#EnableMMAP off
|
||||
#EnableSendfile on
|
||||
|
||||
# Supplemental configuration
|
||||
#
|
||||
# The configuration files in the conf/extra/ directory can be
|
||||
# included to add extra features or to modify the default configuration of
|
||||
# the server, or you may simply copy their contents here and change as
|
||||
# necessary.
|
||||
|
||||
# Server-pool management (MPM specific)
|
||||
#Include conf/extra/httpd-mpm.conf
|
||||
|
||||
# Multi-language error messages
|
||||
#Include conf/extra/httpd-multilang-errordoc.conf
|
||||
|
||||
# Fancy directory listings
|
||||
#Include conf/extra/httpd-autoindex.conf
|
||||
|
||||
# Language settings
|
||||
#Include conf/extra/httpd-languages.conf
|
||||
|
||||
# User home directories
|
||||
#Include conf/extra/httpd-userdir.conf
|
||||
|
||||
# Real-time info on requests and configuration
|
||||
#Include conf/extra/httpd-info.conf
|
||||
|
||||
# Virtual hosts
|
||||
#Include conf/extra/httpd-vhosts.conf
|
||||
|
||||
# Local access to the Apache HTTP Server Manual
|
||||
#Include conf/extra/httpd-manual.conf
|
||||
|
||||
# Distributed authoring and versioning (WebDAV)
|
||||
#Include conf/extra/httpd-dav.conf
|
||||
|
||||
# Various default settings
|
||||
#Include conf/extra/httpd-default.conf
|
||||
|
||||
# Configure mod_proxy_html to understand HTML4/XHTML1
|
||||
<IfModule proxy_html_module>
|
||||
Include conf/extra/proxy-html.conf
|
||||
</IfModule>
|
||||
|
||||
# Secure (SSL/TLS) connections
|
||||
#Include conf/extra/httpd-ssl.conf
|
||||
#
|
||||
# Note: The following must must be present to support
|
||||
# starting without SSL on platforms with no /dev/random equivalent
|
||||
# but a statically compiled-in mod_ssl.
|
||||
#
|
||||
<IfModule ssl_module>
|
||||
SSLRandomSeed startup builtin
|
||||
SSLRandomSeed connect builtin
|
||||
</IfModule>
|
||||
|
||||
|
||||
##########CUSTOM#################
|
||||
|
||||
ServerName scas.clienti.local
|
||||
Listen 80
|
||||
Listen 443
|
||||
|
||||
# Load necessary modules
|
||||
LoadModule proxy_module modules/mod_proxy.so
|
||||
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
||||
|
||||
|
||||
<IfModule brotli_module>
|
||||
# Compress text, HTML, JavaScript, CSS, XML
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/plain
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/html
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/xml
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/css
|
||||
AddOutputFilterByType BROTLI_COMPRESS application/xml
|
||||
AddOutputFilterByType BROTLI_COMPRESS application/xhtml+xml
|
||||
AddOutputFilterByType BROTLI_COMPRESS application/rss+xml
|
||||
AddOutputFilterByType BROTLI_COMPRESS application/javascript
|
||||
AddOutputFilterByType BROTLI_COMPRESS application/x-javascript
|
||||
AddOutputFilterByType BROTLI_COMPRESS application/json
|
||||
AddOutputFilterByType BROTLI_COMPRESS font/ttf
|
||||
AddOutputFilterByType BROTLI_COMPRESS font/otf
|
||||
|
||||
# Exclude images and other binary files from compression
|
||||
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|zip|gz|exe|mp4|avi|mov)$ no-brotli
|
||||
|
||||
# Brotli compression level (0-11, 11 being the highest compression)
|
||||
BrotliCompressionQuality 6
|
||||
</IfModule>
|
||||
|
||||
#HTTP2
|
||||
Protocols h2 http/1.1
|
||||
MaxConnectionsPerChild 10000
|
||||
|
||||
# Proxy configuration
|
||||
<VirtualHost *:80>
|
||||
|
||||
ProxyRequests Off
|
||||
ProxyPass / ajp://localhost:8009/
|
||||
ProxyPassReverse / ajp://localhost:8009/
|
||||
|
||||
#Redirect permanent / https://adhocdemo.poloinformatico.it/
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
#<VirtualHost *:443>
|
||||
# UseCanonicalName Off
|
||||
# ServerAdmin "admin@poloinformatico.it"
|
||||
|
||||
#RedirectMatch 301 ^/$ /ahi/
|
||||
|
||||
# Serve index.html for root requests
|
||||
#DocumentRoot /usr/local/apache2/htdocs
|
||||
#<Directory "/usr/local/apache2/htdocs">
|
||||
# Options Indexes FollowSymLinks
|
||||
# AllowOverride None
|
||||
# Require all granted
|
||||
#</Directory>
|
||||
|
||||
# ProxyRequests Off
|
||||
# ProxyPass / ajp://localhost:8009/
|
||||
# ProxyPassReverse / ajp://localhost:8009/
|
||||
|
||||
# SSLEngine on
|
||||
# SSLProtocol all -SSLv2
|
||||
# SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
|
||||
# SSLCertificateFile /usr/local/apache2/conf/ssl/poloinformatico.it.crt
|
||||
# SSLCertificateKeyFile /usr/local/apache2/conf/ssl/poloinformatico.it.key
|
||||
# SSLCACertificateFile /usr/local/apache2/conf/ssl/poloinformatico.it.ca-bundle.crt
|
||||
#</VirtualHost>
|
||||
BIN
apache/conf/ssl/desktop.ini
Normal file
BIN
apache/conf/ssl/desktop.ini
Normal file
Binary file not shown.
BIN
apache/desktop.ini
Normal file
BIN
apache/desktop.ini
Normal file
Binary file not shown.
BIN
desktop.ini
Normal file
BIN
desktop.ini
Normal file
Binary file not shown.
29
docker-compose.yml
Normal file
29
docker-compose.yml
Normal file
@ -0,0 +1,29 @@
|
||||
services:
|
||||
tomcat:
|
||||
build:
|
||||
context: ./tomcat
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
USER_ID: 1000
|
||||
GROUP_ID: 1000
|
||||
USERNAME: polo
|
||||
GROUPNAME: polo
|
||||
container_name: tomcat
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./tomcat/tomcat_webapps:/usr/local/tomcat/webapps
|
||||
- ./tomcat/tomcat_logs:/usr/local/tomcat/logs
|
||||
environment:
|
||||
JAVA_OPTS: "-Dfile.encoding=UTF-8 -Xms1g -Xmx4g -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1g -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true"
|
||||
CATALINA_OPTS: "-XX:CompressedClassSpaceSize=512m -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -Xss2m -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2 -XX:+DisableExplicitGC"
|
||||
TZ: "Europe/Rome"
|
||||
restart: always
|
||||
apache:
|
||||
build:
|
||||
context: ./apache
|
||||
dockerfile: Dockerfile
|
||||
container_name: apache
|
||||
network_mode: host
|
||||
depends_on:
|
||||
- tomcat
|
||||
restart: always
|
||||
2
script_init
Normal file
2
script_init
Normal file
@ -0,0 +1,2 @@
|
||||
sudo mkdir -p apache/conf/ssl tomcat/tomcat_webapps tomcat/tomcat_conf tomcat/tomcat_logs tomcat/tomcat_webapps_offline
|
||||
sudo chown -R polo:polo tomcat apache
|
||||
40
solr/Dockerfile
Normal file
40
solr/Dockerfile
Normal file
@ -0,0 +1,40 @@
|
||||
FROM eclipse-temurin:17-jdk
|
||||
|
||||
# Environment variables as per the startup script
|
||||
ENV SOLR_HOME=/opt/infinitysolr
|
||||
ENV JAVA_HOME=/opt/java/openjdk
|
||||
ENV JRE_HOME=/opt/java/openjdk/jre
|
||||
ENV SOLR_JAVA_HOME=/opt/java/openjdk
|
||||
ENV SOLR_JAVA_MEM="-Xms1024m -Xmx4096m -Xss1664k"
|
||||
ENV VERSION="1.0.0"
|
||||
|
||||
# Create necessary directory for Solr
|
||||
RUN mkdir -p /opt/infinitysolr
|
||||
|
||||
# Install lsof and procps (which includes ps)
|
||||
RUN apt-get update && \
|
||||
apt-get install -y lsof procps && \
|
||||
apt-get clean
|
||||
|
||||
# Copy your customized Solr executables and scripts into the container
|
||||
COPY ./solr/ $SOLR_HOME
|
||||
|
||||
# Set executable permissions for the Solr scripts
|
||||
RUN chmod +x $SOLR_HOME/infinitysolr/infinitysolr.sh
|
||||
RUN chmod +x $SOLR_HOME/infinitysolr/version.sh
|
||||
RUN chmod +x $SOLR_HOME/bin/solr
|
||||
|
||||
# Set Solr home ownership if needed
|
||||
RUN chown -R root:root $SOLR_HOME
|
||||
|
||||
# Declare the "server" folder as a volume for persistent data storage
|
||||
VOLUME ["$SOLR_HOME/server"]
|
||||
|
||||
# Expose Solr's default port
|
||||
EXPOSE 8983
|
||||
|
||||
# Set the default entrypoint to manage the service
|
||||
ENTRYPOINT ["/opt/infinitysolr/infinitysolr/infinitysolr.sh"]
|
||||
|
||||
# To keep the container running, we can start the Solr service
|
||||
CMD ["start"]
|
||||
0
solr/LEGGIMI.txt
Normal file
0
solr/LEGGIMI.txt
Normal file
4
solr/deploy.sh
Normal file
4
solr/deploy.sh
Normal file
@ -0,0 +1,4 @@
|
||||
docker kill solr
|
||||
docker rm solr
|
||||
docker build -t solr .
|
||||
docker run --network host -v solr_data:/opt/infinitysolr/server --restart unless-stopped -d --name solr solr
|
||||
BIN
solr/desktop.ini
Normal file
BIN
solr/desktop.ini
Normal file
Binary file not shown.
3
solr/solr/VERSION.txt
Normal file
3
solr/solr/VERSION.txt
Normal file
@ -0,0 +1,3 @@
|
||||
Infinity Solr Server v. 1.4 Update 2 del 31/07/2024
|
||||
|
||||
-- Release Infinity 4.2
|
||||
BIN
solr/solr/bin/desktop.ini
Normal file
BIN
solr/solr/bin/desktop.ini
Normal file
Binary file not shown.
BIN
solr/solr/bin/init.d/desktop.ini
Normal file
BIN
solr/solr/bin/init.d/desktop.ini
Normal file
Binary file not shown.
78
solr/solr/bin/init.d/solr
Normal file
78
solr/solr/bin/init.d/solr
Normal file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
# 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.
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: solr
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Description: Controls Apache Solr as a Service
|
||||
### END INIT INFO
|
||||
|
||||
# Example of a very simple *nix init script that delegates commands to the bin/solr script
|
||||
# Typical usage is to do:
|
||||
#
|
||||
# cp bin/init.d/solr /etc/init.d/solr
|
||||
# chmod 755 /etc/init.d/solr
|
||||
# chown root:root /etc/init.d/solr
|
||||
# update-rc.d solr defaults
|
||||
# update-rc.d solr enable
|
||||
|
||||
# Where you extracted the Solr distribution bundle
|
||||
SOLR_INSTALL_DIR="/opt/solr"
|
||||
|
||||
if [ ! -d "$SOLR_INSTALL_DIR" ]; then
|
||||
echo "$SOLR_INSTALL_DIR not found! Please check the SOLR_INSTALL_DIR setting in your $0 script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Path to an include file that defines environment specific settings to override default
|
||||
# variables used by the bin/solr script. It's highly recommended to define this script so
|
||||
# that you can keep the Solr binary files separated from live files (pid, logs, index data, etc)
|
||||
# see bin/solr.in.sh for an example
|
||||
SOLR_ENV="/etc/default/solr.in.sh"
|
||||
|
||||
if [ ! -f "$SOLR_ENV" ]; then
|
||||
echo "$SOLR_ENV not found! Please check the SOLR_ENV setting in your $0 script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Specify the user to run Solr as; if not set, then Solr will run as root.
|
||||
# Running Solr as root is not recommended for production environments
|
||||
RUNAS="solr"
|
||||
|
||||
# verify the specified run as user exists
|
||||
runas_uid="`id -u "$RUNAS"`"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "User $RUNAS not found! Please create the $RUNAS user before running this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart|status)
|
||||
SOLR_CMD="$1"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit
|
||||
esac
|
||||
|
||||
if [ -n "$RUNAS" ]; then
|
||||
su -c "SOLR_INCLUDE=\"$SOLR_ENV\" \"$SOLR_INSTALL_DIR/bin/solr\" $SOLR_CMD" - "$RUNAS"
|
||||
else
|
||||
SOLR_INCLUDE="$SOLR_ENV" "$SOLR_INSTALL_DIR/bin/solr" "$SOLR_CMD"
|
||||
fi
|
||||
370
solr/solr/bin/install_solr_service.sh
Normal file
370
solr/solr/bin/install_solr_service.sh
Normal file
@ -0,0 +1,370 @@
|
||||
#!/usr/bin/env bash
|
||||
# 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.
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo -e "\nERROR: This script must be run as root\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_usage() {
|
||||
ERROR_MSG="$1"
|
||||
|
||||
if [ "$ERROR_MSG" != "" ]; then
|
||||
echo -e "\nERROR: $ERROR_MSG\n" 1>&2
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Usage: install_solr_service.sh <path_to_solr_distribution_archive> [OPTIONS]"
|
||||
echo ""
|
||||
echo " The first argument to the script must be a path to a Solr distribution archive, such as solr-5.0.0.tgz"
|
||||
echo " (only .tgz or .zip are supported formats for the archive)"
|
||||
echo ""
|
||||
echo " Supported OPTIONS include:"
|
||||
echo ""
|
||||
echo " -d Directory for live / writable Solr files, such as logs, pid files, and index data; defaults to /var/solr"
|
||||
echo ""
|
||||
echo " -i Directory to extract the Solr installation archive; defaults to /opt/"
|
||||
echo " The specified path must exist prior to using this script."
|
||||
echo ""
|
||||
echo " -p Port Solr should bind to; default is 8983"
|
||||
echo ""
|
||||
echo " -s Service name; defaults to solr"
|
||||
echo ""
|
||||
echo " -u User to own the Solr files and run the Solr process as; defaults to solr"
|
||||
echo " This script will create the specified user account if it does not exist."
|
||||
echo ""
|
||||
echo " -f Upgrade Solr. Overwrite symlink and init script of previous installation."
|
||||
echo ""
|
||||
echo " -n Do not start Solr service after install, and do not abort on missing Java"
|
||||
echo ""
|
||||
echo " NOTE: Must be run as the root user"
|
||||
echo ""
|
||||
} # end print_usage
|
||||
|
||||
print_error() {
|
||||
echo $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Locate *NIX distribution by looking for match from various detection strategies
|
||||
# We start with /etc/os-release, as this will also work for Docker containers
|
||||
for command in "grep -E \"^NAME=\" /etc/os-release" \
|
||||
"lsb_release -i" \
|
||||
"cat /proc/version" \
|
||||
"uname -a" ; do
|
||||
distro_string=$(eval $command 2>/dev/null)
|
||||
unset distro
|
||||
if [[ ${distro_string,,} == *"debian"* ]]; then
|
||||
distro=Debian
|
||||
elif [[ ${distro_string,,} == *"red hat"* ]]; then
|
||||
distro=RedHat
|
||||
elif [[ ${distro_string,,} == *"centos"* ]]; then
|
||||
distro=CentOS
|
||||
elif [[ ${distro_string,,} == *"ubuntu"* ]]; then
|
||||
distro=Ubuntu
|
||||
elif [[ ${distro_string,,} == *"suse"* ]]; then
|
||||
distro=SUSE
|
||||
elif [[ ${distro_string,,} == *"darwin"* ]]; then
|
||||
echo "Sorry, this script does not support macOS. You'll need to setup Solr as a service manually using the documentation provided in the Solr Reference Guide."
|
||||
echo "You could also try installing via Homebrew (http://brew.sh/), e.g. brew install solr"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $distro ]] ; then break ; fi
|
||||
done
|
||||
if [[ ! $distro ]] ; then
|
||||
echo -e "\nERROR: Unable to auto-detect your *NIX distribution!\nYou'll need to setup Solr as a service manually using the documentation provided in the Solr Reference Guide.\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
print_usage "Must specify the path to the Solr installation archive, such as solr-5.0.0.tgz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOLR_ARCHIVE=$1
|
||||
if [ ! -f "$SOLR_ARCHIVE" ]; then
|
||||
print_usage "Specified Solr installation archive $SOLR_ARCHIVE not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# strip off path info
|
||||
SOLR_INSTALL_FILE=${SOLR_ARCHIVE##*/}
|
||||
is_tar=true
|
||||
if [ ${SOLR_INSTALL_FILE: -4} == ".tgz" ]; then
|
||||
SOLR_DIR=${SOLR_INSTALL_FILE%.tgz}
|
||||
elif [ ${SOLR_INSTALL_FILE: -4} == ".zip" ]; then
|
||||
SOLR_DIR=${SOLR_INSTALL_FILE%.zip}
|
||||
is_tar=false
|
||||
else
|
||||
print_usage "Solr installation archive $SOLR_ARCHIVE is invalid, expected a .tgz or .zip file!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOLR_START=true
|
||||
if [ $# -gt 1 ]; then
|
||||
shift
|
||||
while true; do
|
||||
case $1 in
|
||||
-i)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Directory path is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_EXTRACT_DIR=$2
|
||||
shift 2
|
||||
;;
|
||||
-d)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Directory path is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_VAR_DIR="$2"
|
||||
shift 2
|
||||
;;
|
||||
-u)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Username is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_USER="$2"
|
||||
shift 2
|
||||
;;
|
||||
-s)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Service name is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_SERVICE="$2"
|
||||
shift 2
|
||||
;;
|
||||
-p)
|
||||
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
|
||||
print_usage "Port is required when using the $1 option!"
|
||||
exit 1
|
||||
fi
|
||||
SOLR_PORT="$2"
|
||||
shift 2
|
||||
;;
|
||||
-f)
|
||||
SOLR_UPGRADE="YES"
|
||||
shift 1
|
||||
;;
|
||||
-n)
|
||||
SOLR_START=false
|
||||
shift 1
|
||||
;;
|
||||
-help|-usage)
|
||||
print_usage ""
|
||||
exit 0
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
if [ "$1" != "" ]; then
|
||||
print_usage "Unrecognized or misplaced argument: $1!"
|
||||
exit 1
|
||||
else
|
||||
break # out-of-args, stop looping
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
# Test for availability of needed tools
|
||||
if [[ $is_tar ]] ; then
|
||||
tar --version &>/dev/null || print_error "Script requires the 'tar' command"
|
||||
else
|
||||
unzip -hh &>/dev/null || print_error "Script requires the 'unzip' command"
|
||||
fi
|
||||
if [[ $SOLR_START == "true" ]] ; then
|
||||
service --version &>/dev/null || service --help &>/dev/null || print_error "Script requires the 'service' command"
|
||||
java -version &>/dev/null || print_error "Solr requires java, please install or set JAVA_HOME properly"
|
||||
fi
|
||||
lsof -h &>/dev/null || echo "We recommend installing the 'lsof' command for more stable start/stop of Solr"
|
||||
|
||||
|
||||
if [ -z "$SOLR_EXTRACT_DIR" ]; then
|
||||
SOLR_EXTRACT_DIR=/opt
|
||||
fi
|
||||
|
||||
if [ ! -d "$SOLR_EXTRACT_DIR" ]; then
|
||||
print_usage "Installation directory $SOLR_EXTRACT_DIR not found! Please create it before running this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_SERVICE" ]; then
|
||||
SOLR_SERVICE=solr
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_VAR_DIR" ]; then
|
||||
SOLR_VAR_DIR="/var/$SOLR_SERVICE"
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_USER" ]; then
|
||||
SOLR_USER=solr
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_PORT" ]; then
|
||||
SOLR_PORT=8983
|
||||
fi
|
||||
|
||||
if [ -z "$SOLR_UPGRADE" ]; then
|
||||
SOLR_UPGRADE=NO
|
||||
fi
|
||||
|
||||
if [ ! "$SOLR_UPGRADE" = "YES" ]; then
|
||||
if [ -f "/etc/init.d/$SOLR_SERVICE" ]; then
|
||||
print_usage "/etc/init.d/$SOLR_SERVICE already exists! Perhaps Solr is already setup as a service on this host? To upgrade Solr use the -f option."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then
|
||||
print_usage "$SOLR_EXTRACT_DIR/$SOLR_SERVICE already exists! Please move this directory / link or choose a different service name using the -s option."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# stop running instance
|
||||
if [ -f "/etc/init.d/$SOLR_SERVICE" ]; then
|
||||
echo -e "\nStopping Solr instance if exists ...\n"
|
||||
service "$SOLR_SERVICE" stop
|
||||
fi
|
||||
|
||||
# create user if not exists
|
||||
solr_uid="`id -u "$SOLR_USER"`"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Creating new user: $SOLR_USER"
|
||||
if [ "$distro" == "RedHat" ] || [ "$distro" == "CentOS" ] ; then
|
||||
adduser --system -U -m --home-dir "$SOLR_VAR_DIR" "$SOLR_USER"
|
||||
elif [ "$distro" == "SUSE" ]; then
|
||||
useradd --system -U -m --home-dir "$SOLR_VAR_DIR" "$SOLR_USER"
|
||||
else
|
||||
adduser --system --shell /bin/bash --group --disabled-password --home "$SOLR_VAR_DIR" "$SOLR_USER"
|
||||
fi
|
||||
fi
|
||||
|
||||
# extract
|
||||
SOLR_INSTALL_DIR="$SOLR_EXTRACT_DIR/$SOLR_DIR"
|
||||
if [ ! -d "$SOLR_INSTALL_DIR" ]; then
|
||||
|
||||
echo -e "\nExtracting $SOLR_ARCHIVE to $SOLR_EXTRACT_DIR\n"
|
||||
|
||||
if $is_tar ; then
|
||||
tar zxf "$SOLR_ARCHIVE" -C "$SOLR_EXTRACT_DIR"
|
||||
else
|
||||
unzip -q "$SOLR_ARCHIVE" -d "$SOLR_EXTRACT_DIR"
|
||||
fi
|
||||
|
||||
if [ ! -d "$SOLR_INSTALL_DIR" ]; then
|
||||
echo -e "\nERROR: Expected directory $SOLR_INSTALL_DIR not found after extracting $SOLR_ARCHIVE ... script fails.\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chown -R root: "$SOLR_INSTALL_DIR"
|
||||
find "$SOLR_INSTALL_DIR" -type d -print0 | xargs -0 chmod 0755
|
||||
find "$SOLR_INSTALL_DIR" -type f -print0 | xargs -0 chmod 0644
|
||||
chmod -R 0755 "$SOLR_INSTALL_DIR/bin"
|
||||
else
|
||||
echo -e "\nWARNING: $SOLR_INSTALL_DIR already exists! Skipping extract ...\n"
|
||||
fi
|
||||
|
||||
# create a symlink for easier scripting
|
||||
if [ -h "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then
|
||||
echo -e "\nRemoving old symlink $SOLR_EXTRACT_DIR/$SOLR_SERVICE ...\n"
|
||||
rm "$SOLR_EXTRACT_DIR/$SOLR_SERVICE"
|
||||
fi
|
||||
if [ -e "$SOLR_EXTRACT_DIR/$SOLR_SERVICE" ]; then
|
||||
echo -e "\nWARNING: $SOLR_EXTRACT_DIR/$SOLR_SERVICE is not symlink! Skipping symlink update ...\n"
|
||||
else
|
||||
echo -e "\nInstalling symlink $SOLR_EXTRACT_DIR/$SOLR_SERVICE -> $SOLR_INSTALL_DIR ...\n"
|
||||
ln -s "$SOLR_INSTALL_DIR" "$SOLR_EXTRACT_DIR/$SOLR_SERVICE"
|
||||
fi
|
||||
|
||||
# install init.d script
|
||||
echo -e "\nInstalling /etc/init.d/$SOLR_SERVICE script ...\n"
|
||||
cp "$SOLR_INSTALL_DIR/bin/init.d/solr" "/etc/init.d/$SOLR_SERVICE"
|
||||
chmod 0744 "/etc/init.d/$SOLR_SERVICE"
|
||||
chown root: "/etc/init.d/$SOLR_SERVICE"
|
||||
# do some basic variable substitution on the init.d script
|
||||
sed_expr1="s#SOLR_INSTALL_DIR=.*#SOLR_INSTALL_DIR=\"$SOLR_EXTRACT_DIR/$SOLR_SERVICE\"#"
|
||||
sed_expr2="s#SOLR_ENV=.*#SOLR_ENV=\"/etc/default/$SOLR_SERVICE.in.sh\"#"
|
||||
sed_expr3="s#RUNAS=.*#RUNAS=\"$SOLR_USER\"#"
|
||||
sed_expr4="s#Provides:.*#Provides: $SOLR_SERVICE#"
|
||||
sed -i -e "$sed_expr1" -e "$sed_expr2" -e "$sed_expr3" -e "$sed_expr4" "/etc/init.d/$SOLR_SERVICE"
|
||||
|
||||
# install/move configuration
|
||||
if [ ! -d /etc/default ]; then
|
||||
mkdir /etc/default
|
||||
chown root: /etc/default
|
||||
chmod 0755 /etc/default
|
||||
fi
|
||||
if [ -f "$SOLR_VAR_DIR/solr.in.sh" ]; then
|
||||
echo -e "\nMoving existing $SOLR_VAR_DIR/solr.in.sh to /etc/default/$SOLR_SERVICE.in.sh ...\n"
|
||||
mv "$SOLR_VAR_DIR/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
elif [ -f "/etc/default/$SOLR_SERVICE.in.sh" ]; then
|
||||
echo -e "\n/etc/default/$SOLR_SERVICE.in.sh already exist. Skipping install ...\n"
|
||||
else
|
||||
echo -e "\nInstalling /etc/default/$SOLR_SERVICE.in.sh ...\n"
|
||||
cp "$SOLR_INSTALL_DIR/bin/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
mv "$SOLR_INSTALL_DIR/bin/solr.in.sh" "$SOLR_INSTALL_DIR/bin/solr.in.sh.orig"
|
||||
mv "$SOLR_INSTALL_DIR/bin/solr.in.cmd" "$SOLR_INSTALL_DIR/bin/solr.in.cmd.orig"
|
||||
echo "SOLR_PID_DIR=\"$SOLR_VAR_DIR\"
|
||||
SOLR_HOME=\"$SOLR_VAR_DIR/data\"
|
||||
LOG4J_PROPS=\"$SOLR_VAR_DIR/log4j2.xml\"
|
||||
SOLR_LOGS_DIR=\"$SOLR_VAR_DIR/logs\"
|
||||
SOLR_PORT=\"$SOLR_PORT\"
|
||||
" >> "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
fi
|
||||
chown root:${SOLR_USER} "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
chmod 0640 "/etc/default/$SOLR_SERVICE.in.sh"
|
||||
|
||||
# install data directories and files
|
||||
mkdir -p "$SOLR_VAR_DIR/data"
|
||||
mkdir -p "$SOLR_VAR_DIR/logs"
|
||||
if [ -f "$SOLR_VAR_DIR/data/solr.xml" ]; then
|
||||
echo -e "\n$SOLR_VAR_DIR/data/solr.xml already exists. Skipping install ...\n"
|
||||
else
|
||||
cp "$SOLR_INSTALL_DIR/server/solr/"{solr.xml,zoo.cfg} "$SOLR_VAR_DIR/data/"
|
||||
fi
|
||||
if [ -f "$SOLR_VAR_DIR/log4j2.xml" ]; then
|
||||
echo -e "\n$SOLR_VAR_DIR/log4j2.xml already exists. Skipping install ...\n"
|
||||
else
|
||||
cp "$SOLR_INSTALL_DIR/server/resources/log4j2.xml" "$SOLR_VAR_DIR/log4j2.xml"
|
||||
fi
|
||||
chown -R "$SOLR_USER:" "$SOLR_VAR_DIR"
|
||||
find "$SOLR_VAR_DIR" -type d -print0 | xargs -0 chmod 0750
|
||||
find "$SOLR_VAR_DIR" -type f -print0 | xargs -0 chmod 0640
|
||||
|
||||
# configure autostart of service
|
||||
if [[ "$distro" == "RedHat" || "$distro" == "CentOS" || "$distro" == "SUSE" ]]; then
|
||||
chkconfig "$SOLR_SERVICE" on
|
||||
else
|
||||
update-rc.d "$SOLR_SERVICE" defaults
|
||||
fi
|
||||
echo "Service $SOLR_SERVICE installed."
|
||||
echo "Customize Solr startup configuration in /etc/default/$SOLR_SERVICE.in.sh"
|
||||
|
||||
# start service
|
||||
if [[ $SOLR_START == "true" ]] ; then
|
||||
service "$SOLR_SERVICE" start
|
||||
sleep 5
|
||||
service "$SOLR_SERVICE" status
|
||||
else
|
||||
echo "Not starting Solr service (option -n given). Start manually with 'service $SOLR_SERVICE start'"
|
||||
fi
|
||||
36
solr/solr/bin/oom_solr.sh
Normal file
36
solr/solr/bin/oom_solr.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
SOLR_PORT=$1
|
||||
SOLR_LOGS_DIR=$2
|
||||
SOLR_PID=$(ps auxww | grep start.jar | grep $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r)
|
||||
if [ -z "$SOLR_PID" ]; then
|
||||
echo "Couldn't find Solr process running on port $SOLR_PORT!"
|
||||
exit
|
||||
fi
|
||||
NOW=$(date +"%F_%H_%M_%S")
|
||||
(
|
||||
echo "Running OOM killer script for process $SOLR_PID for Solr on port $SOLR_PORT"
|
||||
if [[ "$SOLR_PID" == 1 ]]; then
|
||||
# Under Docker when running as pid 1, SIGKILL is ignored, so use the default SIGTERM
|
||||
kill "$SOLR_PID"
|
||||
else
|
||||
# On a real system, or in a container with tini or similar, it is safe to SIGKILL
|
||||
kill -9 "$SOLR_PID"
|
||||
fi
|
||||
echo "Killed process $SOLR_PID"
|
||||
) | tee $SOLR_LOGS_DIR/solr_oom_killer-$SOLR_PORT-$NOW.log
|
||||
239
solr/solr/bin/post
Normal file
239
solr/solr/bin/post
Normal file
@ -0,0 +1,239 @@
|
||||
#!/usr/bin/env bash
|
||||
# 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.
|
||||
|
||||
# ====== Common code copied/adapted from bin/solr (TODO: centralize/share this kind of thing across bin/solr, etc)
|
||||
|
||||
THIS_SCRIPT="$0"
|
||||
|
||||
# Resolve symlinks to this script
|
||||
while [ -h "$THIS_SCRIPT" ] ; do
|
||||
ls=`ls -ld "$THIS_SCRIPT"`
|
||||
# Drop everything prior to ->
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
THIS_SCRIPT="$link"
|
||||
else
|
||||
THIS_SCRIPT=`dirname "$THIS_SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
SOLR_TIP=`dirname "$THIS_SCRIPT"`/..
|
||||
SOLR_TIP=`cd "$SOLR_TIP"; pwd`
|
||||
|
||||
if [ -n "$SOLR_JAVA_HOME" ]; then
|
||||
JAVA="$SOLR_JAVA_HOME/bin/java"
|
||||
elif [ -n "$JAVA_HOME" ]; then
|
||||
for java in "$JAVA_HOME"/bin/amd64/java "$JAVA_HOME"/bin/java; do
|
||||
if [ -x "$java" ]; then
|
||||
JAVA="$java"
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
JAVA=java
|
||||
fi
|
||||
|
||||
# test that Java exists and is executable on this server
|
||||
"$JAVA" -version >/dev/null 2>&1 || { echo >&2 "Java is required to run this tool! Please install Java 8 or greater before running this script."; exit 1; }
|
||||
|
||||
|
||||
# ===== post specific code
|
||||
|
||||
TOOL_JAR=("$SOLR_TIP/dist"/solr-core-*.jar)
|
||||
|
||||
function print_usage() {
|
||||
echo ""
|
||||
echo 'Usage: post -c <collection> [OPTIONS] <files|directories|urls|-d ["...",...]>'
|
||||
echo " or post -help"
|
||||
echo ""
|
||||
echo " collection name defaults to DEFAULT_SOLR_COLLECTION if not specified"
|
||||
echo ""
|
||||
echo "OPTIONS"
|
||||
echo "======="
|
||||
echo " Solr options:"
|
||||
echo " -url <base Solr update URL> (overrides collection, host, and port)"
|
||||
echo " -host <host> (default: localhost)"
|
||||
echo " -p or -port <port> (default: 8983)"
|
||||
echo " -commit yes|no (default: yes)"
|
||||
echo " -u or -user <user:pass> (sets BasicAuth credentials)"
|
||||
# optimize intentionally omitted, but can be used as '-optimize yes' (default: no)
|
||||
echo ""
|
||||
echo " Web crawl options:"
|
||||
echo " -recursive <depth> (default: 1)"
|
||||
echo " -delay <seconds> (default: 10)"
|
||||
echo ""
|
||||
echo " Directory crawl options:"
|
||||
echo " -delay <seconds> (default: 0)"
|
||||
echo ""
|
||||
echo " stdin/args options:"
|
||||
echo " -type <content/type> (default: application/xml)"
|
||||
echo ""
|
||||
echo " Other options:"
|
||||
echo " -filetypes <type>[,<type>,...] (default: xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log)"
|
||||
echo " -params \"<key>=<value>[&<key>=<value>...]\" (values must be URL-encoded; these pass through to Solr update request)"
|
||||
echo " -out yes|no (default: no; yes outputs Solr response to console)"
|
||||
echo " -format solr (sends application/json content as Solr commands to /update instead of /update/json/docs)"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo ""
|
||||
echo "* JSON file: $THIS_SCRIPT -c wizbang events.json"
|
||||
echo "* XML files: $THIS_SCRIPT -c records article*.xml"
|
||||
echo "* CSV file: $THIS_SCRIPT -c signals LATEST-signals.csv"
|
||||
echo "* Directory of files: $THIS_SCRIPT -c myfiles ~/Documents"
|
||||
echo "* Web crawl: $THIS_SCRIPT -c gettingstarted http://lucene.apache.org/solr -recursive 1 -delay 1"
|
||||
echo "* Standard input (stdin): echo '{"commit": {}}' | $THIS_SCRIPT -c my_collection -type application/json -out yes -d"
|
||||
echo "* Data as string: $THIS_SCRIPT -c signals -type text/csv -out yes -d $'id,value\n1,0.47'"
|
||||
echo ""
|
||||
} # end print_usage
|
||||
|
||||
if [[ $# -eq 1 && ("$1" == "-help" || "$1" == "-h" || "$1" == "-usage") ]]; then
|
||||
print_usage
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
COLLECTION="$DEFAULT_SOLR_COLLECTION"
|
||||
PROPS=('-Dauto=yes')
|
||||
RECURSIVE=""
|
||||
FILES=()
|
||||
URLS=()
|
||||
ARGS=()
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
# TODO: natively handle the optional parameters to SPT
|
||||
# but for now they can be specified as bin/post -c collection-name delay=5 http://lucidworks.com
|
||||
|
||||
if [[ -d "$1" ]]; then
|
||||
# Directory
|
||||
# echo "$1: DIRECTORY"
|
||||
RECURSIVE=yes
|
||||
FILES+=("$1")
|
||||
elif [[ -f "$1" ]]; then
|
||||
# File
|
||||
# echo "$1: FILE"
|
||||
FILES+=("$1")
|
||||
elif [[ "$1" == http* ]]; then
|
||||
# URL
|
||||
# echo "$1: URL"
|
||||
URLS+=("$1")
|
||||
else
|
||||
if [[ "$1" == -* ]]; then
|
||||
if [[ "$1" == "-c" ]]; then
|
||||
# Special case, pull out collection name
|
||||
shift
|
||||
COLLECTION="$1"
|
||||
elif [[ "$1" == "-p" ]]; then
|
||||
# -p alias for -port for convenience and compatibility with `bin/solr start`
|
||||
shift
|
||||
PROPS+=("-Dport=$1")
|
||||
elif [[ ("$1" == "-d" || "$1" == "--data" || "$1" == "-") ]]; then
|
||||
if [[ ! -t 0 ]]; then
|
||||
MODE="stdin"
|
||||
else
|
||||
# when no stdin exists and -d specified, the rest of the arguments
|
||||
# are assumed to be strings to post as-is
|
||||
MODE="args"
|
||||
shift
|
||||
if [[ $# -gt 0 ]]; then
|
||||
ARGS=("$@")
|
||||
shift $#
|
||||
else
|
||||
# SPT needs a valid args string, useful for 'bin/post -c foo -d' to force a commit
|
||||
ARGS+=("<add/>")
|
||||
fi
|
||||
fi
|
||||
elif [[ ("$1" == "-u" || "$1" == "-user") ]]; then
|
||||
shift
|
||||
PROPS+=("-Dbasicauth=$1")
|
||||
else
|
||||
if [[ "$1" == -D* ]] ; then
|
||||
PROPS+=("$1")
|
||||
if [[ "${1:2:4}" == "url=" ]]; then
|
||||
SOLR_URL=${1:6}
|
||||
fi
|
||||
else
|
||||
key="${1:1}"
|
||||
shift
|
||||
# echo "$1: PROP"
|
||||
PROPS+=("-D$key=$1")
|
||||
if [[ "$key" == "url" ]]; then
|
||||
SOLR_URL=$1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -e "\nUnrecognized argument: $1\n"
|
||||
echo -e "If this was intended to be a data file, it does not exist relative to $PWD\n"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
# Check for errors
|
||||
if [[ $COLLECTION == "" && $SOLR_URL == "" ]]; then
|
||||
echo -e "\nCollection or URL must be specified. Use -c <collection name> or set DEFAULT_SOLR_COLLECTION in your environment, or use -url instead.\n"
|
||||
echo -e "See '$THIS_SCRIPT -h' for usage instructions.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Unsupported: bin/post -c foo
|
||||
if [[ ${#FILES[@]} == 0 && ${#URLS[@]} == 0 && $MODE != "stdin" && $MODE != "args" ]]; then
|
||||
echo -e "\nNo files, directories, URLs, -d strings, or stdin were specified.\n"
|
||||
echo -e "See '$THIS_SCRIPT -h' for usage instructions.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# SPT does not support mixing different data mode types, just files, just URLs, just stdin, or just argument strings.
|
||||
# The following are unsupported constructs:
|
||||
# bin/post -c foo existing_file.csv http://example.com
|
||||
# echo '<xml.../>' | bin/post -c foo existing_file.csv
|
||||
# bin/post -c foo existing_file.csv -d 'anything'
|
||||
if [[ (${#FILES[@]} != 0 && ${#URLS[@]} != 0 && $MODE != "stdin" && $MODE != "args")
|
||||
|| ((${#FILES[@]} != 0 || ${#URLS[@]} != 0) && ($MODE == "stdin" || $MODE == "args")) ]]; then
|
||||
echo -e "\nCombining files/directories, URLs, stdin, or args is not supported. Post them separately.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PARAMS=""
|
||||
|
||||
# TODO: let's simplify this
|
||||
if [[ $MODE != "stdin" && $MODE != "args" ]]; then
|
||||
if [[ $FILES != "" ]]; then
|
||||
MODE="files"
|
||||
PARAMS=("${FILES[@]}")
|
||||
fi
|
||||
|
||||
if [[ $URLS != "" ]]; then
|
||||
MODE="web"
|
||||
PARAMS=("${URLS[@]}")
|
||||
fi
|
||||
else
|
||||
PARAMS=("${ARGS[@]}")
|
||||
fi
|
||||
|
||||
PROPS+=("-Dc=$COLLECTION" "-Ddata=$MODE")
|
||||
if [[ -n "$RECURSIVE" ]]; then
|
||||
PROPS+=('-Drecursive=yes')
|
||||
fi
|
||||
|
||||
echo "$JAVA" -classpath "${TOOL_JAR[0]}" "${PROPS[@]}" org.apache.solr.util.SimplePostTool "${PARAMS[@]}"
|
||||
"$JAVA" -classpath "${TOOL_JAR[0]}" "${PROPS[@]}" org.apache.solr.util.SimplePostTool "${PARAMS[@]}"
|
||||
|
||||
# post smoker:
|
||||
# bin/post -c signals -out yes -type application/json -d '[{"id": 2, "val": 0.47}]'
|
||||
# bin/post -c signals -out yes -params "wt=json" -d '<add><doc><field name="id">1</field></doc></add>'
|
||||
33
solr/solr/bin/postlogs
Normal file
33
solr/solr/bin/postlogs
Normal file
@ -0,0 +1,33 @@
|
||||
# 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.
|
||||
|
||||
############################################################################################
|
||||
#
|
||||
# A command line tool for indexing Solr logs in the out-of-the-box log format.
|
||||
#
|
||||
# First build the Solr distribution. Then run postlogs from inside the Solr distribution
|
||||
# home directory as described below:
|
||||
#
|
||||
# parameters:
|
||||
#
|
||||
# -- baseUrl: Example http://localhost:8983/solr/collection1
|
||||
# -- rootDir: All files found at or below the root will be indexed
|
||||
#
|
||||
# Sample syntax: ./bin/postlogs http://localhost:8983/solr/collection1 /user/foo/logs");
|
||||
#
|
||||
#
|
||||
############################################################################################
|
||||
|
||||
java -classpath dist/*:dist/solrj-lib/*: org.apache.solr.util.SolrLogPostTool $1 $2
|
||||
2369
solr/solr/bin/solr
Normal file
2369
solr/solr/bin/solr
Normal file
File diff suppressed because it is too large
Load Diff
1
solr/solr/bin/solr-8983.port
Normal file
1
solr/solr/bin/solr-8983.port
Normal file
@ -0,0 +1 @@
|
||||
8983
|
||||
2077
solr/solr/bin/solr.cmd
Normal file
2077
solr/solr/bin/solr.cmd
Normal file
File diff suppressed because it is too large
Load Diff
215
solr/solr/bin/solr.in.cmd
Normal file
215
solr/solr/bin/solr.in.cmd
Normal file
@ -0,0 +1,215 @@
|
||||
@REM
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@REM contributor license agreements. See the NOTICE file distributed with
|
||||
@REM this work for additional information regarding copyright ownership.
|
||||
@REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
@REM (the "License"); you may not use this file except in compliance with
|
||||
@REM the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing, software
|
||||
@REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@REM See the License for the specific language governing permissions and
|
||||
@REM limitations under the License.
|
||||
|
||||
@echo off
|
||||
|
||||
REM Settings here will override settings in existing env vars or in bin/solr. The default shipped state
|
||||
REM of this file is completely commented.
|
||||
|
||||
REM By default the script will use JAVA_HOME to determine which java
|
||||
REM to use, but you can set a specific path for Solr to use without
|
||||
REM affecting other Java applications on your server/workstation.
|
||||
REM set SOLR_JAVA_HOME=
|
||||
|
||||
REM Increase Java Min/Max Heap as needed to support your indexing / query needs
|
||||
REM set SOLR_JAVA_MEM=-Xms512m -Xmx512m
|
||||
|
||||
REM Configure verbose GC logging:
|
||||
REM For Java 8: if this is set, additional params will be added to specify the log file & rotation
|
||||
REM For Java 9 or higher: GC_LOG_OPTS is currently not supported unless you are using OpenJ9. Otherwise if you set it, the startup script will exit with failure.
|
||||
REM set GC_LOG_OPTS=-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime
|
||||
|
||||
REM Various GC settings have shown to work well for a number of common Solr workloads.
|
||||
REM See solr.cmd GC_TUNE for the default list.
|
||||
REM set GC_TUNE=-XX:+ExplicitGCInvokesConcurrent
|
||||
REM set GC_TUNE=-XX:SurvivorRatio=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:TargetSurvivorRatio=90
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:MaxTenuringThreshold=8
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+UseConcMarkSweepGC
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:ConcGCThreads=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:ParallelGCThreads=4
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+CMSScavengeBeforeRemark
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:PretenureSizeThreshold=64m
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+UseCMSInitiatingOccupancyOnly
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:CMSInitiatingOccupancyFraction=50
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:CMSMaxAbortablePrecleanTime=6000
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+CMSParallelRemarkEnabled
|
||||
REM set GC_TUNE=%GC_TUNE% -XX:+ParallelRefProcEnabled etc.
|
||||
|
||||
REM Set the ZooKeeper connection string if using an external ZooKeeper ensemble
|
||||
REM e.g. host1:2181,host2:2181/chroot
|
||||
REM Leave empty if not using SolrCloud
|
||||
REM set ZK_HOST=
|
||||
|
||||
REM Set to true if your ZK host has a chroot path, and you want to create it automatically.
|
||||
REM set ZK_CREATE_CHROOT=true
|
||||
|
||||
REM Set the ZooKeeper client timeout (for SolrCloud mode)
|
||||
REM set ZK_CLIENT_TIMEOUT=30000
|
||||
|
||||
REM By default the start script uses "localhost"; override the hostname here
|
||||
REM for production SolrCloud environments to control the hostname exposed to cluster state
|
||||
REM set SOLR_HOST=192.168.1.1
|
||||
|
||||
REM By default Solr will try to connect to Zookeeper with 30 seconds in timeout; override the timeout if needed
|
||||
REM set SOLR_WAIT_FOR_ZK=30
|
||||
|
||||
REM By default the start script uses UTC; override the timezone if needed
|
||||
REM set SOLR_TIMEZONE=UTC
|
||||
|
||||
REM Set to true to activate the JMX RMI connector to allow remote JMX client applications
|
||||
REM to monitor the JVM hosting Solr; set to "false" to disable that behavior
|
||||
REM (false is recommended in production environments)
|
||||
REM set ENABLE_REMOTE_JMX_OPTS=false
|
||||
|
||||
REM The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
|
||||
REM set RMI_PORT=18983
|
||||
|
||||
REM Anything you add to the SOLR_OPTS variable will be included in the java
|
||||
REM start command line as-is, in ADDITION to other options. If you specify the
|
||||
REM -a option on start script, those options will be appended as well. Examples:
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoSoftCommit.maxTime=3000
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoCommit.maxTime=60000
|
||||
|
||||
REM Path to a directory for Solr to store cores and their data. By default, Solr will use server\solr
|
||||
REM If solr.xml is not stored in ZooKeeper, this directory needs to contain solr.xml
|
||||
REM set SOLR_HOME=
|
||||
|
||||
REM Path to a directory that Solr will use as root for data folders for each core.
|
||||
REM If not set, defaults to <instance_dir>/data. Overridable per core through 'dataDir' core property
|
||||
REM set SOLR_DATA_HOME=
|
||||
|
||||
REM Changes the logging level. Valid values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Default is INFO
|
||||
REM This is an alternative to changing the rootLogger in log4j2.xml
|
||||
REM set SOLR_LOG_LEVEL=INFO
|
||||
|
||||
REM Location where Solr should write logs to. Absolute or relative to solr start dir
|
||||
REM set SOLR_LOGS_DIR=logs
|
||||
|
||||
REM Enables log rotation before starting Solr. Setting SOLR_LOG_PRESTART_ROTATION=true will let Solr take care of pre
|
||||
REM start rotation of logs. This is false by default as log4j2 handles this for us. If you choose to use another log
|
||||
REM framework that cannot do startup rotation, you may want to enable this to let Solr rotate logs on startup.
|
||||
REM set SOLR_LOG_PRESTART_ROTATION=false
|
||||
|
||||
REM Enables jetty request log for all requests
|
||||
REM set SOLR_REQUESTLOG_ENABLED=false
|
||||
|
||||
REM Set the host interface to listen on. Jetty will listen on all interfaces (0.0.0.0) by default.
|
||||
REM This must be an IPv4 ("a.b.c.d") or bracketed IPv6 ("[x::y]") address, not a hostname!
|
||||
REM set SOLR_JETTY_HOST=0.0.0.0
|
||||
|
||||
REM Sets the port Solr binds to, default is 8983
|
||||
REM set SOLR_PORT=8983
|
||||
|
||||
REM Restrict access to solr by IP address.
|
||||
REM Specify a comma-separated list of addresses or networks, for example:
|
||||
REM 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
REM set SOLR_IP_WHITELIST=
|
||||
|
||||
REM Block access to solr from specific IP addresses.
|
||||
REM Specify a comma-separated list of addresses or networks, for example:
|
||||
REM 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
REM set SOLR_IP_BLACKLIST=
|
||||
|
||||
REM Enables HTTPS. It is implictly true if you set SOLR_SSL_KEY_STORE. Use this config
|
||||
REM to enable https module with custom jetty configuration.
|
||||
REM set SOLR_SSL_ENABLED=true
|
||||
REM Uncomment to set SSL-related system properties
|
||||
REM Be sure to update the paths to the correct keystore for your environment
|
||||
REM set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.p12
|
||||
REM set SOLR_SSL_KEY_STORE_PASSWORD=secret
|
||||
REM set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.p12
|
||||
REM set SOLR_SSL_TRUST_STORE_PASSWORD=secret
|
||||
REM Require clients to authenticate
|
||||
REM set SOLR_SSL_NEED_CLIENT_AUTH=false
|
||||
REM Enable clients to authenticate (but not require)
|
||||
REM set SOLR_SSL_WANT_CLIENT_AUTH=false
|
||||
REM Verify client hostname during SSL handshake
|
||||
REM set SOLR_SSL_CLIENT_HOSTNAME_VERIFICATION=false
|
||||
REM SSL Certificates contain host/ip "peer name" information that is validated by default. Setting
|
||||
REM this to false can be useful to disable these checks when re-using a certificate on many hosts
|
||||
REM set SOLR_SSL_CHECK_PEER_NAME=true
|
||||
REM Override Key/Trust Store types if necessary
|
||||
REM set SOLR_SSL_KEY_STORE_TYPE=PKCS12
|
||||
REM set SOLR_SSL_TRUST_STORE_TYPE=PKCS12
|
||||
|
||||
REM Uncomment if you want to override previously defined SSL values for HTTP client
|
||||
REM otherwise keep them commented and the above values will automatically be set for HTTP clients
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE=
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=
|
||||
REM set SOLR_SSL_CLIENT_KEY_STORE_TYPE=
|
||||
REM set SOLR_SSL_CLIENT_TRUST_STORE_TYPE=
|
||||
|
||||
REM Sets path of Hadoop credential provider (hadoop.security.credential.provider.path property) and
|
||||
REM enables usage of credential store.
|
||||
REM Credential provider should store the following keys:
|
||||
REM * solr.jetty.keystore.password
|
||||
REM * solr.jetty.truststore.password
|
||||
REM Set the two below if you want to set specific store passwords for HTTP client
|
||||
REM * javax.net.ssl.keyStorePassword
|
||||
REM * javax.net.ssl.trustStorePassword
|
||||
REM More info: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html
|
||||
REM set SOLR_HADOOP_CREDENTIAL_PROVIDER_PATH=localjceks://file/home/solr/hadoop-credential-provider.jceks
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.ssl.credential.provider.chain=hadoop
|
||||
|
||||
REM Settings for authentication
|
||||
REM Please configure only one of SOLR_AUTHENTICATION_CLIENT_BUILDER or SOLR_AUTH_TYPE parameters
|
||||
REM set SOLR_AUTHENTICATION_CLIENT_BUILDER=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory
|
||||
REM set SOLR_AUTH_TYPE=basic
|
||||
REM set SOLR_AUTHENTICATION_OPTS=-Dbasicauth=solr:SolrRocks
|
||||
|
||||
REM Settings for ZK ACL
|
||||
REM set SOLR_ZK_CREDS_AND_ACLS=-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider ^
|
||||
REM -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider ^
|
||||
REM -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD ^
|
||||
REM -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% %SOLR_ZK_CREDS_AND_ACLS%
|
||||
|
||||
REM Jetty GZIP module enabled by default
|
||||
REM set SOLR_GZIP_ENABLED=true
|
||||
|
||||
REM When running Solr in non-cloud mode and if planning to do distributed search (using the "shards" parameter), the
|
||||
REM list of hosts needs to be whitelisted or Solr will forbid the request. The whitelist can be configured in solr.xml,
|
||||
REM or if you are using the OOTB solr.xml, can be specified using the system property "solr.shardsWhitelist". Alternatively
|
||||
REM host checking can be disabled by using the system property "solr.disable.shardsWhitelist"
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.shardsWhitelist=http://localhost:8983,http://localhost:8984
|
||||
|
||||
REM For a visual indication in the Admin UI of what type of environment this cluster is, configure
|
||||
REM a -Dsolr.environment property below. Valid values are prod, stage, test, dev, with an optional
|
||||
REM label or color, e.g. -Dsolr.environment=test,label=Functional+test,color=brown
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.environment=prod
|
||||
|
||||
REM Specifies the path to a common library directory that will be shared across all cores.
|
||||
REM Any JAR files in this directory will be added to the search path for Solr plugins.
|
||||
REM If the specified path is not absolute, it will be relative to `%SOLR_HOME%`.
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.sharedLib=/path/to/lib
|
||||
|
||||
REM Runs solr in a java security manager sandbox. This can protect against some attacks.
|
||||
REM Runtime properties are passed to the security policy file (server\etc\security.policy)
|
||||
REM You can also tweak via standard JDK files such as ~\.java.policy, see https://s.apache.org/java8policy
|
||||
REM This is experimental! It may not work at all with Hadoop/HDFS features.
|
||||
REM set SOLR_SECURITY_MANAGER_ENABLED=false
|
||||
|
||||
REM Solr is by default allowed to read and write data from/to SOLR_HOME and a few other well defined locations
|
||||
REM Sometimes it may be necessary to place a core or a backup on a different location or a different disk
|
||||
REM This parameter lets you specify file system path(s) to explicitly allow. The special value of '*' will allow any path
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.allowPaths=D:\,E:\other\path
|
||||
|
||||
REM Some previous versions of Solr use an outdated log4j dependency. If you are unable to use at least log4j version 2.15.0
|
||||
REM then enable the following setting to address CVE-2021-44228
|
||||
REM set SOLR_OPTS=%SOLR_OPTS% -Dlog4j2.formatMsgNoLookups=true
|
||||
256
solr/solr/bin/solr.in.sh
Normal file
256
solr/solr/bin/solr.in.sh
Normal file
@ -0,0 +1,256 @@
|
||||
# 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.
|
||||
|
||||
# Settings here will override settings in existing env vars or in bin/solr. The default shipped state
|
||||
# of this file is completely commented.
|
||||
|
||||
# By default the script will use JAVA_HOME to determine which java
|
||||
# to use, but you can set a specific path for Solr to use without
|
||||
# affecting other Java applications on your server/workstation.
|
||||
#SOLR_JAVA_HOME=""
|
||||
|
||||
# This controls the number of seconds that the solr script will wait for
|
||||
# Solr to stop gracefully. If the graceful stop fails, the script will
|
||||
# forcibly stop Solr.
|
||||
#SOLR_STOP_WAIT="180"
|
||||
|
||||
# This controls the number of seconds that the solr script will wait for
|
||||
# Solr to start. If the start fails, the script will give up waiting and
|
||||
# display the last few lines of the logfile.
|
||||
#SOLR_START_WAIT="$SOLR_STOP_WAIT"
|
||||
|
||||
# Increase Java Heap as needed to support your indexing / query needs
|
||||
#SOLR_HEAP="512m"
|
||||
|
||||
# Expert: If you want finer control over memory options, specify them directly
|
||||
# Comment out SOLR_HEAP if you are using this though, that takes precedence
|
||||
#SOLR_JAVA_MEM="-Xms512m -Xmx512m"
|
||||
|
||||
# Enable verbose GC logging...
|
||||
# * If this is unset, various default options will be selected depending on which JVM version is in use
|
||||
# * For Java 8: if this is set, additional params will be added to specify the log file & rotation
|
||||
# * For Java 9 or higher: each included opt param that starts with '-Xlog:gc', but does not include an
|
||||
# output specifier, will have a 'file' output specifier (as well as formatting & rollover options)
|
||||
# appended, using the effective value of the SOLR_LOGS_DIR.
|
||||
#
|
||||
#GC_LOG_OPTS='-Xlog:gc*' # (Java 9+)
|
||||
#GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
|
||||
# -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime"
|
||||
|
||||
# These GC settings have shown to work well for a number of common Solr workloads
|
||||
#GC_TUNE=" \
|
||||
#-XX:+ExplicitGCInvokesConcurrent \
|
||||
#-XX:SurvivorRatio=4 \
|
||||
#-XX:TargetSurvivorRatio=90 \
|
||||
#-XX:MaxTenuringThreshold=8 \
|
||||
#-XX:+UseConcMarkSweepGC \
|
||||
#-XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
|
||||
#-XX:+CMSScavengeBeforeRemark \
|
||||
#-XX:PretenureSizeThreshold=64m \
|
||||
#-XX:+UseCMSInitiatingOccupancyOnly \
|
||||
#-XX:CMSInitiatingOccupancyFraction=50 \
|
||||
#-XX:CMSMaxAbortablePrecleanTime=6000 \
|
||||
#-XX:+CMSParallelRemarkEnabled \
|
||||
#-XX:+ParallelRefProcEnabled etc.
|
||||
|
||||
# Set the ZooKeeper connection string if using an external ZooKeeper ensemble
|
||||
# e.g. host1:2181,host2:2181/chroot
|
||||
# Leave empty if not using SolrCloud
|
||||
#ZK_HOST=""
|
||||
|
||||
# Set to true if your ZK host has a chroot path, and you want to create it automatically.
|
||||
#ZK_CREATE_CHROOT=true
|
||||
|
||||
# Set the ZooKeeper client timeout (for SolrCloud mode)
|
||||
#ZK_CLIENT_TIMEOUT="30000"
|
||||
|
||||
# By default the start script uses "localhost"; override the hostname here
|
||||
# for production SolrCloud environments to control the hostname exposed to cluster state
|
||||
#SOLR_HOST="192.168.1.1"
|
||||
|
||||
# By default Solr will try to connect to Zookeeper with 30 seconds in timeout; override the timeout if needed
|
||||
#SOLR_WAIT_FOR_ZK="30"
|
||||
|
||||
# By default the start script uses UTC; override the timezone if needed
|
||||
#SOLR_TIMEZONE="UTC"
|
||||
|
||||
# Set to true to activate the JMX RMI connector to allow remote JMX client applications
|
||||
# to monitor the JVM hosting Solr; set to "false" to disable that behavior
|
||||
# (false is recommended in production environments)
|
||||
#ENABLE_REMOTE_JMX_OPTS="false"
|
||||
|
||||
# The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
|
||||
# RMI_PORT=18983
|
||||
|
||||
# Anything you add to the SOLR_OPTS variable will be included in the java
|
||||
# start command line as-is, in ADDITION to other options. If you specify the
|
||||
# -a option on start script, those options will be appended as well. Examples:
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoSoftCommit.maxTime=3000"
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoCommit.maxTime=60000"
|
||||
|
||||
# Location where the bin/solr script will save PID files for running instances
|
||||
# If not set, the script will create PID files in $SOLR_TIP/bin
|
||||
#SOLR_PID_DIR=
|
||||
|
||||
# Path to a directory for Solr to store cores and their data. By default, Solr will use server/solr
|
||||
# If solr.xml is not stored in ZooKeeper, this directory needs to contain solr.xml
|
||||
#SOLR_HOME=
|
||||
|
||||
# Path to a directory that Solr will use as root for data folders for each core.
|
||||
# If not set, defaults to <instance_dir>/data. Overridable per core through 'dataDir' core property
|
||||
#SOLR_DATA_HOME=
|
||||
|
||||
# Solr provides a default Log4J configuration xml file in server/resources
|
||||
# however, you may want to customize the log settings and file appender location
|
||||
# so you can point the script to use a different log4j2.xml file
|
||||
#LOG4J_PROPS=/var/solr/log4j2.xml
|
||||
|
||||
# Changes the logging level. Valid values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Default is INFO
|
||||
# This is an alternative to changing the rootLogger in log4j2.xml
|
||||
#SOLR_LOG_LEVEL=INFO
|
||||
|
||||
# Location where Solr should write logs to. Absolute or relative to solr start dir
|
||||
#SOLR_LOGS_DIR=logs
|
||||
|
||||
# Enables log rotation before starting Solr. Setting SOLR_LOG_PRESTART_ROTATION=true will let Solr take care of pre
|
||||
# start rotation of logs. This is false by default as log4j2 handles this for us. If you choose to use another log
|
||||
# framework that cannot do startup rotation, you may want to enable this to let Solr rotate logs on startup.
|
||||
#SOLR_LOG_PRESTART_ROTATION=false
|
||||
|
||||
# Enables jetty request log for all requests
|
||||
#SOLR_REQUESTLOG_ENABLED=false
|
||||
|
||||
# Sets the port Solr binds to, default is 8983
|
||||
#SOLR_PORT=8983
|
||||
|
||||
# Restrict access to solr by IP address.
|
||||
# Specify a comma-separated list of addresses or networks, for example:
|
||||
# 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
#SOLR_IP_WHITELIST=
|
||||
|
||||
# Block access to solr from specific IP addresses.
|
||||
# Specify a comma-separated list of addresses or networks, for example:
|
||||
# 127.0.0.1, 192.168.0.0/24, [::1], [2000:123:4:5::]/64
|
||||
#SOLR_IP_BLACKLIST=
|
||||
|
||||
# Enables HTTPS. It is implictly true if you set SOLR_SSL_KEY_STORE. Use this config
|
||||
# to enable https module with custom jetty configuration.
|
||||
#SOLR_SSL_ENABLED=true
|
||||
# Uncomment to set SSL-related system properties
|
||||
# Be sure to update the paths to the correct keystore for your environment
|
||||
#SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.p12
|
||||
#SOLR_SSL_KEY_STORE_PASSWORD=secret
|
||||
#SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.p12
|
||||
#SOLR_SSL_TRUST_STORE_PASSWORD=secret
|
||||
# Require clients to authenticate
|
||||
#SOLR_SSL_NEED_CLIENT_AUTH=false
|
||||
# Enable clients to authenticate (but not require)
|
||||
#SOLR_SSL_WANT_CLIENT_AUTH=false
|
||||
# Verify client's hostname during SSL handshake
|
||||
#SOLR_SSL_CLIENT_HOSTNAME_VERIFICATION=false
|
||||
# SSL Certificates contain host/ip "peer name" information that is validated by default. Setting
|
||||
# this to false can be useful to disable these checks when re-using a certificate on many hosts
|
||||
#SOLR_SSL_CHECK_PEER_NAME=true
|
||||
# Override Key/Trust Store types if necessary
|
||||
#SOLR_SSL_KEY_STORE_TYPE=PKCS12
|
||||
#SOLR_SSL_TRUST_STORE_TYPE=PKCS12
|
||||
|
||||
# Uncomment if you want to override previously defined SSL values for HTTP client
|
||||
# otherwise keep them commented and the above values will automatically be set for HTTP clients
|
||||
#SOLR_SSL_CLIENT_KEY_STORE=
|
||||
#SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
|
||||
#SOLR_SSL_CLIENT_TRUST_STORE=
|
||||
#SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=
|
||||
#SOLR_SSL_CLIENT_KEY_STORE_TYPE=
|
||||
#SOLR_SSL_CLIENT_TRUST_STORE_TYPE=
|
||||
|
||||
# Sets path of Hadoop credential provider (hadoop.security.credential.provider.path property) and
|
||||
# enables usage of credential store.
|
||||
# Credential provider should store the following keys:
|
||||
# * solr.jetty.keystore.password
|
||||
# * solr.jetty.truststore.password
|
||||
# Set the two below if you want to set specific store passwords for HTTP client
|
||||
# * javax.net.ssl.keyStorePassword
|
||||
# * javax.net.ssl.trustStorePassword
|
||||
# More info: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html
|
||||
#SOLR_HADOOP_CREDENTIAL_PROVIDER_PATH=localjceks://file/home/solr/hadoop-credential-provider.jceks
|
||||
#SOLR_OPTS=" -Dsolr.ssl.credential.provider.chain=hadoop"
|
||||
|
||||
# Settings for authentication
|
||||
# Please configure only one of SOLR_AUTHENTICATION_CLIENT_BUILDER or SOLR_AUTH_TYPE parameters
|
||||
#SOLR_AUTHENTICATION_CLIENT_BUILDER="org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory"
|
||||
#SOLR_AUTH_TYPE="basic"
|
||||
#SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
|
||||
|
||||
# Settings for ZK ACL
|
||||
#SOLR_ZK_CREDS_AND_ACLS="-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider \
|
||||
# -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider \
|
||||
# -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD \
|
||||
# -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD"
|
||||
#SOLR_OPTS="$SOLR_OPTS $SOLR_ZK_CREDS_AND_ACLS"
|
||||
|
||||
# Jetty GZIP module enabled by default
|
||||
#SOLR_GZIP_ENABLED=true
|
||||
|
||||
# Settings for common system values that may cause operational imparement when system defaults are used.
|
||||
# Solr can use many processes and many file handles. On modern operating systems the savings by leaving
|
||||
# these settings low is minuscule, while the consequence can be Solr instability. To turn these checks off, set
|
||||
# SOLR_ULIMIT_CHECKS=false either here or as part of your profile.
|
||||
|
||||
# Different limits can be set in solr.in.sh or your profile if you prefer as well.
|
||||
#SOLR_RECOMMENDED_OPEN_FILES=
|
||||
#SOLR_RECOMMENDED_MAX_PROCESSES=
|
||||
#SOLR_ULIMIT_CHECKS=
|
||||
|
||||
# When running Solr in non-cloud mode and if planning to do distributed search (using the "shards" parameter), the
|
||||
# list of hosts needs to be whitelisted or Solr will forbid the request. The whitelist can be configured in solr.xml,
|
||||
# or if you are using the OOTB solr.xml, can be specified using the system property "solr.shardsWhitelist". Alternatively
|
||||
# host checking can be disabled by using the system property "solr.disable.shardsWhitelist"
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.shardsWhitelist=http://localhost:8983,http://localhost:8984"
|
||||
|
||||
# For a visual indication in the Admin UI of what type of environment this cluster is, configure
|
||||
# a -Dsolr.environment property below. Valid values are prod, stage, test, dev, with an optional
|
||||
# label or color, e.g. -Dsolr.environment=test,label=Functional+test,color=brown
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.environment=prod"
|
||||
|
||||
# Specifies the path to a common library directory that will be shared across all cores.
|
||||
# Any JAR files in this directory will be added to the search path for Solr plugins.
|
||||
# If the specified path is not absolute, it will be relative to `$SOLR_HOME`.
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.sharedLib=/path/to/lib"
|
||||
|
||||
# Runs solr in java security manager sandbox. This can protect against some attacks.
|
||||
# Runtime properties are passed to the security policy file (server/etc/security.policy)
|
||||
# You can also tweak via standard JDK files such as ~/.java.policy, see https://s.apache.org/java8policy
|
||||
# This is experimental! It may not work at all with Hadoop/HDFS features.
|
||||
#SOLR_SECURITY_MANAGER_ENABLED=false
|
||||
|
||||
# Solr is by default allowed to read and write data from/to SOLR_HOME and a few other well defined locations
|
||||
# Sometimes it may be necessary to place a core or a backup on a different location or a different disk
|
||||
# This parameter lets you specify file system path(s) to explicitly allow. The special value of '*' will allow any path
|
||||
#SOLR_OPTS="$SOLR_OPTS -Dsolr.allowPaths=/mnt/bigdisk,/other/path"
|
||||
|
||||
# Solr can attempt to take a heap dump on out of memory errors. To enable this, uncomment the line setting
|
||||
# SOLR_HEAP_DUMP below. Heap dumps will be saved to SOLR_LOG_DIR/dumps by default. Alternatively, you can specify any
|
||||
# other directory, which will implicitly enable heap dumping. Dump name pattern will be solr-[timestamp]-pid[###].hprof
|
||||
# When using this feature, it is recommended to have an external service monitoring the given dir.
|
||||
# If more fine grained control is required, you can manually add the appropriate flags to SOLR_OPTS
|
||||
# See https://docs.oracle.com/en/java/javase/11/troubleshoot/command-line-options1.html
|
||||
# You can test this behaviour by setting SOLR_HEAP=25m
|
||||
#SOLR_HEAP_DUMP=true
|
||||
#SOLR_HEAP_DUMP_DIR=/var/log/dumps
|
||||
|
||||
# Some previous versions of Solr use an outdated log4j dependency. If you are unable to use at least log4j version 2.15.0
|
||||
# then enable the following setting to address CVE-2021-44228
|
||||
# SOLR_OPTS="$SOLR_OPTS -Dlog4j2.formatMsgNoLookups=true"
|
||||
BIN
solr/solr/desktop.ini
Normal file
BIN
solr/solr/desktop.ini
Normal file
Binary file not shown.
6
solr/solr/docs/Guida Infinity Solr Server v1.1.url
Normal file
6
solr/solr/docs/Guida Infinity Solr Server v1.1.url
Normal file
@ -0,0 +1,6 @@
|
||||
[InternetShortcut]
|
||||
URL=https://support.zucchetti.it/dms/Downloads/Area%20Infinity%20Zucchetti/Infinity%20Zucchetti/Documentazione/Release%204.2/Doc/index.html
|
||||
IDList=
|
||||
HotKey=0
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,11
|
||||
BIN
solr/solr/docs/Thumbs.db
Normal file
BIN
solr/solr/docs/Thumbs.db
Normal file
Binary file not shown.
BIN
solr/solr/docs/desktop.ini
Normal file
BIN
solr/solr/docs/desktop.ini
Normal file
Binary file not shown.
BIN
solr/solr/infinitysolr-data/desktop.ini
Normal file
BIN
solr/solr/infinitysolr-data/desktop.ini
Normal file
Binary file not shown.
45
solr/solr/infinitysolr-data/solr.xml
Normal file
45
solr/solr/infinitysolr-data/solr.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
This is an example of a simple "solr.xml" file for configuring one or
|
||||
more Solr Cores, as well as allowing Cores to be added, removed, and
|
||||
reloaded via HTTP requests.
|
||||
|
||||
More information about options available in this configuration file,
|
||||
and Solr Core administration can be found online:
|
||||
http://wiki.apache.org/solr/CoreAdmin
|
||||
-->
|
||||
|
||||
<solr>
|
||||
|
||||
<solrcloud>
|
||||
<str name="host">${host:}</str>
|
||||
<int name="hostPort">${jetty.port:8983}</int>
|
||||
<str name="hostContext">${hostContext:solr}</str>
|
||||
<int name="zkClientTimeout">${zkClientTimeout:30000}</int>
|
||||
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
|
||||
</solrcloud>
|
||||
|
||||
<shardHandlerFactory name="shardHandlerFactory"
|
||||
class="HttpShardHandlerFactory">
|
||||
<int name="socketTimeout">${socketTimeout:0}</int>
|
||||
<int name="connTimeout">${connTimeout:0}</int>
|
||||
</shardHandlerFactory>
|
||||
|
||||
</solr>
|
||||
27
solr/solr/infinitysolr-data/zoo.cfg
Normal file
27
solr/solr/infinitysolr-data/zoo.cfg
Normal file
@ -0,0 +1,27 @@
|
||||
# The number of milliseconds of each tick
|
||||
tickTime=2000
|
||||
|
||||
# The number of ticks that the initial
|
||||
# synchronization phase can take
|
||||
initLimit=10
|
||||
|
||||
# The number of ticks that can pass between
|
||||
# sending a request and getting an acknowledgement
|
||||
syncLimit=5
|
||||
|
||||
# The directory where the snapshot is stored.
|
||||
# dataDir=/opt/zookeeper/data
|
||||
# NOTE: Solr defaults the dataDir to <solrHome>/zoo_data
|
||||
|
||||
# The port at which the clients will connect
|
||||
clientPort=8984
|
||||
# NOTE: Solr sets this based on zkRun / zkHost params
|
||||
|
||||
# Max client connections (default = 60)
|
||||
maxClientCnxns=100
|
||||
|
||||
maxCnxns=100
|
||||
|
||||
# Disable ZK AdminServer since we do not use it
|
||||
admin.enableServer=false
|
||||
|
||||
9
solr/solr/infinitysolr/changelog.txt
Normal file
9
solr/solr/infinitysolr/changelog.txt
Normal file
@ -0,0 +1,9 @@
|
||||
Modifiche per il corretto funzionamento dello script engine con java 1.8 e java 17
|
||||
- Aggiornata solr-dataimporthandler-8.11.3.jar
|
||||
- Aggiunte le jar:
|
||||
-graal-sdk-20.3.3.jar
|
||||
-icu4j-69.1.jar
|
||||
-js-20.3.3.jar
|
||||
-js-scriptengine-20.3.3.jar
|
||||
-regex-20.3.3.jar
|
||||
-truffle-api-20.3.3.jar
|
||||
BIN
solr/solr/infinitysolr/desktop.ini
Normal file
BIN
solr/solr/infinitysolr/desktop.ini
Normal file
Binary file not shown.
242
solr/solr/infinitysolr/infinitysolr.bat
Normal file
242
solr/solr/infinitysolr/infinitysolr.bat
Normal file
@ -0,0 +1,242 @@
|
||||
@echo off
|
||||
setlocal enabledelayedExpansion
|
||||
|
||||
REM CONFIGURAZIONE INFINITY SOLR SERVER
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
|
||||
REM SERVICE_NAME= nome del servizio di windows
|
||||
set SERVICE_NAME=InfinitySolr
|
||||
|
||||
REM SERVICE_DESCRIPTION= descrizione del servizio di windows
|
||||
set SERVICE_DESCRIPTION=InfinitySolr
|
||||
|
||||
REM SOLR_MODE = modalità di avvio: server/host
|
||||
set SOLR_MODE=server
|
||||
|
||||
REM SOLR_HOST = IP
|
||||
set SOLR_HOST=127.0.0.1
|
||||
|
||||
REM SOLR_PORT = porta su cui avviare il server/host Infinity Solr Server
|
||||
set SOLR_PORT=8983
|
||||
|
||||
REM SOLRCLOUD_ZOOKEEPER = indirizzo server Zookeeper
|
||||
REM necessario solo se SOLR_MODE == host
|
||||
set SOLRCLOUD_ZOOKEEPER=127.0.0.1:8984
|
||||
|
||||
REM SOLRCLOUD_WHITEADDRESS1
|
||||
set SOLRCLOUD_WHITEADDRESS1=127.0.0.1
|
||||
|
||||
REM SOLRCLOUD_WHITEADDRESS2
|
||||
set SOLRCLOUD_WHITEADDRESS2=
|
||||
|
||||
REM SOLRCLOUD_WHITEADDRESS3
|
||||
set SOLRCLOUD_WHITEADDRESS3=
|
||||
|
||||
REM SOLRCLOUD_WHITEADDRESS4
|
||||
set SOLRCLOUD_WHITEADDRESS4=
|
||||
|
||||
REM SOLRCLOUD_WHITEADDRESS5
|
||||
set SOLRCLOUD_WHITEADDRESS5=
|
||||
|
||||
set WHITE_ADDRESSES=
|
||||
|
||||
REM VERSIONE DI INFINITY SOLR SERVER
|
||||
REM a partire dalla versione 1.3 update 2 la versione viene letta dal file version
|
||||
call version.bat
|
||||
|
||||
REM ADVANCED OPTIONS
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
set SOLR_TIMEZONE=CET
|
||||
set DEBUG_PORT=8100
|
||||
set START_OPTIONS=
|
||||
set SOLR_ENABLE_REMOTE_STREAMING=true
|
||||
set SOLR_ENABLE_STREAM_BODY=true
|
||||
REM set JAVA_HOME=C:\ZWeb\openjdk8
|
||||
|
||||
REM CONFIGURAZIONE INFINITY_SOLR_HOME
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
cd ..
|
||||
set INFINITY_SOLR_HOME=%cd%
|
||||
cd ./infinitysolr
|
||||
|
||||
REM HELP
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
IF [%1] EQU [help] (
|
||||
echo.
|
||||
echo Usage: infinitysolr [COMMAND]
|
||||
echo where COMMAND is one of: install, start, stop, remove
|
||||
echo.
|
||||
echo infinitysolr.bat install - install the windows service with name SERVICE_NAME
|
||||
echo infinitysolr.bat start_service - starts the windows service with name SERVICE_NAME
|
||||
echo infinitysolr.bat stop_service - stops the windows service with name SERVICE_NAME
|
||||
echo infinitysolr.bat remove - remove the windows service with name SERVICE_NAME
|
||||
echo.
|
||||
echo infinitysolr.bat start - starts a Infinity Solr server on "SOLR_PORT" port in "SOLR_MODE" mode
|
||||
echo infinitysolr.bat stop - stops a Infinity Solr server on "SOLR_PORT" port in "SOLR_MODE" mode
|
||||
echo.
|
||||
echo "SOLR_PORT" and "SOLR_MODE" are defined in infinitysolr.bat
|
||||
echo.
|
||||
GOTO end
|
||||
)
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
|
||||
REM CREAZIONE SERVIZIO
|
||||
IF [%1] EQU [install] (
|
||||
GOTO install_service
|
||||
)
|
||||
|
||||
REM STOP SERVIZIO
|
||||
IF [%1] EQU [remove] (
|
||||
GOTO remove_service
|
||||
)
|
||||
|
||||
REM START SERVIZIO
|
||||
IF [%1] EQU [start_service] (
|
||||
GOTO start_service
|
||||
)
|
||||
|
||||
REM STOP SERVIZIO
|
||||
IF [%1] EQU [stop_service] (
|
||||
GOTO stop_service
|
||||
)
|
||||
|
||||
REM Crea file di configurazione
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
echo #host - host di infinity > "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
echo host=%INFINITY_URL% >> "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
echo # user - nome utente di servizio >> "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
echo user=%INFINITY_USER% >> "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
echo # password - password utente di servizio >> "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
echo password=%INFINITY_PASSWORD% >> "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
echo # company - azienda sulla quale effettuare la login >> "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
echo company=%INFINITY_COMPANY% >> "../server/solr-webapp/webapp/WEB-INF/conf/config.properties"
|
||||
|
||||
REM Verifica whitelist se sono in start server
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
IF [%1] EQU [start] (
|
||||
IF [%SOLR_MODE%] EQU [server] (
|
||||
|
||||
IF [%SOLRCLOUD_WHITEADDRESS1%] NEQ [] (
|
||||
IF [!WHITE_ADDRESSES!] EQU [] (
|
||||
set WHITE_ADDRESSES=-Djetty.whiteaddress.1=%SOLRCLOUD_WHITEADDRESS1%
|
||||
) ELSE (
|
||||
set WHITE_ADDRESSES=!WHITE_ADDRESSES! -Djetty.whiteaddress.1=%SOLRCLOUD_WHITEADDRESS1%
|
||||
)
|
||||
)
|
||||
|
||||
IF [%SOLRCLOUD_WHITEADDRESS2%] NEQ [] (
|
||||
IF [!WHITE_ADDRESSES!] EQU [] (
|
||||
set WHITE_ADDRESSES=-Djetty.whiteaddress.2=%SOLRCLOUD_WHITEADDRESS2%
|
||||
) ELSE (
|
||||
set WHITE_ADDRESSES=!WHITE_ADDRESSES! -Djetty.whiteaddress.2=%SOLRCLOUD_WHITEADDRESS2%
|
||||
)
|
||||
)
|
||||
|
||||
IF [%SOLRCLOUD_WHITEADDRESS3%] NEQ [] (
|
||||
IF [!WHITE_ADDRESSES!] EQU [] (
|
||||
set WHITE_ADDRESSES=-Djetty.whiteaddress.3=%SOLRCLOUD_WHITEADDRESS3%
|
||||
) ELSE (
|
||||
set WHITE_ADDRESSES=!WHITE_ADDRESSES! -Djetty.whiteaddress.3=%SOLRCLOUD_WHITEADDRESS3%
|
||||
)
|
||||
)
|
||||
|
||||
IF [%SOLRCLOUD_WHITEADDRESS4%] NEQ [] (
|
||||
IF [!WHITE_ADDRESSES!] EQU [] (
|
||||
set WHITE_ADDRESSES=-Djetty.whiteaddress.4=%SOLRCLOUD_WHITEADDRESS4%
|
||||
) ELSE (
|
||||
set WHITE_ADDRESSES=!WHITE_ADDRESSES! -Djetty.whiteaddress.4=%SOLRCLOUD_WHITEADDRESS4%
|
||||
)
|
||||
)
|
||||
|
||||
IF [%SOLRCLOUD_WHITEADDRESS5%] NEQ [] (
|
||||
IF [!WHITE_ADDRESSES!] EQU [] (
|
||||
set WHITE_ADDRESSES=-Djetty.whiteaddress.5=%SOLRCLOUD_WHITEADDRESS5%
|
||||
) ELSE (
|
||||
set WHITE_ADDRESSES=!WHITE_ADDRESSES! -Djetty.whiteaddress.5=%SOLRCLOUD_WHITEADDRESS5%
|
||||
)
|
||||
)
|
||||
|
||||
IF [!WHITE_ADDRESSES!] EQU [] (
|
||||
GOTO emptywhitelist
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
IF [%2] EQU [debug] (
|
||||
set START_OPTIONS= %START_OPTIONS% -a "-agentlib:jdwp=transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n"
|
||||
)
|
||||
|
||||
REM Verifica e gestione parametri
|
||||
REM -------------------------------------------------------------------------------------------
|
||||
IF [%1] EQU [start] (
|
||||
IF [%SOLR_MODE%] EQU [server] ( GOTO start_server
|
||||
) ELSE IF [%SOLR_MODE%] EQU [host] ( GOTO start_host
|
||||
) ELSE GOTO errore
|
||||
)
|
||||
|
||||
IF [%1] EQU [stop] (
|
||||
IF [%SOLR_MODE%] EQU [server] ( GOTO stop_server
|
||||
) ELSE IF [%SOLR_MODE%] EQU [host] ( GOTO stop_host
|
||||
) ELSE GOTO errore
|
||||
) ELSE GOTO errore
|
||||
|
||||
GOTO errore
|
||||
|
||||
:install_service
|
||||
REM Installa servizio
|
||||
nssm.exe install %SERVICE_NAME% infinitysolr.bat start
|
||||
nssm.exe set %SERVICE_NAME% AppDirectory "%cd%"
|
||||
nssm.exe set %SERVICE_NAME% AppNoConsole 1
|
||||
nssm.exe set %SERVICE_NAME% Description "%SERVICE_DESCRIPTION%"
|
||||
GOTO end
|
||||
|
||||
:start_service
|
||||
REM Start servizio
|
||||
nssm.exe start %SERVICE_NAME%
|
||||
GOTO end
|
||||
|
||||
:stop_service
|
||||
REM Stop servizio
|
||||
nssm.exe stop %SERVICE_NAME%
|
||||
GOTO end
|
||||
|
||||
:remove_service
|
||||
REM Rimuove servizio
|
||||
nssm.exe remove %SERVICE_NAME%
|
||||
GOTO end
|
||||
|
||||
:start_server
|
||||
REM Avvio server
|
||||
../bin/solr start -f -cloud -p %SOLR_PORT% -solr.home "%INFINITY_SOLR_HOME%/infinitysolr-data" -verbose -a "-Dhost=%SOLR_HOST% !WHITE_ADDRESSES!" %START_OPTIONS%
|
||||
GOTO end
|
||||
|
||||
:start_host
|
||||
REM Avvio host
|
||||
../bin/solr start -f -cloud -p %SOLR_PORT% -solr.home "%INFINITY_SOLR_HOME%/infinitysolr-data" -verbose -z %SOLRCLOUD_ZOOKEEPER%
|
||||
GOTO end
|
||||
|
||||
:stop_server
|
||||
REM Stop server
|
||||
../bin/solr stop -p %SOLR_PORT% -solr.home "%INFINITY_SOLR_HOME%/infinitysolr-data" -verbose
|
||||
GOTO end
|
||||
|
||||
:stop_host
|
||||
REM Stop host
|
||||
../bin/solr stop -p %SOLR_PORT% -solr.home "%INFINITY_SOLR_HOME%/infinitysolr-data" -verbose -z %SOLRCLOUD_ZOOKEEPER%
|
||||
GOTO end
|
||||
|
||||
:emptywhitelist
|
||||
REM Whitelist vuota
|
||||
ECHO Inserisci almeno un whiteaddress
|
||||
GOTO end
|
||||
|
||||
:errore
|
||||
ECHO Parametri non validi
|
||||
GOTO end
|
||||
|
||||
:end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
165
solr/solr/infinitysolr/infinitysolr.sh
Normal file
165
solr/solr/infinitysolr/infinitysolr.sh
Normal file
@ -0,0 +1,165 @@
|
||||
#!/bin/bash
|
||||
|
||||
# CONFIGURAZIONE INFINITY SOLR SERVER
|
||||
# -------------------------------------------------------------------------------------------
|
||||
|
||||
# SOLR_MODE = modalit<69> di avvio: server/host
|
||||
SOLR_MODE="server"
|
||||
|
||||
# SOLR_HOST = IP
|
||||
SOLR_HOST="127.0.0.1"
|
||||
|
||||
# SOLR_PORT = porta su cui avviare il server/host SolrCloud
|
||||
SOLR_PORT="8983"
|
||||
|
||||
# SOLRCLOUD_ZOOKEEPER = indirizzo server Zookeeper
|
||||
# necessario solo se SOLR_MODE == host
|
||||
SOLRCLOUD_ZOOKEEPER="127.0.0.1:8984"
|
||||
|
||||
# SOLRCLOUD_WHITEADDRESS1
|
||||
SOLRCLOUD_WHITEADDRESS1="127.0.0.1"
|
||||
|
||||
# SOLRCLOUD_WHITEADDRESS2 (opzionale)
|
||||
SOLRCLOUD_WHITEADDRESS2=""
|
||||
|
||||
# SOLRCLOUD_WHITEADDRESS3 (opzionale)
|
||||
SOLRCLOUD_WHITEADDRESS3=""
|
||||
|
||||
# SOLRCLOUD_WHITEADDRESS4 (opzionale)
|
||||
SOLRCLOUD_WHITEADDRESS4=""
|
||||
|
||||
# SOLRCLOUD_WHITEADDRESS5 (opzionale)
|
||||
SOLRCLOUD_WHITEADDRESS5=""
|
||||
|
||||
#VERSIONE DI INFINITY SOLR SERVER
|
||||
#a partire dalla versione 1.3 update 2 la versione viene letta dal file version
|
||||
#source ./version.sh .
|
||||
#VERSIONE DI INFINITY SOLR SERVER
|
||||
INFINITY_SOLR_VERSION="1.4 Update 2 del 31/07/2024"
|
||||
|
||||
# ADVANCED OPTIONS
|
||||
# -------------------------------------------------------------------------------------------
|
||||
SOLR_TIMEZONE=CET
|
||||
DEBUG_PORT=8100
|
||||
START_OPTIONS=
|
||||
# JAVA_HOME=/opt/tomcat/jdk
|
||||
|
||||
##POLO - RIMOSSO E VALORIZZATO IN DOCKERFILE
|
||||
|
||||
# CONFIGURAZIONE INFINITY_SOLR_HOME
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# cd ..
|
||||
# SOLR_HOME=`pwd`
|
||||
# cd ./infinitysolr
|
||||
|
||||
# HELP
|
||||
# -------------------------------------------------------------------------------------------
|
||||
if [ "$1" = "help" ]
|
||||
then
|
||||
echo ""
|
||||
echo "Usage: ./infinitysolr.sh [COMMAND] [TARGET]"
|
||||
echo " where COMMAND is one of: start, stop"
|
||||
echo ""
|
||||
echo " ./infinitysolr.sh start - starts a Infinity Solr server on \"SOLR_PORT\" port in \"SOLR_MODE\" mode"
|
||||
echo " ./infinitysolr.sh stop - stops a Infinity Solr server on \"SOLR_PORT\" port in \"SOLR_MODE\" mode"
|
||||
echo ""
|
||||
echo " \"SOLR_PORT\" and \"SOLR_MODE\" are defined in infinitysolr.sh"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
## POLO RIMOSSO - SETTARE MANUALMENTE IL FILE CONFIG.PROPERTIES NEL VOLUME SERVER
|
||||
|
||||
# Crea file di configurazione
|
||||
# -------------------------------------------------------------------------------------------
|
||||
# echo "#host - host di infinity" > $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
# echo "host=$INFINITY_URL" >> $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
# echo "# user - nome utente di servizio" >> $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
# echo "user=$INFINITY_USER" >> $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
# echo "# password - password utente di servizio" >> $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
# echo "password=$INFINITY_PASSWORD" >> $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
# echo "# company - azienda sulla quale effettuare la login" >> $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
# echo "company=$INFINITY_COMPANY" >> $SOLR_HOME/server/solr-webapp/webapp/WEB-INF/conf/config.properties
|
||||
|
||||
# Verifica whitelist se sono in "start server"
|
||||
# -------------------------------------------------------------------------------------------
|
||||
if [ "$1" = "start" ] &&[ "$SOLR_MODE" = "server" ]
|
||||
then
|
||||
WHITE_ADDRESSES=""
|
||||
|
||||
if [ "$SOLRCLOUD_WHITEADDRESS1" != "" ]
|
||||
then
|
||||
WHITE_ADDRESSES=$WHITE_ADDRESSES" -Djetty.whiteaddress.1="$SOLRCLOUD_WHITEADDRESS1
|
||||
fi
|
||||
|
||||
if [ "$SOLRCLOUD_WHITEADDRESS2" != "" ]
|
||||
then
|
||||
WHITE_ADDRESSES=$WHITE_ADDRESSES" -Djetty.whiteaddress.2="$SOLRCLOUD_WHITEADDRESS2
|
||||
fi
|
||||
|
||||
if [ "$SOLRCLOUD_WHITEADDRESS3" != "" ]
|
||||
then
|
||||
WHITE_ADDRESSES=$WHITE_ADDRESSES" -Djetty.whiteaddress.3="$SOLRCLOUD_WHITEADDRESS3
|
||||
fi
|
||||
|
||||
if [ "$SOLRCLOUD_WHITEADDRESS4" != "" ]
|
||||
then
|
||||
WHITE_ADDRESSES=$WHITE_ADDRESSES" -Djetty.whiteaddress.4="$SOLRCLOUD_WHITEADDRESS4
|
||||
fi
|
||||
|
||||
if [ "$SOLRCLOUD_WHITEADDRESS5" != "" ]
|
||||
then
|
||||
WHITE_ADDRESSES=$WHITE_ADDRESSES" -Djetty.whiteaddress.5="$SOLRCLOUD_WHITEADDRESS5
|
||||
fi
|
||||
|
||||
if [ "$WHITE_ADDRESSES" = "" ]
|
||||
then
|
||||
echo Inserisci almeno un whiteaddress
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$2" = "debug" ]
|
||||
then
|
||||
START_OPTIONS= $START_OPTIONS -a "-agentlib:jdwp=transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=n"
|
||||
fi
|
||||
|
||||
# Verifica e gestione parametri
|
||||
# -------------------------------------------------------------------------------------------
|
||||
if [ "$1" = "start" ]
|
||||
then
|
||||
if [ "$SOLR_MODE" = "server" ]
|
||||
then
|
||||
$SOLR_HOME/bin/solr start -force -cloud -p $SOLR_PORT -solr.home "$SOLR_HOME/infinitysolr-data" -verbose -a "$WHITE_ADDRESSES" -sv "$INFINITY_SOLR_VERSION"
|
||||
while true; do sleep 60; done
|
||||
fi
|
||||
if [ "$SOLR_MODE" = "host" ]
|
||||
then
|
||||
$SOLR_HOME/bin/solr start -cloud -p $SOLR_PORT -solr.home "$SOLR_HOME/infinitysolr-data" -verbose -z $SOLRCLOUD_ZOOKEEPER
|
||||
exit
|
||||
fi
|
||||
echo Parametri non validi
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = "stop" ]
|
||||
then
|
||||
if [ "$SOLR_MODE" = "server" ]
|
||||
then
|
||||
$SOLR_HOME/bin/solr stop -p $SOLR_PORT -solr.home "$SOLR_HOME/infinitysolr-data" -verbose
|
||||
exit
|
||||
fi
|
||||
if [ "$SOLR_MODE" = "host" ]
|
||||
then
|
||||
$SOLR_HOME/bin/solr stop -p $SOLR_PORT -solr.home "$SOLR_HOME/infinitysolr-data" -verbose -z $SOLRCLOUD_ZOOKEEPER
|
||||
exit
|
||||
|
||||
fi
|
||||
echo Parametri non validi
|
||||
exit
|
||||
fi
|
||||
|
||||
echo Parametri non validi
|
||||
exit
|
||||
|
||||
BIN
solr/solr/infinitysolr/nssm.exe
Normal file
BIN
solr/solr/infinitysolr/nssm.exe
Normal file
Binary file not shown.
19
solr/solr/infinitysolr/users.properties
Normal file
19
solr/solr/infinitysolr/users.properties
Normal file
@ -0,0 +1,19 @@
|
||||
#
|
||||
# This file defines users passwords and roles for a HashUserRealm
|
||||
#
|
||||
# The format is
|
||||
# <username>: [, ...]
|
||||
#
|
||||
# Passwords may be clear text, obfuscated or checksummed. The class
|
||||
# org.mortbay.util.Password should be used to generate obfuscated
|
||||
# passwords or password checksums
|
||||
#
|
||||
# If DIGEST Authentication is used, the password must be in a recoverable
|
||||
# format, either plain text or OBF:.
|
||||
#
|
||||
#jetty: MD5:164c88b302622e17050af52c89945d44, user
|
||||
#admin: CRYPT:ad1ks..kc.1Ug,server-administrator,content-administrator, admin
|
||||
#other: OBF:1xmk1w261u9r1w1c1xmq
|
||||
#plain: plain
|
||||
#user: password, admin
|
||||
admin: admin, admin
|
||||
2
solr/solr/infinitysolr/version.bat
Normal file
2
solr/solr/infinitysolr/version.bat
Normal file
@ -0,0 +1,2 @@
|
||||
REM VERSIONE DI INFINITY SOLR SERVER
|
||||
set INFINITY_SOLR_VERSION=1.4 Update 2 del 31/07/2024
|
||||
2
solr/solr/infinitysolr/version.sh
Normal file
2
solr/solr/infinitysolr/version.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#VERSIONE DI INFINITY SOLR SERVER
|
||||
INFINITY_SOLR_VERSION="1.4 Update 2 del 31/07/2024"
|
||||
3
tomcat/.dockerignore
Normal file
3
tomcat/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
tomcat_logs
|
||||
tomcat_webapps
|
||||
tomcat_webapps_offline
|
||||
37
tomcat/Dockerfile
Normal file
37
tomcat/Dockerfile
Normal file
@ -0,0 +1,37 @@
|
||||
FROM tomcat:9.0.89-jdk17
|
||||
|
||||
# Define arguments for the group and user IDs
|
||||
ARG USER_ID
|
||||
ARG GROUP_ID
|
||||
ARG USERNAME
|
||||
ARG GROUPNAME
|
||||
|
||||
# Create group and user with IDs passed from Docker Compose
|
||||
RUN groupadd -g ${GROUP_ID} ${GROUPNAME} && \
|
||||
useradd --no-log-init -u ${USER_ID} -g ${GROUP_ID} -m ${USERNAME} || true
|
||||
|
||||
# Install necessary packages and clean up
|
||||
RUN apt-get update && \
|
||||
apt-get install -y gosu libreoffice && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# CONFIG
|
||||
COPY ./tomcat_conf/catalina.properties /usr/local/tomcat/conf/catalina.properties
|
||||
COPY ./tomcat_conf/context.xml /usr/local/tomcat/conf/context.xml
|
||||
COPY ./tomcat_conf/server.xml /usr/local/tomcat/conf/server.xml
|
||||
|
||||
# JDBC
|
||||
COPY ./postgresql-42.6.0.jar /usr/local/tomcat/lib/postgresql-42.6.0.jar
|
||||
|
||||
# Set permissions on Tomcat directories
|
||||
RUN chown -R ${USERNAME}:${GROUPNAME} /usr/local/tomcat
|
||||
|
||||
# Ensure the required dconf cache directory exists and has the correct permissions
|
||||
RUN mkdir -p /home/${USERNAME}/.cache/dconf && \
|
||||
chown -R ${USERNAME}:${GROUPNAME} /home/${USERNAME}/.cache/dconf
|
||||
|
||||
USER ${USERNAME}
|
||||
|
||||
# Default command to run Tomcat
|
||||
CMD ["catalina.sh", "run"]
|
||||
BIN
tomcat/desktop.ini
Normal file
BIN
tomcat/desktop.ini
Normal file
Binary file not shown.
BIN
tomcat/postgresql-42.6.0.jar
Normal file
BIN
tomcat/postgresql-42.6.0.jar
Normal file
Binary file not shown.
219
tomcat/tomcat_conf/catalina.properties
Normal file
219
tomcat/tomcat_conf/catalina.properties
Normal file
@ -0,0 +1,219 @@
|
||||
# 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.
|
||||
|
||||
#
|
||||
# List of comma-separated packages that start with or equal this string
|
||||
# will cause a security exception to be thrown when
|
||||
# passed to checkPackageAccess unless the
|
||||
# corresponding RuntimePermission ("accessClassInPackage."+package) has
|
||||
# been granted.
|
||||
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
|
||||
#
|
||||
# List of comma-separated packages that start with or equal this string
|
||||
# will cause a security exception to be thrown when
|
||||
# passed to checkPackageDefinition unless the
|
||||
# corresponding RuntimePermission ("defineClassInPackage."+package) has
|
||||
# been granted.
|
||||
#
|
||||
# by default, no packages are restricted for definition, and none of
|
||||
# the class loaders supplied with the JDK call checkPackageDefinition.
|
||||
#
|
||||
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
|
||||
org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
|
||||
|
||||
#
|
||||
#
|
||||
# List of comma-separated paths defining the contents of the "common"
|
||||
# classloader. Prefixes should be used to define what is the repository type.
|
||||
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
|
||||
# If left as blank,the JVM system loader will be used as Catalina's "common"
|
||||
# loader.
|
||||
# Examples:
|
||||
# "foo": Add this folder as a class repository
|
||||
# "foo/*.jar": Add all the JARs of the specified folder as class
|
||||
# repositories
|
||||
# "foo/bar.jar": Add bar.jar as a class repository
|
||||
#
|
||||
# Note: Values are enclosed in double quotes ("...") in case either the
|
||||
# ${catalina.base} path or the ${catalina.home} path contains a comma.
|
||||
# Because double quotes are used for quoting, the double quote character
|
||||
# may not appear in a path.
|
||||
common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"
|
||||
|
||||
#
|
||||
# List of comma-separated paths defining the contents of the "server"
|
||||
# classloader. Prefixes should be used to define what is the repository type.
|
||||
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
|
||||
# If left as blank, the "common" loader will be used as Catalina's "server"
|
||||
# loader.
|
||||
# Examples:
|
||||
# "foo": Add this folder as a class repository
|
||||
# "foo/*.jar": Add all the JARs of the specified folder as class
|
||||
# repositories
|
||||
# "foo/bar.jar": Add bar.jar as a class repository
|
||||
#
|
||||
# Note: Values may be enclosed in double quotes ("...") in case either the
|
||||
# ${catalina.base} path or the ${catalina.home} path contains a comma.
|
||||
# Because double quotes are used for quoting, the double quote character
|
||||
# may not appear in a path.
|
||||
server.loader=
|
||||
|
||||
#
|
||||
# List of comma-separated paths defining the contents of the "shared"
|
||||
# classloader. Prefixes should be used to define what is the repository type.
|
||||
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
|
||||
# the "common" loader will be used as Catalina's "shared" loader.
|
||||
# Examples:
|
||||
# "foo": Add this folder as a class repository
|
||||
# "foo/*.jar": Add all the JARs of the specified folder as class
|
||||
# repositories
|
||||
# "foo/bar.jar": Add bar.jar as a class repository
|
||||
# Please note that for single jars, e.g. bar.jar, you need the URL form
|
||||
# starting with file:.
|
||||
#
|
||||
# Note: Values may be enclosed in double quotes ("...") in case either the
|
||||
# ${catalina.base} path or the ${catalina.home} path contains a comma.
|
||||
# Because double quotes are used for quoting, the double quote character
|
||||
# may not appear in a path.
|
||||
shared.loader=
|
||||
|
||||
# Default list of JAR files that should not be scanned using the JarScanner
|
||||
# functionality. This is typically used to scan JARs for configuration
|
||||
# information. JARs that do not contain such information may be excluded from
|
||||
# the scan to speed up the scanning process. This is the default list. JARs on
|
||||
# this list are excluded from all scans. The list must be a comma separated list
|
||||
# of JAR file names.
|
||||
# The list of JARs to skip may be over-ridden at a Context level for individual
|
||||
# scan types by configuring a JarScanner with a nested JarScanFilter.
|
||||
# The JARs listed below include:
|
||||
# - Tomcat Bootstrap JARs
|
||||
# - Tomcat API JARs
|
||||
# - Catalina JARs
|
||||
# - Jasper JARs
|
||||
# - Tomcat JARs
|
||||
# - Common non-Tomcat JARs
|
||||
# - Test JARs (JUnit, Cobertura and dependencies)
|
||||
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
|
||||
annotations-api.jar,\
|
||||
ant-junit*.jar,\
|
||||
ant-launcher*.jar,\
|
||||
ant*.jar,\
|
||||
asm-*.jar,\
|
||||
aspectj*.jar,\
|
||||
bcel*.jar,\
|
||||
biz.aQute.bnd*.jar,\
|
||||
bootstrap.jar,\
|
||||
catalina-ant.jar,\
|
||||
catalina-ha.jar,\
|
||||
catalina-ssi.jar,\
|
||||
catalina-storeconfig.jar,\
|
||||
catalina-tribes.jar,\
|
||||
catalina.jar,\
|
||||
cglib-*.jar,\
|
||||
cobertura-*.jar,\
|
||||
commons-beanutils*.jar,\
|
||||
commons-codec*.jar,\
|
||||
commons-collections*.jar,\
|
||||
commons-compress*.jar,\
|
||||
commons-daemon.jar,\
|
||||
commons-dbcp*.jar,\
|
||||
commons-digester*.jar,\
|
||||
commons-fileupload*.jar,\
|
||||
commons-httpclient*.jar,\
|
||||
commons-io*.jar,\
|
||||
commons-lang*.jar,\
|
||||
commons-logging*.jar,\
|
||||
commons-math*.jar,\
|
||||
commons-pool*.jar,\
|
||||
derby-*.jar,\
|
||||
dom4j-*.jar,\
|
||||
easymock-*.jar,\
|
||||
ecj-*.jar,\
|
||||
el-api.jar,\
|
||||
geronimo-spec-jaxrpc*.jar,\
|
||||
h2*.jar,\
|
||||
ha-api-*.jar,\
|
||||
hamcrest-*.jar,\
|
||||
hibernate*.jar,\
|
||||
httpclient*.jar,\
|
||||
icu4j-*.jar,\
|
||||
jasper-el.jar,\
|
||||
jasper.jar,\
|
||||
jaspic-api.jar,\
|
||||
jaxb-*.jar,\
|
||||
jaxen-*.jar,\
|
||||
jaxws-rt-*.jar,\
|
||||
jdom-*.jar,\
|
||||
jetty-*.jar,\
|
||||
jmx-tools.jar,\
|
||||
jmx.jar,\
|
||||
jsp-api.jar,\
|
||||
jta*.jar,\
|
||||
junit-*.jar,\
|
||||
junit.jar,\
|
||||
log4j*.jar,\
|
||||
mail*.jar,\
|
||||
objenesis-*.jar,\
|
||||
oraclepki.jar,\
|
||||
org.hamcrest.core_*.jar,\
|
||||
org.junit_*.jar,\
|
||||
oro-*.jar,\
|
||||
servlet-api-*.jar,\
|
||||
servlet-api.jar,\
|
||||
slf4j*.jar,\
|
||||
taglibs-standard-spec-*.jar,\
|
||||
tagsoup-*.jar,\
|
||||
tomcat-api.jar,\
|
||||
tomcat-coyote.jar,\
|
||||
tomcat-dbcp.jar,\
|
||||
tomcat-i18n-*.jar,\
|
||||
tomcat-jdbc.jar,\
|
||||
tomcat-jni.jar,\
|
||||
tomcat-juli-adapters.jar,\
|
||||
tomcat-juli.jar,\
|
||||
tomcat-util-scan.jar,\
|
||||
tomcat-util.jar,\
|
||||
tomcat-websocket.jar,\
|
||||
tools.jar,\
|
||||
unboundid-ldapsdk-*.jar,\
|
||||
websocket-api.jar,\
|
||||
wsdl4j*.jar,\
|
||||
xercesImpl.jar,\
|
||||
xml-apis.jar,\
|
||||
xmlParserAPIs-*.jar,\
|
||||
xmlParserAPIs.jar,\
|
||||
xom-*.jar
|
||||
|
||||
# Default list of JAR files that should be scanned that overrides the default
|
||||
# jarsToSkip list above. This is typically used to include a specific JAR that
|
||||
# has been excluded by a broad file name pattern in the jarsToSkip list.
|
||||
# The list of JARs to scan may be over-ridden at a Context level for individual
|
||||
# scan types by configuring a JarScanner with a nested JarScanFilter.
|
||||
tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
|
||||
log4j-taglib*.jar,\
|
||||
log4j-web*.jar,\
|
||||
log4javascript*.jar,\
|
||||
slf4j-taglib*.jar,\
|
||||
jstl*.jar
|
||||
|
||||
# String cache configuration.
|
||||
tomcat.util.buf.StringCache.byte.enabled=true
|
||||
#tomcat.util.buf.StringCache.char.enabled=true
|
||||
#tomcat.util.buf.StringCache.trainThreshold=500000
|
||||
#tomcat.util.buf.StringCache.cacheSize=5000
|
||||
|
||||
# Disable use of some privilege blocks Tomcat doesn't need since calls to the
|
||||
# code in question are always already inside a privilege block
|
||||
org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED=false
|
||||
32
tomcat/tomcat_conf/context.xml
Normal file
32
tomcat/tomcat_conf/context.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?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.
|
||||
-->
|
||||
<!-- The contents of this file will be loaded for each web application -->
|
||||
<Context>
|
||||
|
||||
<!-- Default set of monitored resources. If one of these changes, the -->
|
||||
<!-- web application will be reloaded. -->
|
||||
<WatchedResource>WEB-INF/web.xml</WatchedResource>
|
||||
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
|
||||
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
|
||||
|
||||
<Resources cachingAllowed="true" cacheMaxSize="10000000" />
|
||||
<JarScanner scanClassPath="false" scanAllFiles="false" scanAllDirectories="false"/>
|
||||
<JarScanner>
|
||||
<JarScanFilter tldSkip="*.*"/>
|
||||
</JarScanner>
|
||||
</Context>
|
||||
BIN
tomcat/tomcat_conf/desktop.ini
Normal file
BIN
tomcat/tomcat_conf/desktop.ini
Normal file
Binary file not shown.
192
tomcat/tomcat_conf/server.xml
Normal file
192
tomcat/tomcat_conf/server.xml
Normal file
@ -0,0 +1,192 @@
|
||||
<?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="8005" shutdown="SHUTDOWN">
|
||||
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
|
||||
<!-- Security listener. Documentation at /docs/config/listeners.html
|
||||
<Listener className="org.apache.catalina.security.SecurityListener" />
|
||||
-->
|
||||
<!-- APR library loader. Documentation at /docs/apr.html -->
|
||||
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
|
||||
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
|
||||
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
|
||||
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
||||
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
|
||||
|
||||
<!-- 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
|
||||
Java AJP Connector: /docs/config/ajp.html
|
||||
APR (HTTP/AJP) Connector: /docs/apr.html
|
||||
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
|
||||
-->
|
||||
<Connector port="8080" protocol="HTTP/1.1"
|
||||
connectionTimeout="20000"
|
||||
redirectPort="8443"
|
||||
maxParameterCount="1000"
|
||||
/>
|
||||
|
||||
<!-- A "Connector" using the shared thread pool-->
|
||||
<!--
|
||||
<Connector executor="tomcatThreadPool"
|
||||
port="8080" protocol="HTTP/1.1"
|
||||
connectionTimeout="20000"
|
||||
redirectPort="8443"
|
||||
maxParameterCount="1000"
|
||||
/>
|
||||
-->
|
||||
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
|
||||
This connector uses the NIO implementation. The default
|
||||
SSLImplementation will depend on the presence of the APR/native
|
||||
library and the useOpenSSL attribute of the AprLifecycleListener.
|
||||
Either JSSE or OpenSSL style configuration may be used regardless of
|
||||
the SSLImplementation selected. JSSE style configuration is used below.
|
||||
-->
|
||||
<!--
|
||||
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
||||
maxThreads="150" SSLEnabled="true"
|
||||
maxParameterCount="1000"
|
||||
>
|
||||
<SSLHostConfig>
|
||||
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
|
||||
type="RSA" />
|
||||
</SSLHostConfig>
|
||||
</Connector>
|
||||
-->
|
||||
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
|
||||
This connector uses the APR/native implementation which always uses
|
||||
OpenSSL for TLS.
|
||||
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
|
||||
configuration is used below.
|
||||
-->
|
||||
<!--
|
||||
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
|
||||
maxThreads="150" SSLEnabled="true"
|
||||
maxParameterCount="1000"
|
||||
>
|
||||
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
|
||||
<SSLHostConfig>
|
||||
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
|
||||
certificateFile="conf/localhost-rsa-cert.pem"
|
||||
certificateChainFile="conf/localhost-rsa-chain.pem"
|
||||
type="RSA" />
|
||||
</SSLHostConfig>
|
||||
</Connector>
|
||||
-->
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 8009 -->
|
||||
<!--
|
||||
<Connector protocol="AJP/1.3"
|
||||
address="::1"
|
||||
port="8009"
|
||||
redirectPort="8443"
|
||||
maxParameterCount="1000"
|
||||
/>
|
||||
-->
|
||||
<!-- Define an AJP 1.3 Connector on port 8009 -->
|
||||
<Connector protocol="AJP/1.3"
|
||||
address="0.0.0.0"
|
||||
secretRequired="false"
|
||||
port="8009"
|
||||
packetSize="8192"
|
||||
maxThreads="1000"
|
||||
maxPostSize="100000000"
|
||||
redirectPort="8443"
|
||||
tomcatAuthentication="false"
|
||||
connectionTimeout="60000" />
|
||||
|
||||
<!-- 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"/>
|
||||
-->
|
||||
|
||||
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
|
||||
via a brute-force attack -->
|
||||
<Realm className="org.apache.catalina.realm.LockOutRealm">
|
||||
<!-- 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"/>
|
||||
</Realm>
|
||||
|
||||
<Host name="localhost" appBase="webapps"
|
||||
unpackWARs="true" autoDeploy="true">
|
||||
|
||||
<!-- 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
|
||||
Note: The pattern used is equivalent to using pattern="common" -->
|
||||
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
||||
prefix="localhost_access_log" suffix=".txt"
|
||||
pattern="%h %l %u %t "%r" %s %b" />
|
||||
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
</Server>
|
||||
BIN
tomcat/tomcat_logs/desktop.ini
Normal file
BIN
tomcat/tomcat_logs/desktop.ini
Normal file
Binary file not shown.
BIN
tomcat/tomcat_webapps/desktop.ini
Normal file
BIN
tomcat/tomcat_webapps/desktop.ini
Normal file
Binary file not shown.
BIN
tomcat/tomcat_webapps_offline/desktop.ini
Normal file
BIN
tomcat/tomcat_webapps_offline/desktop.ini
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user