Commit faed914e872cba7cb955ba763b4022dc6d27465c
1 parent
9925da16
Exists in
master
and in
39 other branches
Removed old scripts
Showing
23 changed files
with
0 additions
and
3379 deletions
Show diff stats
scripts/Arquivos/colab/ipconfig.yml
scripts/Arquivos/gitlab-unicorn
... | ... | @@ -1,124 +0,0 @@ |
1 | -#!/bin/bash | |
2 | -# | |
3 | -# GitLab | |
4 | -# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat, @axilleas, @mdirkse | |
5 | -# App Version : 6.x - 7.x | |
6 | - | |
7 | -# chkconfig: 2345 82 55 | |
8 | -# processname: unicorn | |
9 | -# processname: sidekiq | |
10 | -# description: Runs unicorn and sidekiq for nginx integration. | |
11 | - | |
12 | -# Related (kudos @4sak3n0ne): | |
13 | -# https://github.com/gitlabhq/gitlabhq/issues/1049#issuecomment-8386882 | |
14 | -# https://gist.github.com/3062860 | |
15 | - | |
16 | -# Include RedHat function library | |
17 | -. /etc/rc.d/init.d/functions | |
18 | - | |
19 | -# The name of the service | |
20 | -NAME=${0##*/} | |
21 | - | |
22 | -### Environment variables | |
23 | -RAILS_ENV="production" | |
24 | - | |
25 | -# The username and path to the gitlab source | |
26 | -USER=git | |
27 | -APP_PATH=/home/git/gitlab | |
28 | - | |
29 | -# The PID and LOCK files used by unicorn and sidekiq | |
30 | -UPID=$APP_PATH/tmp/pids/unicorn.pid | |
31 | -ULOCK=/var/lock/subsys/unicorn | |
32 | -SPID=$APP_PATH/tmp/pids/sidekiq.pid | |
33 | -SLOCK=/var/lock/subsys/sidekiq | |
34 | - | |
35 | -# Evaluate the real path for the user (should already have RVM) | |
36 | -PATH_PATCH="PATH=$(su $USER -s /bin/bash -l -c "echo \"\$PATH\"") && export PATH && " | |
37 | - | |
38 | -start() { | |
39 | - cd $APP_PATH | |
40 | - | |
41 | - # Start unicorn | |
42 | - echo -n $"Starting unicorn: " | |
43 | - daemon --pidfile=$UPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/web start" | |
44 | - unicorn=$? | |
45 | - [ $unicorn -eq 0 ] && touch $ULOCK | |
46 | - echo | |
47 | - | |
48 | - # Start sidekiq | |
49 | - echo -n $"Starting sidekiq: " | |
50 | - daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/background_jobs start" | |
51 | - sidekiq=$? | |
52 | - [ $sidekiq -eq 0 ] && touch $SLOCK | |
53 | - echo | |
54 | - | |
55 | - retval=$unicorn || $sidekiq | |
56 | - return $retval | |
57 | -} | |
58 | - | |
59 | -stop() { | |
60 | - cd $APP_PATH | |
61 | - | |
62 | - # Stop unicorn | |
63 | - echo -n $"Stopping unicorn: " | |
64 | - killproc -p $UPID | |
65 | - unicorn=$? | |
66 | - [ $unicorn -eq 0 ] && rm -f $ULOCK | |
67 | - echo | |
68 | - | |
69 | - # Stop sidekiq | |
70 | - echo -n $"Stopping sidekiq: " | |
71 | - killproc -p $SPID | |
72 | - sidekiq=$? | |
73 | - [ $sidekiq -eq 0 ] && rm -f $SLOCK | |
74 | - echo | |
75 | - | |
76 | - retval=$unicorn || $sidekiq | |
77 | - return $retval | |
78 | -} | |
79 | - | |
80 | -restart() { | |
81 | - stop | |
82 | - start | |
83 | -} | |
84 | - | |
85 | -get_status() { | |
86 | - status -p $UPID unicorn | |
87 | - unicorn=$? | |
88 | - | |
89 | - status -p $SPID sidekiq | |
90 | - sidekiq=$? | |
91 | - | |
92 | - retval=$unicorn || $sidekiq | |
93 | - return $retval | |
94 | -} | |
95 | - | |
96 | -query_status() { | |
97 | - get_status >/dev/null 2>&1 | |
98 | - return $? | |
99 | -} | |
100 | - | |
101 | -case "$1" in | |
102 | - start) | |
103 | - query_status && exit 0 | |
104 | - start || exit 1 | |
105 | - ;; | |
106 | - stop) | |
107 | - query_status || exit 0 | |
108 | - stop || exit 1 | |
109 | - ;; | |
110 | - restart) | |
111 | - restart || exit 1 | |
112 | - ;; | |
113 | - status) | |
114 | - get_status | |
115 | - exit $? | |
116 | - ;; | |
117 | - *) | |
118 | - N=/etc/init.d/$NAME | |
119 | - echo "Usage: $N {start|stop|restart|status}" >&2 | |
120 | - exit 1 | |
121 | - ;; | |
122 | -esac | |
123 | - | |
124 | -exit 0 |
scripts/Arquivos/mailman/list.conf
... | ... | @@ -1,23 +0,0 @@ |
1 | - server { | |
2 | - server_name localhost; | |
3 | - listen 8025; | |
4 | - | |
5 | - location /mailman/cgi-bin { | |
6 | - root /usr/lib; | |
7 | - fastcgi_split_path_info (^/mailman/cgi-bin/[^/]*)(.*)$; | |
8 | - include /etc/nginx/fastcgi_params; | |
9 | - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
10 | - fastcgi_param PATH_INFO $fastcgi_path_info; | |
11 | - fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | |
12 | - fastcgi_intercept_errors on; | |
13 | - fastcgi_pass unix:/var/run/fcgiwrap.socket; | |
14 | - } | |
15 | - location /images/mailman { | |
16 | - alias /usr/lib/mailman/icons; | |
17 | - } | |
18 | - location /pipermail { | |
19 | - alias /var/lib/mailman/archives/public; | |
20 | - autoindex on; | |
21 | - } | |
22 | - } | |
23 | - |
scripts/Arquivos/mailman/mailman_list_conf.conf
scripts/Arquivos/postgres/ipconfig.sh
scripts/Arquivos/postgres/pg_hba.conf
... | ... | @@ -1,23 +0,0 @@ |
1 | -# TYPE DATABASE USER ADDRESS METHOD | |
2 | - | |
3 | -# "local" is for Unix domain socket connections only | |
4 | - local redmine redmine md5 | |
5 | - local trac_colab colab md5 | |
6 | - local colab colab md5 | |
7 | - local gitlabhq_production git trust | |
8 | - local postgres git trust | |
9 | - local all postgres peer | |
10 | -# IPv4 local connections: | |
11 | - host redmine redmine 127.0.0.1/32 md5 | |
12 | - host trac_colab colab 127.0.0.1/32 md5 | |
13 | - host colab colab 127.0.0.1/32 md5 | |
14 | - host gitlabhq_production git 127.0.0.1/32 trust | |
15 | - host postgres git 127.0.0.1/32 trust | |
16 | - host all postgres 127.0.0.1/32 ident | |
17 | -# IPv6 local connections: | |
18 | - host redmine redmine ::1/128 md5 | |
19 | - host trac_colab colab ::1/128 md5 | |
20 | - host colab colab ::1/128 md5 | |
21 | - host gitlabhq_production git ::1/128 trust | |
22 | - host postgres git ::1/128 trust | |
23 | - host all postgres ::1/128 ident |
scripts/Arquivos/redmine/routes.rb
... | ... | @@ -1,358 +0,0 @@ |
1 | -# Redmine - project management software | |
2 | -# Copyright (C) 2006-2013 Jean-Philippe Lang | |
3 | -# | |
4 | -# This program is free software; you can redistribute it and/or | |
5 | -# modify it under the terms of the GNU General Public License | |
6 | -# as published by the Free Software Foundation; either version 2 | |
7 | -# of the License, or (at your option) any later version. | |
8 | -# | |
9 | -# This program is distributed in the hope that it will be useful, | |
10 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | -# GNU General Public License for more details. | |
13 | -# | |
14 | -# You should have received a copy of the GNU General Public License | |
15 | -# along with this program; if not, write to the Free Software | |
16 | -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
17 | -Redmine::Utils::relative_url_root = "/redmine" | |
18 | - | |
19 | -RedmineApp::Application.routes.draw do | |
20 | - scope Redmine::Utils::relative_url_root do | |
21 | - root :to => 'welcome#index', :as => 'home' | |
22 | - | |
23 | - match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post] | |
24 | - match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post] | |
25 | - match 'account/register', :to => 'account#register', :via => [:get, :post], :as => 'register' | |
26 | - match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post], :as => 'lost_password' | |
27 | - match 'account/activate', :to => 'account#activate', :via => :get | |
28 | - | |
29 | - match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put] | |
30 | - match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put] | |
31 | - match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put] | |
32 | - match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put] | |
33 | - | |
34 | - match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post | |
35 | - match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post] | |
36 | - | |
37 | - match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message' | |
38 | - get 'boards/:board_id/topics/:id', :to => 'messages#show', :as => 'board_message' | |
39 | - match 'boards/:board_id/topics/quote/:id', :to => 'messages#quote', :via => [:get, :post] | |
40 | - get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit' | |
41 | - | |
42 | - post 'boards/:board_id/topics/preview', :to => 'messages#preview', :as => 'preview_board_message' | |
43 | - post 'boards/:board_id/topics/:id/replies', :to => 'messages#reply' | |
44 | - post 'boards/:board_id/topics/:id/edit', :to => 'messages#edit' | |
45 | - post 'boards/:board_id/topics/:id/destroy', :to => 'messages#destroy' | |
46 | - | |
47 | - # Misc issue routes. TODO: move into resources | |
48 | - match '/issues/auto_complete', :to => 'auto_completes#issues', :via => :get, :as => 'auto_complete_issues' | |
49 | - match '/issues/context_menu', :to => 'context_menus#issues', :as => 'issues_context_menu', :via => [:get, :post] | |
50 | - match '/issues/changes', :to => 'journals#index', :as => 'issue_changes', :via => :get | |
51 | - match '/issues/:id/quoted', :to => 'journals#new', :id => /\d+/, :via => :post, :as => 'quoted_issue' | |
52 | - | |
53 | - match '/journals/diff/:id', :to => 'journals#diff', :id => /\d+/, :via => :get | |
54 | - match '/journals/edit/:id', :to => 'journals#edit', :id => /\d+/, :via => [:get, :post] | |
55 | - | |
56 | - get '/projects/:project_id/issues/gantt', :to => 'gantts#show', :as => 'project_gantt' | |
57 | - get '/issues/gantt', :to => 'gantts#show' | |
58 | - | |
59 | - get '/projects/:project_id/issues/calendar', :to => 'calendars#show', :as => 'project_calendar' | |
60 | - get '/issues/calendar', :to => 'calendars#show' | |
61 | - | |
62 | - get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report' | |
63 | - get 'projects/:id/issues/report/:detail', :to => 'reports#issue_report_details', :as => 'project_issues_report_details' | |
64 | - | |
65 | - match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :post] | |
66 | - match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post] | |
67 | - match 'my/page', :controller => 'my', :action => 'page', :via => :get | |
68 | - match 'my', :controller => 'my', :action => 'index', :via => :get # Redirects to my/page | |
69 | - match 'my/reset_rss_key', :controller => 'my', :action => 'reset_rss_key', :via => :post | |
70 | - match 'my/reset_api_key', :controller => 'my', :action => 'reset_api_key', :via => :post | |
71 | - match 'my/password', :controller => 'my', :action => 'password', :via => [:get, :post] | |
72 | - match 'my/page_layout', :controller => 'my', :action => 'page_layout', :via => :get | |
73 | - match 'my/add_block', :controller => 'my', :action => 'add_block', :via => :post | |
74 | - match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post | |
75 | - match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post | |
76 | - | |
77 | - resources :users | |
78 | - match 'users/:id/memberships/:membership_id', :to => 'users#edit_membership', :via => :put, :as => 'user_membership' | |
79 | - match 'users/:id/memberships/:membership_id', :to => 'users#destroy_membership', :via => :delete | |
80 | - match 'users/:id/memberships', :to => 'users#edit_membership', :via => :post, :as => 'user_memberships' | |
81 | - | |
82 | - post 'watchers/watch', :to => 'watchers#watch', :as => 'watch' | |
83 | - delete 'watchers/watch', :to => 'watchers#unwatch' | |
84 | - get 'watchers/new', :to => 'watchers#new' | |
85 | - post 'watchers', :to => 'watchers#create' | |
86 | - post 'watchers/append', :to => 'watchers#append' | |
87 | - delete 'watchers', :to => 'watchers#destroy' | |
88 | - get 'watchers/autocomplete_for_user', :to => 'watchers#autocomplete_for_user' | |
89 | - # Specific routes for issue watchers API | |
90 | - post 'issues/:object_id/watchers', :to => 'watchers#create', :object_type => 'issue' | |
91 | - delete 'issues/:object_id/watchers/:user_id' => 'watchers#destroy', :object_type => 'issue' | |
92 | - | |
93 | - resources :projects do | |
94 | - member do | |
95 | - get 'settings(/:tab)', :action => 'settings', :as => 'settings' | |
96 | - post 'modules' | |
97 | - post 'archive' | |
98 | - post 'unarchive' | |
99 | - post 'close' | |
100 | - post 'reopen' | |
101 | - match 'copy', :via => [:get, :post] | |
102 | - end | |
103 | - | |
104 | - shallow do | |
105 | - resources :memberships, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do | |
106 | - collection do | |
107 | - get 'autocomplete' | |
108 | - end | |
109 | - end | |
110 | - end | |
111 | - | |
112 | - resource :enumerations, :controller => 'project_enumerations', :only => [:update, :destroy] | |
113 | - | |
114 | - get 'issues/:copy_from/copy', :to => 'issues#new', :as => 'copy_issue' | |
115 | - resources :issues, :only => [:index, :new, :create] do | |
116 | - resources :time_entries, :controller => 'timelog' do | |
117 | - collection do | |
118 | - get 'report' | |
119 | - end | |
120 | - end | |
121 | - end | |
122 | - # issue form update | |
123 | - match 'issues/update_form', :controller => 'issues', :action => 'update_form', :via => [:put, :post], :as => 'issue_form' | |
124 | - | |
125 | - resources :files, :only => [:index, :new, :create] | |
126 | - | |
127 | - resources :versions, :except => [:index, :show, :edit, :update, :destroy] do | |
128 | - collection do | |
129 | - put 'close_completed' | |
130 | - end | |
131 | - end | |
132 | - get 'versions.:format', :to => 'versions#index' | |
133 | - get 'roadmap', :to => 'versions#index', :format => false | |
134 | - get 'versions', :to => 'versions#index' | |
135 | - | |
136 | - resources :news, :except => [:show, :edit, :update, :destroy] | |
137 | - resources :time_entries, :controller => 'timelog' do | |
138 | - get 'report', :on => :collection | |
139 | - end | |
140 | - resources :queries, :only => [:new, :create] | |
141 | - shallow do | |
142 | - resources :issue_categories | |
143 | - end | |
144 | - resources :documents, :except => [:show, :edit, :update, :destroy] | |
145 | - resources :boards | |
146 | - shallow do | |
147 | - resources :repositories, :except => [:index, :show] do | |
148 | - member do | |
149 | - match 'committers', :via => [:get, :post] | |
150 | - end | |
151 | - end | |
152 | - end | |
153 | - | |
154 | - match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get | |
155 | - resources :wiki, :except => [:index, :new, :create], :as => 'wiki_page' do | |
156 | - member do | |
157 | - get 'rename' | |
158 | - post 'rename' | |
159 | - get 'history' | |
160 | - get 'diff' | |
161 | - match 'preview', :via => [:post, :put] | |
162 | - post 'protect' | |
163 | - post 'add_attachment' | |
164 | - end | |
165 | - collection do | |
166 | - get 'export' | |
167 | - get 'date_index' | |
168 | - end | |
169 | - end | |
170 | - match 'wiki', :controller => 'wiki', :action => 'show', :via => :get | |
171 | - get 'wiki/:id/:version', :to => 'wiki#show', :constraints => {:version => /\d+/} | |
172 | - delete 'wiki/:id/:version', :to => 'wiki#destroy_version' | |
173 | - get 'wiki/:id/:version/annotate', :to => 'wiki#annotate' | |
174 | - get 'wiki/:id/:version/diff', :to => 'wiki#diff' | |
175 | - end | |
176 | - | |
177 | - resources :issues do | |
178 | - collection do | |
179 | - match 'bulk_edit', :via => [:get, :post] | |
180 | - post 'bulk_update' | |
181 | - end | |
182 | - resources :time_entries, :controller => 'timelog' do | |
183 | - collection do | |
184 | - get 'report' | |
185 | - end | |
186 | - end | |
187 | - shallow do | |
188 | - resources :relations, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy] | |
189 | - end | |
190 | - end | |
191 | - match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete | |
192 | - | |
193 | - resources :queries, :except => [:show] | |
194 | - | |
195 | - resources :news, :only => [:index, :show, :edit, :update, :destroy] | |
196 | - match '/news/:id/comments', :to => 'comments#create', :via => :post | |
197 | - match '/news/:id/comments/:comment_id', :to => 'comments#destroy', :via => :delete | |
198 | - | |
199 | - resources :versions, :only => [:show, :edit, :update, :destroy] do | |
200 | - post 'status_by', :on => :member | |
201 | - end | |
202 | - | |
203 | - resources :documents, :only => [:show, :edit, :update, :destroy] do | |
204 | - post 'add_attachment', :on => :member | |
205 | - end | |
206 | - | |
207 | - match '/time_entries/context_menu', :to => 'context_menus#time_entries', :as => :time_entries_context_menu, :via => [:get, :post] | |
208 | - | |
209 | - resources :time_entries, :controller => 'timelog', :except => :destroy do | |
210 | - collection do | |
211 | - get 'report' | |
212 | - get 'bulk_edit' | |
213 | - post 'bulk_update' | |
214 | - end | |
215 | - end | |
216 | - match '/time_entries/:id', :to => 'timelog#destroy', :via => :delete, :id => /\d+/ | |
217 | - # TODO: delete /time_entries for bulk deletion | |
218 | - match '/time_entries/destroy', :to => 'timelog#destroy', :via => :delete | |
219 | - | |
220 | - get 'projects/:id/activity', :to => 'activities#index' | |
221 | - get 'projects/:id/activity.:format', :to => 'activities#index' | |
222 | - get 'activity', :to => 'activities#index' | |
223 | - | |
224 | - # repositories routes | |
225 | - get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats' | |
226 | - get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph' | |
227 | - | |
228 | - get 'projects/:id/repository/:repository_id/changes(/*path(.:ext))', | |
229 | - :to => 'repositories#changes' | |
230 | - | |
231 | - get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision' | |
232 | - get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision' | |
233 | - post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' | |
234 | - delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' | |
235 | - get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions' | |
236 | - get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))', | |
237 | - :controller => 'repositories', | |
238 | - :format => false, | |
239 | - :constraints => { | |
240 | - :action => /(browse|show|entry|raw|annotate|diff)/, | |
241 | - :rev => /[a-z0-9\.\-_]+/ | |
242 | - } | |
243 | - | |
244 | - get 'projects/:id/repository/statistics', :to => 'repositories#stats' | |
245 | - get 'projects/:id/repository/graph', :to => 'repositories#graph' | |
246 | - | |
247 | - get 'projects/:id/repository/changes(/*path(.:ext))', | |
248 | - :to => 'repositories#changes' | |
249 | - | |
250 | - get 'projects/:id/repository/revisions', :to => 'repositories#revisions' | |
251 | - get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' | |
252 | - get 'projects/:id/repository/revision', :to => 'repositories#revision' | |
253 | - post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue' | |
254 | - delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' | |
255 | - get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))', | |
256 | - :controller => 'repositories', | |
257 | - :format => false, | |
258 | - :constraints => { | |
259 | - :action => /(browse|show|entry|raw|annotate|diff)/, | |
260 | - :rev => /[a-z0-9\.\-_]+/ | |
261 | - } | |
262 | - get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))', | |
263 | - :controller => 'repositories', | |
264 | - :action => /(browse|show|entry|raw|changes|annotate|diff)/ | |
265 | - get 'projects/:id/repository/:action(/*path(.:ext))', | |
266 | - :controller => 'repositories', | |
267 | - :action => /(browse|show|entry|raw|changes|annotate|diff)/ | |
268 | - | |
269 | - get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil | |
270 | - get 'projects/:id/repository', :to => 'repositories#show', :path => nil | |
271 | - | |
272 | - # additional routes for having the file name at the end of url | |
273 | - get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment' | |
274 | - get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment' | |
275 | - get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/ | |
276 | - get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail' | |
277 | - resources :attachments, :only => [:show, :destroy] | |
278 | - | |
279 | - resources :groups do | |
280 | - member do | |
281 | - get 'autocomplete_for_user' | |
282 | - end | |
283 | - end | |
284 | - | |
285 | - match 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :via => :post, :as => 'group_users' | |
286 | - match 'groups/:id/users/:user_id', :controller => 'groups', :action => 'remove_user', :id => /\d+/, :via => :delete, :as => 'group_user' | |
287 | - match 'groups/destroy_membership/:id', :controller => 'groups', :action => 'destroy_membership', :id => /\d+/, :via => :post | |
288 | - match 'groups/edit_membership/:id', :controller => 'groups', :action => 'edit_membership', :id => /\d+/, :via => :post | |
289 | - | |
290 | - resources :trackers, :except => :show do | |
291 | - collection do | |
292 | - match 'fields', :via => [:get, :post] | |
293 | - end | |
294 | - end | |
295 | - resources :issue_statuses, :except => :show do | |
296 | - collection do | |
297 | - post 'update_issue_done_ratio' | |
298 | - end | |
299 | - end | |
300 | - resources :custom_fields, :except => :show | |
301 | - resources :roles do | |
302 | - collection do | |
303 | - match 'permissions', :via => [:get, :post] | |
304 | - end | |
305 | - end | |
306 | - resources :enumerations, :except => :show | |
307 | - match 'enumerations/:type', :to => 'enumerations#index', :via => :get | |
308 | - | |
309 | - get 'projects/:id/search', :controller => 'search', :action => 'index' | |
310 | - get 'search', :controller => 'search', :action => 'index' | |
311 | - | |
312 | - match 'mail_handler', :controller => 'mail_handler', :action => 'index', :via => :post | |
313 | - | |
314 | - match 'admin', :controller => 'admin', :action => 'index', :via => :get | |
315 | - match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get | |
316 | - match 'admin/plugins', :controller => 'admin', :action => 'plugins', :via => :get | |
317 | - match 'admin/info', :controller => 'admin', :action => 'info', :via => :get | |
318 | - match 'admin/test_email', :controller => 'admin', :action => 'test_email', :via => :get | |
319 | - match 'admin/default_configuration', :controller => 'admin', :action => 'default_configuration', :via => :post | |
320 | - | |
321 | - resources :auth_sources do | |
322 | - member do | |
323 | - get 'test_connection', :as => 'try_connection' | |
324 | - end | |
325 | - collection do | |
326 | - get 'autocomplete_for_new_user' | |
327 | - end | |
328 | - end | |
329 | - | |
330 | - match 'workflows', :controller => 'workflows', :action => 'index', :via => :get | |
331 | - match 'workflows/edit', :controller => 'workflows', :action => 'edit', :via => [:get, :post] | |
332 | - match 'workflows/permissions', :controller => 'workflows', :action => 'permissions', :via => [:get, :post] | |
333 | - match 'workflows/copy', :controller => 'workflows', :action => 'copy', :via => [:get, :post] | |
334 | - match 'settings', :controller => 'settings', :action => 'index', :via => :get | |
335 | - match 'settings/edit', :controller => 'settings', :action => 'edit', :via => [:get, :post] | |
336 | - match 'settings/plugin/:id', :controller => 'settings', :action => 'plugin', :via => [:get, :post], :as => 'plugin_settings' | |
337 | - | |
338 | - match 'sys/projects', :to => 'sys#projects', :via => :get | |
339 | - match 'sys/projects/:id/repository', :to => 'sys#create_project_repository', :via => :post | |
340 | - match 'sys/fetch_changesets', :to => 'sys#fetch_changesets', :via => :get | |
341 | - | |
342 | - match 'uploads', :to => 'attachments#upload', :via => :post | |
343 | - | |
344 | - get 'robots.txt', :to => 'welcome#robots' | |
345 | - | |
346 | - Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir| | |
347 | - file = File.join(plugin_dir, "config/routes.rb") | |
348 | - if File.exists?(file) | |
349 | - begin | |
350 | - instance_eval File.read(file) | |
351 | - rescue Exception => e | |
352 | - puts "An error occurred while loading the routes definition of #{File.basename(plugin_dir)} plugin (#{file}): #{e.message}." | |
353 | - exit 1 | |
354 | - end | |
355 | - end | |
356 | - end | |
357 | -end | |
358 | -end |
scripts/Arquivos/redmine/unicorn.rb
... | ... | @@ -1,25 +0,0 @@ |
1 | -# Set the working application directory | |
2 | -# working_directory "/path/to/your/app" | |
3 | -working_directory "/opt/redmine" | |
4 | - | |
5 | -# Unicorn PID file location | |
6 | -# pid "/path/to/pids/unicorn.pid" | |
7 | -pid "/opt/redmine/pids/unicorn.pid" | |
8 | - | |
9 | -# Path to logs | |
10 | -# stderr_path "/path/to/log/unicorn.log" | |
11 | -# stdout_path "/path/to/log/unicorn.log" | |
12 | -stderr_path "/opt/redmine/log/unicorn.log" | |
13 | -stdout_path "/opt/redmine/log/unicorn.log" | |
14 | - | |
15 | -# Unicorn socket | |
16 | -#listen "/tmp/unicorn.redmine.sock" | |
17 | -listen "/tmp/unicorn.redmine.sock" | |
18 | - | |
19 | -# Number of processes | |
20 | -# worker_processes 4 | |
21 | -worker_processes 2 | |
22 | - | |
23 | -# Time-out | |
24 | -timeout 30 | |
25 | - |
scripts/Arquivos/remote-user-auth.py
... | ... | @@ -1,17 +0,0 @@ |
1 | - from trac.core import * | |
2 | - from trac.config import BoolOption | |
3 | - from trac.web.api import IAuthenticator | |
4 | - | |
5 | - class MyRemoteUserAuthenticator(Component): | |
6 | - | |
7 | - implements(IAuthenticator) | |
8 | - | |
9 | - obey_remote_user_header = BoolOption('trac', 'obey_remote_user_header', 'false', | |
10 | - """Whether the 'Remote-User:' HTTP header is to be trusted for user logins | |
11 | - (''since ??.??').""") | |
12 | - | |
13 | - def authenticate(self, req): | |
14 | - if self.obey_remote_user_header and req.get_header('Remote-User'): | |
15 | - return req.get_header('Remote-User') | |
16 | - return None | |
17 | - |
scripts/Arquivos/solr/schema.xml
... | ... | @@ -1,245 +0,0 @@ |
1 | -<?xml version="1.0" ?> | |
2 | -<!-- | |
3 | - Licensed to the Apache Software Foundation (ASF) under one or more | |
4 | - contributor license agreements. See the NOTICE file distributed with | |
5 | - this work for additional information regarding copyright ownership. | |
6 | - The ASF licenses this file to You under the Apache License, Version 2.0 | |
7 | - (the "License"); you may not use this file except in compliance with | |
8 | - the License. You may obtain a copy of the License at | |
9 | - | |
10 | - http://www.apache.org/licenses/LICENSE-2.0 | |
11 | - | |
12 | - Unless required by applicable law or agreed to in writing, software | |
13 | - distributed under the License is distributed on an "AS IS" BASIS, | |
14 | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
15 | - See the License for the specific language governing permissions and | |
16 | - limitations under the License. | |
17 | ---> | |
18 | - | |
19 | -<schema name="default" version="1.4"> | |
20 | - <types> | |
21 | - <fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> | |
22 | - <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/> | |
23 | - <fieldtype name="binary" class="solr.BinaryField"/> | |
24 | - | |
25 | - <!-- Numeric field types that manipulate the value into | |
26 | - a string value that isn't human-readable in its internal form, | |
27 | - but with a lexicographic ordering the same as the numeric ordering, | |
28 | - so that range queries work correctly. --> | |
29 | - <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
30 | - <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
31 | - <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
32 | - <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
33 | - | |
34 | - <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
35 | - <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
36 | - <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
37 | - <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
38 | - | |
39 | - <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/> | |
40 | - <!-- A Trie based date field for faster date range queries and date faceting. --> | |
41 | - <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/> | |
42 | - | |
43 | - <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/> | |
44 | - <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/> | |
45 | - <fieldtype name="geohash" class="solr.GeoHashField"/> | |
46 | - | |
47 | - <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> | |
48 | - <analyzer type="index"> | |
49 | - <tokenizer class="solr.StandardTokenizerFactory"/> | |
50 | - <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> | |
51 | - <!-- in this example, we will only use synonyms at query time | |
52 | - <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> | |
53 | - --> | |
54 | - <filter class="solr.LowerCaseFilterFactory"/> | |
55 | - </analyzer> | |
56 | - <analyzer type="query"> | |
57 | - <tokenizer class="solr.StandardTokenizerFactory"/> | |
58 | - <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> | |
59 | - <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> | |
60 | - <filter class="solr.LowerCaseFilterFactory"/> | |
61 | - </analyzer> | |
62 | - </fieldType> | |
63 | - | |
64 | - <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100"> | |
65 | - <analyzer type="index"> | |
66 | - <tokenizer class="solr.StandardTokenizerFactory"/> | |
67 | - <filter class="solr.StopFilterFactory" | |
68 | - ignoreCase="true" | |
69 | - words="lang/stopwords_en.txt" | |
70 | - enablePositionIncrements="true" | |
71 | - /> | |
72 | - <filter class="solr.LowerCaseFilterFactory"/> | |
73 | - <filter class="solr.EnglishPossessiveFilterFactory"/> | |
74 | - <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/> | |
75 | - <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory: | |
76 | - <filter class="solr.EnglishMinimalStemFilterFactory"/> | |
77 | - --> | |
78 | - <filter class="solr.PorterStemFilterFactory"/> | |
79 | - </analyzer> | |
80 | - <analyzer type="query"> | |
81 | - <tokenizer class="solr.StandardTokenizerFactory"/> | |
82 | - <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> | |
83 | - <filter class="solr.StopFilterFactory" | |
84 | - ignoreCase="true" | |
85 | - words="lang/stopwords_en.txt" | |
86 | - enablePositionIncrements="true" | |
87 | - /> | |
88 | - <filter class="solr.LowerCaseFilterFactory"/> | |
89 | - <filter class="solr.EnglishPossessiveFilterFactory"/> | |
90 | - <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/> | |
91 | - <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory: | |
92 | - <filter class="solr.EnglishMinimalStemFilterFactory"/> | |
93 | - --> | |
94 | - <filter class="solr.PorterStemFilterFactory"/> | |
95 | - </analyzer> | |
96 | - </fieldType> | |
97 | - | |
98 | - <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100"> | |
99 | - <analyzer> | |
100 | - <tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
101 | - </analyzer> | |
102 | - </fieldType> | |
103 | - | |
104 | - <fieldType name="ngram" class="solr.TextField" > | |
105 | - <analyzer type="index"> | |
106 | - <tokenizer class="solr.KeywordTokenizerFactory"/> | |
107 | - <filter class="solr.LowerCaseFilterFactory"/> | |
108 | - <filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15" /> | |
109 | - </analyzer> | |
110 | - <analyzer type="query"> | |
111 | - <tokenizer class="solr.KeywordTokenizerFactory"/> | |
112 | - <filter class="solr.LowerCaseFilterFactory"/> | |
113 | - </analyzer> | |
114 | - </fieldType> | |
115 | - | |
116 | - <fieldType name="edge_ngram" class="solr.TextField" positionIncrementGap="1"> | |
117 | - <analyzer type="index"> | |
118 | - <tokenizer class="solr.WhitespaceTokenizerFactory" /> | |
119 | - <filter class="solr.LowerCaseFilterFactory" /> | |
120 | - <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> | |
121 | - <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front" /> | |
122 | - </analyzer> | |
123 | - <analyzer type="query"> | |
124 | - <tokenizer class="solr.WhitespaceTokenizerFactory" /> | |
125 | - <filter class="solr.LowerCaseFilterFactory" /> | |
126 | - <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> | |
127 | - </analyzer> | |
128 | - </fieldType> | |
129 | - </types> | |
130 | - | |
131 | - <fields> | |
132 | - <!-- general --> | |
133 | - <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/> | |
134 | - <field name="django_ct" type="string" indexed="true" stored="true" multiValued="false"/> | |
135 | - <field name="django_id" type="string" indexed="true" stored="true" multiValued="false"/> | |
136 | - | |
137 | - <dynamicField name="*_i" type="int" indexed="true" stored="true"/> | |
138 | - <dynamicField name="*_s" type="string" indexed="true" stored="true"/> | |
139 | - <dynamicField name="*_l" type="long" indexed="true" stored="true"/> | |
140 | - <dynamicField name="*_t" type="text_en" indexed="true" stored="true"/> | |
141 | - <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/> | |
142 | - <dynamicField name="*_f" type="float" indexed="true" stored="true"/> | |
143 | - <dynamicField name="*_d" type="double" indexed="true" stored="true"/> | |
144 | - <dynamicField name="*_dt" type="date" indexed="true" stored="true"/> | |
145 | - <dynamicField name="*_p" type="location" indexed="true" stored="true"/> | |
146 | - <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/> | |
147 | - | |
148 | - | |
149 | - <field name="fullname_and_username" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
150 | - | |
151 | - <field name="description" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
152 | - | |
153 | - <field name="text" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
154 | - | |
155 | - <field name="modified_by_url" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
156 | - | |
157 | - <field name="collaborators" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
158 | - | |
159 | - <field name="icon_name" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
160 | - | |
161 | - <field name="tag" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
162 | - | |
163 | - <field name="fullname" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
164 | - | |
165 | - <field name="mailinglist_url" type="string" indexed="false" stored="true" multiValued="false" /> | |
166 | - | |
167 | - <field name="latest_description" type="string" indexed="false" stored="true" multiValued="false" /> | |
168 | - | |
169 | - <field name="hits" type="long" indexed="true" stored="true" multiValued="false" /> | |
170 | - | |
171 | - <field name="modified_by" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
172 | - | |
173 | - <field name="title" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
174 | - | |
175 | - <field name="url" type="string" indexed="false" stored="true" multiValued="false" /> | |
176 | - | |
177 | - <field name="created" type="date" indexed="true" stored="true" multiValued="false" /> | |
178 | - | |
179 | - <field name="modified" type="date" indexed="true" stored="true" multiValued="false" /> | |
180 | - | |
181 | - <field name="latest_message_pk" type="long" indexed="false" stored="true" multiValued="false" /> | |
182 | - | |
183 | - <field name="score" type="long" indexed="true" stored="true" multiValued="false" /> | |
184 | - | |
185 | - <field name="author_url" type="string" indexed="false" stored="true" multiValued="false" /> | |
186 | - | |
187 | - <field name="author" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
188 | - | |
189 | - <field name="type" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
190 | - | |
191 | - <field name="username" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
192 | - | |
193 | - <field name="webpage" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
194 | - | |
195 | - <field name="message_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
196 | - | |
197 | - <field name="institution" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
198 | - | |
199 | - <field name="google_talk" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
200 | - | |
201 | - <field name="name" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
202 | - | |
203 | - <field name="changeset_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
204 | - | |
205 | - <field name="role" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
206 | - | |
207 | - <field name="contribution_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
208 | - | |
209 | - <field name="ticket_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
210 | - | |
211 | - <field name="wiki_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
212 | - | |
213 | - <field name="email" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
214 | - | |
215 | - <field name="used_by" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
216 | - | |
217 | - <field name="size" type="long" indexed="true" stored="false" multiValued="false" /> | |
218 | - | |
219 | - <field name="mimetype" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
220 | - | |
221 | - <field name="filename" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
222 | - | |
223 | - <field name="repository_name" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
224 | - | |
225 | - <field name="reporter" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
226 | - | |
227 | - <field name="milestone" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
228 | - | |
229 | - <field name="keywords" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
230 | - | |
231 | - <field name="severity" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
232 | - | |
233 | - <field name="component" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
234 | - | |
235 | - </fields> | |
236 | - | |
237 | - <!-- field to use to determine and enforce document uniqueness. --> | |
238 | - <uniqueKey>id</uniqueKey> | |
239 | - | |
240 | - <!-- field for the QueryParser to use when an explicit fieldname is absent --> | |
241 | - <defaultSearchField>text</defaultSearchField> | |
242 | - | |
243 | - <!-- SolrQueryParser configuration: defaultOperator="AND|OR" --> | |
244 | - <solrQueryParser defaultOperator="AND"/> | |
245 | -</schema> | |
246 | 0 | \ No newline at end of file |
scripts/Arquivos/solr/solrconfig.xml
... | ... | @@ -1,1821 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
2 | -<!-- | |
3 | - Licensed to the Apache Software Foundation (ASF) under one or more | |
4 | - contributor license agreements. See the NOTICE file distributed with | |
5 | - this work for additional information regarding copyright ownership. | |
6 | - The ASF licenses this file to You under the Apache License, Version 2.0 | |
7 | - (the "License"); you may not use this file except in compliance with | |
8 | - the License. You may obtain a copy of the License at | |
9 | - | |
10 | - http://www.apache.org/licenses/LICENSE-2.0 | |
11 | - | |
12 | - Unless required by applicable law or agreed to in writing, software | |
13 | - distributed under the License is distributed on an "AS IS" BASIS, | |
14 | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
15 | - See the License for the specific language governing permissions and | |
16 | - limitations under the License. | |
17 | ---> | |
18 | - | |
19 | -<!-- | |
20 | - For more details about configurations options that may appear in | |
21 | - this file, see http://wiki.apache.org/solr/SolrConfigXml. | |
22 | ---> | |
23 | -<config> | |
24 | - <!-- In all configuration below, a prefix of "solr." for class names | |
25 | - is an alias that causes solr to search appropriate packages, | |
26 | - including org.apache.solr.(search|update|request|core|analysis) | |
27 | - | |
28 | - You may also specify a fully qualified Java classname if you | |
29 | - have your own custom plugins. | |
30 | - --> | |
31 | - | |
32 | - <!-- Controls what version of Lucene various components of Solr | |
33 | - adhere to. Generally, you want to use the latest version to | |
34 | - get all bug fixes and improvements. It is highly recommended | |
35 | - that you fully re-index after changing this setting as it can | |
36 | - affect both how text is indexed and queried. | |
37 | - --> | |
38 | - <luceneMatchVersion>4.6</luceneMatchVersion> | |
39 | - | |
40 | - <!-- <lib/> directives can be used to instruct Solr to load an Jars | |
41 | - identified and use them to resolve any "plugins" specified in | |
42 | - your solrconfig.xml or schema.xml (ie: Analyzers, Request | |
43 | - Handlers, etc...). | |
44 | - | |
45 | - All directories and paths are resolved relative to the | |
46 | - instanceDir. | |
47 | - | |
48 | - Please note that <lib/> directives are processed in the order | |
49 | - that they appear in your solrconfig.xml file, and are "stacked" | |
50 | - on top of each other when building a ClassLoader - so if you have | |
51 | - plugin jars with dependencies on other jars, the "lower level" | |
52 | - dependency jars should be loaded first. | |
53 | - | |
54 | - If a "./lib" directory exists in your instanceDir, all files | |
55 | - found in it are included as if you had used the following | |
56 | - syntax... | |
57 | - | |
58 | - <lib dir="./lib" /> | |
59 | - --> | |
60 | - | |
61 | - <!-- A 'dir' option by itself adds any files found in the directory | |
62 | - to the classpath, this is useful for including all jars in a | |
63 | - directory. | |
64 | - | |
65 | - When a 'regex' is specified in addition to a 'dir', only the | |
66 | - files in that directory which completely match the regex | |
67 | - (anchored on both ends) will be included. | |
68 | - | |
69 | - If a 'dir' option (with or without a regex) is used and nothing | |
70 | - is found that matches, a warning will be logged. | |
71 | - | |
72 | - The examples below can be used to load some solr-contribs along | |
73 | - with their external dependencies. | |
74 | - --> | |
75 | - <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" /> | |
76 | - <lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" /> | |
77 | - | |
78 | - <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" /> | |
79 | - <lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" /> | |
80 | - | |
81 | - <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" /> | |
82 | - <lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" /> | |
83 | - | |
84 | - <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" /> | |
85 | - <lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" /> | |
86 | - | |
87 | - <!-- an exact 'path' can be used instead of a 'dir' to specify a | |
88 | - specific jar file. This will cause a serious error to be logged | |
89 | - if it can't be loaded. | |
90 | - --> | |
91 | - <!-- | |
92 | - <lib path="../a-jar-that-does-not-exist.jar" /> | |
93 | - --> | |
94 | - | |
95 | - <!-- Data Directory | |
96 | - | |
97 | - Used to specify an alternate directory to hold all index data | |
98 | - other than the default ./data under the Solr home. If | |
99 | - replication is in use, this should match the replication | |
100 | - configuration. | |
101 | - --> | |
102 | - <dataDir>${solr.data.dir:}</dataDir> | |
103 | - | |
104 | - | |
105 | - <!-- The DirectoryFactory to use for indexes. | |
106 | - | |
107 | - solr.StandardDirectoryFactory is filesystem | |
108 | - based and tries to pick the best implementation for the current | |
109 | - JVM and platform. solr.NRTCachingDirectoryFactory, the default, | |
110 | - wraps solr.StandardDirectoryFactory and caches small files in memory | |
111 | - for better NRT performance. | |
112 | - | |
113 | - One can force a particular implementation via solr.MMapDirectoryFactory, | |
114 | - solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory. | |
115 | - | |
116 | - solr.RAMDirectoryFactory is memory based, not | |
117 | - persistent, and doesn't work with replication. | |
118 | - --> | |
119 | - <directoryFactory name="DirectoryFactory" | |
120 | - class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/> | |
121 | - | |
122 | - <!-- The CodecFactory for defining the format of the inverted index. | |
123 | - The default implementation is SchemaCodecFactory, which is the official Lucene | |
124 | - index format, but hooks into the schema to provide per-field customization of | |
125 | - the postings lists and per-document values in the fieldType element | |
126 | - (postingsFormat/docValuesFormat). Note that most of the alternative implementations | |
127 | - are experimental, so if you choose to customize the index format, its a good | |
128 | - idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader) | |
129 | - before upgrading to a newer version to avoid unnecessary reindexing. | |
130 | - --> | |
131 | - <codecFactory class="solr.SchemaCodecFactory"/> | |
132 | - | |
133 | - <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>: | |
134 | - | |
135 | - <schemaFactory class="ManagedIndexSchemaFactory"> | |
136 | - <bool name="mutable">true</bool> | |
137 | - <str name="managedSchemaResourceName">managed-schema</str> | |
138 | - </schemaFactory> | |
139 | - | |
140 | - When ManagedIndexSchemaFactory is specified, Solr will load the schema from | |
141 | - he resource named in 'managedSchemaResourceName', rather than from schema.xml. | |
142 | - Note that the managed schema resource CANNOT be named schema.xml. If the managed | |
143 | - schema does not exist, Solr will create it after reading schema.xml, then rename | |
144 | - 'schema.xml' to 'schema.xml.bak'. | |
145 | - | |
146 | - Do NOT hand edit the managed schema - external modifications will be ignored and | |
147 | - overwritten as a result of schema modification REST API calls. | |
148 | - | |
149 | - When ManagedIndexSchemaFactory is specified with mutable = true, schema | |
150 | - modification REST API calls will be allowed; otherwise, error responses will be | |
151 | - sent back for these requests. | |
152 | - --> | |
153 | - <schemaFactory class="ClassicIndexSchemaFactory"/> | |
154 | - | |
155 | - <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
156 | - Index Config - These settings control low-level behavior of indexing | |
157 | - Most example settings here show the default value, but are commented | |
158 | - out, to more easily see where customizations have been made. | |
159 | - | |
160 | - Note: This replaces <indexDefaults> and <mainIndex> from older versions | |
161 | - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | |
162 | - <indexConfig> | |
163 | - <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a | |
164 | - LimitTokenCountFilterFactory in your fieldType definition. E.g. | |
165 | - <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/> | |
166 | - --> | |
167 | - <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 --> | |
168 | - <!-- <writeLockTimeout>1000</writeLockTimeout> --> | |
169 | - | |
170 | - <!-- The maximum number of simultaneous threads that may be | |
171 | - indexing documents at once in IndexWriter; if more than this | |
172 | - many threads arrive they will wait for others to finish. | |
173 | - Default in Solr/Lucene is 8. --> | |
174 | - <!-- <maxIndexingThreads>8</maxIndexingThreads> --> | |
175 | - | |
176 | - <!-- Expert: Enabling compound file will use less files for the index, | |
177 | - using fewer file descriptors on the expense of performance decrease. | |
178 | - Default in Lucene is "true". Default in Solr is "false" (since 3.6) --> | |
179 | - <!-- <useCompoundFile>false</useCompoundFile> --> | |
180 | - | |
181 | - <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene | |
182 | - indexing for buffering added documents and deletions before they are | |
183 | - flushed to the Directory. | |
184 | - maxBufferedDocs sets a limit on the number of documents buffered | |
185 | - before flushing. | |
186 | - If both ramBufferSizeMB and maxBufferedDocs is set, then | |
187 | - Lucene will flush based on whichever limit is hit first. | |
188 | - The default is 100 MB. --> | |
189 | - <!-- <ramBufferSizeMB>100</ramBufferSizeMB> --> | |
190 | - <!-- <maxBufferedDocs>1000</maxBufferedDocs> --> | |
191 | - | |
192 | - <!-- Expert: Merge Policy | |
193 | - The Merge Policy in Lucene controls how merging of segments is done. | |
194 | - The default since Solr/Lucene 3.3 is TieredMergePolicy. | |
195 | - The default since Lucene 2.3 was the LogByteSizeMergePolicy, | |
196 | - Even older versions of Lucene used LogDocMergePolicy. | |
197 | - --> | |
198 | - <!-- | |
199 | - <mergePolicy class="org.apache.lucene.index.TieredMergePolicy"> | |
200 | - <int name="maxMergeAtOnce">10</int> | |
201 | - <int name="segmentsPerTier">10</int> | |
202 | - </mergePolicy> | |
203 | - --> | |
204 | - | |
205 | - <!-- Merge Factor | |
206 | - The merge factor controls how many segments will get merged at a time. | |
207 | - For TieredMergePolicy, mergeFactor is a convenience parameter which | |
208 | - will set both MaxMergeAtOnce and SegmentsPerTier at once. | |
209 | - For LogByteSizeMergePolicy, mergeFactor decides how many new segments | |
210 | - will be allowed before they are merged into one. | |
211 | - Default is 10 for both merge policies. | |
212 | - --> | |
213 | - <!-- | |
214 | - <mergeFactor>10</mergeFactor> | |
215 | - --> | |
216 | - | |
217 | - <!-- Expert: Merge Scheduler | |
218 | - The Merge Scheduler in Lucene controls how merges are | |
219 | - performed. The ConcurrentMergeScheduler (Lucene 2.3 default) | |
220 | - can perform merges in the background using separate threads. | |
221 | - The SerialMergeScheduler (Lucene 2.2 default) does not. | |
222 | - --> | |
223 | - <!-- | |
224 | - <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/> | |
225 | - --> | |
226 | - | |
227 | - <!-- LockFactory | |
228 | - | |
229 | - This option specifies which Lucene LockFactory implementation | |
230 | - to use. | |
231 | - | |
232 | - single = SingleInstanceLockFactory - suggested for a | |
233 | - read-only index or when there is no possibility of | |
234 | - another process trying to modify the index. | |
235 | - native = NativeFSLockFactory - uses OS native file locking. | |
236 | - Do not use when multiple solr webapps in the same | |
237 | - JVM are attempting to share a single index. | |
238 | - simple = SimpleFSLockFactory - uses a plain file for locking | |
239 | - | |
240 | - Defaults: 'native' is default for Solr3.6 and later, otherwise | |
241 | - 'simple' is the default | |
242 | - | |
243 | - More details on the nuances of each LockFactory... | |
244 | - http://wiki.apache.org/lucene-java/AvailableLockFactories | |
245 | - --> | |
246 | - <lockType>${solr.lock.type:native}</lockType> | |
247 | - | |
248 | - <!-- Unlock On Startup | |
249 | - | |
250 | - If true, unlock any held write or commit locks on startup. | |
251 | - This defeats the locking mechanism that allows multiple | |
252 | - processes to safely access a lucene index, and should be used | |
253 | - with care. Default is "false". | |
254 | - | |
255 | - This is not needed if lock type is 'single' | |
256 | - --> | |
257 | - <!-- | |
258 | - <unlockOnStartup>false</unlockOnStartup> | |
259 | - --> | |
260 | - | |
261 | - <!-- Expert: Controls how often Lucene loads terms into memory | |
262 | - Default is 128 and is likely good for most everyone. | |
263 | - --> | |
264 | - <!-- <termIndexInterval>128</termIndexInterval> --> | |
265 | - | |
266 | - <!-- If true, IndexReaders will be opened/reopened from the IndexWriter | |
267 | - instead of from the Directory. Hosts in a master/slave setup | |
268 | - should have this set to false while those in a SolrCloud | |
269 | - cluster need to be set to true. Default: true | |
270 | - --> | |
271 | - <!-- | |
272 | - <nrtMode>true</nrtMode> | |
273 | - --> | |
274 | - | |
275 | - <!-- Commit Deletion Policy | |
276 | - Custom deletion policies can be specified here. The class must | |
277 | - implement org.apache.lucene.index.IndexDeletionPolicy. | |
278 | - | |
279 | - The default Solr IndexDeletionPolicy implementation supports | |
280 | - deleting index commit points on number of commits, age of | |
281 | - commit point and optimized status. | |
282 | - | |
283 | - The latest commit point should always be preserved regardless | |
284 | - of the criteria. | |
285 | - --> | |
286 | - <!-- | |
287 | - <deletionPolicy class="solr.SolrDeletionPolicy"> | |
288 | - --> | |
289 | - <!-- The number of commit points to be kept --> | |
290 | - <!-- <str name="maxCommitsToKeep">1</str> --> | |
291 | - <!-- The number of optimized commit points to be kept --> | |
292 | - <!-- <str name="maxOptimizedCommitsToKeep">0</str> --> | |
293 | - <!-- | |
294 | - Delete all commit points once they have reached the given age. | |
295 | - Supports DateMathParser syntax e.g. | |
296 | - --> | |
297 | - <!-- | |
298 | - <str name="maxCommitAge">30MINUTES</str> | |
299 | - <str name="maxCommitAge">1DAY</str> | |
300 | - --> | |
301 | - <!-- | |
302 | - </deletionPolicy> | |
303 | - --> | |
304 | - | |
305 | - <!-- Lucene Infostream | |
306 | - | |
307 | - To aid in advanced debugging, Lucene provides an "InfoStream" | |
308 | - of detailed information when indexing. | |
309 | - | |
310 | - Setting the value to true will instruct the underlying Lucene | |
311 | - IndexWriter to write its info stream to solr's log. By default, | |
312 | - this is enabled here, and controlled through log4j.properties. | |
313 | - --> | |
314 | - <infoStream>true</infoStream> | |
315 | - </indexConfig> | |
316 | - | |
317 | - | |
318 | - <!-- JMX | |
319 | - | |
320 | - This example enables JMX if and only if an existing MBeanServer | |
321 | - is found, use this if you want to configure JMX through JVM | |
322 | - parameters. Remove this to disable exposing Solr configuration | |
323 | - and statistics to JMX. | |
324 | - | |
325 | - For more details see http://wiki.apache.org/solr/SolrJmx | |
326 | - --> | |
327 | - <jmx /> | |
328 | - <!-- If you want to connect to a particular server, specify the | |
329 | - agentId | |
330 | - --> | |
331 | - <!-- <jmx agentId="myAgent" /> --> | |
332 | - <!-- If you want to start a new MBeanServer, specify the serviceUrl --> | |
333 | - <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/> | |
334 | - --> | |
335 | - | |
336 | - <!-- The default high-performance update handler --> | |
337 | - <updateHandler class="solr.DirectUpdateHandler2"> | |
338 | - | |
339 | - <!-- Enables a transaction log, used for real-time get, durability, and | |
340 | - and solr cloud replica recovery. The log can grow as big as | |
341 | - uncommitted changes to the index, so use of a hard autoCommit | |
342 | - is recommended (see below). | |
343 | - "dir" - the target directory for transaction logs, defaults to the | |
344 | - solr data directory. --> | |
345 | - <!-- AutoCommit | |
346 | - | |
347 | - Perform a hard commit automatically under certain conditions. | |
348 | - Instead of enabling autoCommit, consider using "commitWithin" | |
349 | - when adding documents. | |
350 | - | |
351 | - http://wiki.apache.org/solr/UpdateXmlMessages | |
352 | - | |
353 | - maxDocs - Maximum number of documents to add since the last | |
354 | - commit before automatically triggering a new commit. | |
355 | - | |
356 | - maxTime - Maximum amount of time in ms that is allowed to pass | |
357 | - since a document was added before automatically | |
358 | - triggering a new commit. | |
359 | - openSearcher - if false, the commit causes recent index changes | |
360 | - to be flushed to stable storage, but does not cause a new | |
361 | - searcher to be opened to make those changes visible. | |
362 | - | |
363 | - If the updateLog is enabled, then it's highly recommended to | |
364 | - have some sort of hard autoCommit to limit the log size. | |
365 | - --> | |
366 | - <autoCommit> | |
367 | - <maxTime>${solr.autoCommit.maxTime:15000}</maxTime> | |
368 | - <openSearcher>false</openSearcher> | |
369 | - </autoCommit> | |
370 | - | |
371 | - <!-- softAutoCommit is like autoCommit except it causes a | |
372 | - 'soft' commit which only ensures that changes are visible | |
373 | - but does not ensure that data is synced to disk. This is | |
374 | - faster and more near-realtime friendly than a hard commit. | |
375 | - --> | |
376 | - | |
377 | - <autoSoftCommit> | |
378 | - <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> | |
379 | - </autoSoftCommit> | |
380 | - | |
381 | - <!-- Update Related Event Listeners | |
382 | - | |
383 | - Various IndexWriter related events can trigger Listeners to | |
384 | - take actions. | |
385 | - | |
386 | - postCommit - fired after every commit or optimize command | |
387 | - postOptimize - fired after every optimize command | |
388 | - --> | |
389 | - <!-- The RunExecutableListener executes an external command from a | |
390 | - hook such as postCommit or postOptimize. | |
391 | - | |
392 | - exe - the name of the executable to run | |
393 | - dir - dir to use as the current working directory. (default=".") | |
394 | - wait - the calling thread waits until the executable returns. | |
395 | - (default="true") | |
396 | - args - the arguments to pass to the program. (default is none) | |
397 | - env - environment variables to set. (default is none) | |
398 | - --> | |
399 | - <!-- This example shows how RunExecutableListener could be used | |
400 | - with the script based replication... | |
401 | - http://wiki.apache.org/solr/CollectionDistribution | |
402 | - --> | |
403 | - <!-- | |
404 | - <listener event="postCommit" class="solr.RunExecutableListener"> | |
405 | - <str name="exe">solr/bin/snapshooter</str> | |
406 | - <str name="dir">.</str> | |
407 | - <bool name="wait">true</bool> | |
408 | - <arr name="args"> <str>arg1</str> <str>arg2</str> </arr> | |
409 | - <arr name="env"> <str>MYVAR=val1</str> </arr> | |
410 | - </listener> | |
411 | - --> | |
412 | - | |
413 | - </updateHandler> | |
414 | - | |
415 | - <!-- IndexReaderFactory | |
416 | - | |
417 | - Use the following format to specify a custom IndexReaderFactory, | |
418 | - which allows for alternate IndexReader implementations. | |
419 | - | |
420 | - ** Experimental Feature ** | |
421 | - | |
422 | - Please note - Using a custom IndexReaderFactory may prevent | |
423 | - certain other features from working. The API to | |
424 | - IndexReaderFactory may change without warning or may even be | |
425 | - removed from future releases if the problems cannot be | |
426 | - resolved. | |
427 | - | |
428 | - | |
429 | - ** Features that may not work with custom IndexReaderFactory ** | |
430 | - | |
431 | - The ReplicationHandler assumes a disk-resident index. Using a | |
432 | - custom IndexReader implementation may cause incompatibility | |
433 | - with ReplicationHandler and may cause replication to not work | |
434 | - correctly. See SOLR-1366 for details. | |
435 | - | |
436 | - --> | |
437 | - <!-- | |
438 | - <indexReaderFactory name="IndexReaderFactory" class="package.class"> | |
439 | - <str name="someArg">Some Value</str> | |
440 | - </indexReaderFactory > | |
441 | - --> | |
442 | - <!-- By explicitly declaring the Factory, the termIndexDivisor can | |
443 | - be specified. | |
444 | - --> | |
445 | - <!-- | |
446 | - <indexReaderFactory name="IndexReaderFactory" | |
447 | - class="solr.StandardIndexReaderFactory"> | |
448 | - <int name="setTermIndexDivisor">12</int> | |
449 | - </indexReaderFactory > | |
450 | - --> | |
451 | - | |
452 | - <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
453 | - Query section - these settings control query time things like caches | |
454 | - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | |
455 | - <query> | |
456 | - <!-- Max Boolean Clauses | |
457 | - | |
458 | - Maximum number of clauses in each BooleanQuery, an exception | |
459 | - is thrown if exceeded. | |
460 | - | |
461 | - ** WARNING ** | |
462 | - | |
463 | - This option actually modifies a global Lucene property that | |
464 | - will affect all SolrCores. If multiple solrconfig.xml files | |
465 | - disagree on this property, the value at any given moment will | |
466 | - be based on the last SolrCore to be initialized. | |
467 | - | |
468 | - --> | |
469 | - <maxBooleanClauses>1024</maxBooleanClauses> | |
470 | - | |
471 | - | |
472 | - <!-- Solr Internal Query Caches | |
473 | - | |
474 | - There are two implementations of cache available for Solr, | |
475 | - LRUCache, based on a synchronized LinkedHashMap, and | |
476 | - FastLRUCache, based on a ConcurrentHashMap. | |
477 | - | |
478 | - FastLRUCache has faster gets and slower puts in single | |
479 | - threaded operation and thus is generally faster than LRUCache | |
480 | - when the hit ratio of the cache is high (> 75%), and may be | |
481 | - faster under other scenarios on multi-cpu systems. | |
482 | - --> | |
483 | - | |
484 | - <!-- Filter Cache | |
485 | - | |
486 | - Cache used by SolrIndexSearcher for filters (DocSets), | |
487 | - unordered sets of *all* documents that match a query. When a | |
488 | - new searcher is opened, its caches may be prepopulated or | |
489 | - "autowarmed" using data from caches in the old searcher. | |
490 | - autowarmCount is the number of items to prepopulate. For | |
491 | - LRUCache, the autowarmed items will be the most recently | |
492 | - accessed items. | |
493 | - | |
494 | - Parameters: | |
495 | - class - the SolrCache implementation LRUCache or | |
496 | - (LRUCache or FastLRUCache) | |
497 | - size - the maximum number of entries in the cache | |
498 | - initialSize - the initial capacity (number of entries) of | |
499 | - the cache. (see java.util.HashMap) | |
500 | - autowarmCount - the number of entries to prepopulate from | |
501 | - and old cache. | |
502 | - --> | |
503 | - <filterCache class="solr.FastLRUCache" | |
504 | - size="512" | |
505 | - initialSize="512" | |
506 | - autowarmCount="0"/> | |
507 | - | |
508 | - <!-- Query Result Cache | |
509 | - | |
510 | - Caches results of searches - ordered lists of document ids | |
511 | - (DocList) based on a query, a sort, and the range of documents requested. | |
512 | - --> | |
513 | - <queryResultCache class="solr.LRUCache" | |
514 | - size="512" | |
515 | - initialSize="512" | |
516 | - autowarmCount="0"/> | |
517 | - | |
518 | - <!-- Document Cache | |
519 | - | |
520 | - Caches Lucene Document objects (the stored fields for each | |
521 | - document). Since Lucene internal document ids are transient, | |
522 | - this cache will not be autowarmed. | |
523 | - --> | |
524 | - <documentCache class="solr.LRUCache" | |
525 | - size="512" | |
526 | - initialSize="512" | |
527 | - autowarmCount="0"/> | |
528 | - | |
529 | - <!-- custom cache currently used by block join --> | |
530 | - <cache name="perSegFilter" | |
531 | - class="solr.search.LRUCache" | |
532 | - size="10" | |
533 | - initialSize="0" | |
534 | - autowarmCount="10" | |
535 | - regenerator="solr.NoOpRegenerator" /> | |
536 | - | |
537 | - <!-- Field Value Cache | |
538 | - | |
539 | - Cache used to hold field values that are quickly accessible | |
540 | - by document id. The fieldValueCache is created by default | |
541 | - even if not configured here. | |
542 | - --> | |
543 | - <!-- | |
544 | - <fieldValueCache class="solr.FastLRUCache" | |
545 | - size="512" | |
546 | - autowarmCount="128" | |
547 | - showItems="32" /> | |
548 | - --> | |
549 | - | |
550 | - <!-- Custom Cache | |
551 | - | |
552 | - Example of a generic cache. These caches may be accessed by | |
553 | - name through SolrIndexSearcher.getCache(),cacheLookup(), and | |
554 | - cacheInsert(). The purpose is to enable easy caching of | |
555 | - user/application level data. The regenerator argument should | |
556 | - be specified as an implementation of solr.CacheRegenerator | |
557 | - if autowarming is desired. | |
558 | - --> | |
559 | - <!-- | |
560 | - <cache name="myUserCache" | |
561 | - class="solr.LRUCache" | |
562 | - size="4096" | |
563 | - initialSize="1024" | |
564 | - autowarmCount="1024" | |
565 | - regenerator="com.mycompany.MyRegenerator" | |
566 | - /> | |
567 | - --> | |
568 | - | |
569 | - | |
570 | - <!-- Lazy Field Loading | |
571 | - | |
572 | - If true, stored fields that are not requested will be loaded | |
573 | - lazily. This can result in a significant speed improvement | |
574 | - if the usual case is to not load all stored fields, | |
575 | - especially if the skipped fields are large compressed text | |
576 | - fields. | |
577 | - --> | |
578 | - <enableLazyFieldLoading>true</enableLazyFieldLoading> | |
579 | - | |
580 | - <!-- Use Filter For Sorted Query | |
581 | - | |
582 | - A possible optimization that attempts to use a filter to | |
583 | - satisfy a search. If the requested sort does not include | |
584 | - score, then the filterCache will be checked for a filter | |
585 | - matching the query. If found, the filter will be used as the | |
586 | - source of document ids, and then the sort will be applied to | |
587 | - that. | |
588 | - | |
589 | - For most situations, this will not be useful unless you | |
590 | - frequently get the same search repeatedly with different sort | |
591 | - options, and none of them ever use "score" | |
592 | - --> | |
593 | - <!-- | |
594 | - <useFilterForSortedQuery>true</useFilterForSortedQuery> | |
595 | - --> | |
596 | - | |
597 | - <!-- Result Window Size | |
598 | - | |
599 | - An optimization for use with the queryResultCache. When a search | |
600 | - is requested, a superset of the requested number of document ids | |
601 | - are collected. For example, if a search for a particular query | |
602 | - requests matching documents 10 through 19, and queryWindowSize is 50, | |
603 | - then documents 0 through 49 will be collected and cached. Any further | |
604 | - requests in that range can be satisfied via the cache. | |
605 | - --> | |
606 | - <queryResultWindowSize>20</queryResultWindowSize> | |
607 | - | |
608 | - <!-- Maximum number of documents to cache for any entry in the | |
609 | - queryResultCache. | |
610 | - --> | |
611 | - <queryResultMaxDocsCached>200</queryResultMaxDocsCached> | |
612 | - | |
613 | - <!-- Query Related Event Listeners | |
614 | - | |
615 | - Various IndexSearcher related events can trigger Listeners to | |
616 | - take actions. | |
617 | - | |
618 | - newSearcher - fired whenever a new searcher is being prepared | |
619 | - and there is a current searcher handling requests (aka | |
620 | - registered). It can be used to prime certain caches to | |
621 | - prevent long request times for certain requests. | |
622 | - | |
623 | - firstSearcher - fired whenever a new searcher is being | |
624 | - prepared but there is no current registered searcher to handle | |
625 | - requests or to gain autowarming data from. | |
626 | - | |
627 | - | |
628 | - --> | |
629 | - <!-- QuerySenderListener takes an array of NamedList and executes a | |
630 | - local query request for each NamedList in sequence. | |
631 | - --> | |
632 | - <listener event="newSearcher" class="solr.QuerySenderListener"> | |
633 | - <arr name="queries"> | |
634 | - <!-- | |
635 | - <lst><str name="q">solr</str><str name="sort">price asc</str></lst> | |
636 | - <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst> | |
637 | - --> | |
638 | - </arr> | |
639 | - </listener> | |
640 | - <listener event="firstSearcher" class="solr.QuerySenderListener"> | |
641 | - <arr name="queries"> | |
642 | - <lst> | |
643 | - <str name="q">static firstSearcher warming in solrconfig.xml</str> | |
644 | - </lst> | |
645 | - </arr> | |
646 | - </listener> | |
647 | - | |
648 | - <!-- Use Cold Searcher | |
649 | - | |
650 | - If a search request comes in and there is no current | |
651 | - registered searcher, then immediately register the still | |
652 | - warming searcher and use it. If "false" then all requests | |
653 | - will block until the first searcher is done warming. | |
654 | - --> | |
655 | - <useColdSearcher>false</useColdSearcher> | |
656 | - | |
657 | - <!-- Max Warming Searchers | |
658 | - | |
659 | - Maximum number of searchers that may be warming in the | |
660 | - background concurrently. An error is returned if this limit | |
661 | - is exceeded. | |
662 | - | |
663 | - Recommend values of 1-2 for read-only slaves, higher for | |
664 | - masters w/o cache warming. | |
665 | - --> | |
666 | - <maxWarmingSearchers>2</maxWarmingSearchers> | |
667 | - | |
668 | - </query> | |
669 | - | |
670 | - | |
671 | - <!-- Request Dispatcher | |
672 | - | |
673 | - This section contains instructions for how the SolrDispatchFilter | |
674 | - should behave when processing requests for this SolrCore. | |
675 | - | |
676 | - handleSelect is a legacy option that affects the behavior of requests | |
677 | - such as /select?qt=XXX | |
678 | - | |
679 | - handleSelect="true" will cause the SolrDispatchFilter to process | |
680 | - the request and dispatch the query to a handler specified by the | |
681 | - "qt" param, assuming "/select" isn't already registered. | |
682 | - | |
683 | - handleSelect="false" will cause the SolrDispatchFilter to | |
684 | - ignore "/select" requests, resulting in a 404 unless a handler | |
685 | - is explicitly registered with the name "/select" | |
686 | - | |
687 | - handleSelect="true" is not recommended for new users, but is the default | |
688 | - for backwards compatibility | |
689 | - --> | |
690 | - <requestDispatcher handleSelect="false" > | |
691 | - <!-- Request Parsing | |
692 | - | |
693 | - These settings indicate how Solr Requests may be parsed, and | |
694 | - what restrictions may be placed on the ContentStreams from | |
695 | - those requests | |
696 | - | |
697 | - enableRemoteStreaming - enables use of the stream.file | |
698 | - and stream.url parameters for specifying remote streams. | |
699 | - | |
700 | - multipartUploadLimitInKB - specifies the max size (in KiB) of | |
701 | - Multipart File Uploads that Solr will allow in a Request. | |
702 | - | |
703 | - formdataUploadLimitInKB - specifies the max size (in KiB) of | |
704 | - form data (application/x-www-form-urlencoded) sent via | |
705 | - POST. You can use POST to pass request parameters not | |
706 | - fitting into the URL. | |
707 | - | |
708 | - addHttpRequestToContext - if set to true, it will instruct | |
709 | - the requestParsers to include the original HttpServletRequest | |
710 | - object in the context map of the SolrQueryRequest under the | |
711 | - key "httpRequest". It will not be used by any of the existing | |
712 | - Solr components, but may be useful when developing custom | |
713 | - plugins. | |
714 | - | |
715 | - *** WARNING *** | |
716 | - The settings below authorize Solr to fetch remote files, You | |
717 | - should make sure your system has some authentication before | |
718 | - using enableRemoteStreaming="true" | |
719 | - | |
720 | - --> | |
721 | - <requestParsers enableRemoteStreaming="true" | |
722 | - multipartUploadLimitInKB="2048000" | |
723 | - formdataUploadLimitInKB="2048" | |
724 | - addHttpRequestToContext="false"/> | |
725 | - | |
726 | - <!-- HTTP Caching | |
727 | - | |
728 | - Set HTTP caching related parameters (for proxy caches and clients). | |
729 | - | |
730 | - The options below instruct Solr not to output any HTTP Caching | |
731 | - related headers | |
732 | - --> | |
733 | - <httpCaching never304="true" /> | |
734 | - <!-- If you include a <cacheControl> directive, it will be used to | |
735 | - generate a Cache-Control header (as well as an Expires header | |
736 | - if the value contains "max-age=") | |
737 | - | |
738 | - By default, no Cache-Control header is generated. | |
739 | - | |
740 | - You can use the <cacheControl> option even if you have set | |
741 | - never304="true" | |
742 | - --> | |
743 | - <!-- | |
744 | - <httpCaching never304="true" > | |
745 | - <cacheControl>max-age=30, public</cacheControl> | |
746 | - </httpCaching> | |
747 | - --> | |
748 | - <!-- To enable Solr to respond with automatically generated HTTP | |
749 | - Caching headers, and to response to Cache Validation requests | |
750 | - correctly, set the value of never304="false" | |
751 | - | |
752 | - This will cause Solr to generate Last-Modified and ETag | |
753 | - headers based on the properties of the Index. | |
754 | - | |
755 | - The following options can also be specified to affect the | |
756 | - values of these headers... | |
757 | - | |
758 | - lastModFrom - the default value is "openTime" which means the | |
759 | - Last-Modified value (and validation against If-Modified-Since | |
760 | - requests) will all be relative to when the current Searcher | |
761 | - was opened. You can change it to lastModFrom="dirLastMod" if | |
762 | - you want the value to exactly correspond to when the physical | |
763 | - index was last modified. | |
764 | - | |
765 | - etagSeed="..." is an option you can change to force the ETag | |
766 | - header (and validation against If-None-Match requests) to be | |
767 | - different even if the index has not changed (ie: when making | |
768 | - significant changes to your config file) | |
769 | - | |
770 | - (lastModifiedFrom and etagSeed are both ignored if you use | |
771 | - the never304="true" option) | |
772 | - --> | |
773 | - <!-- | |
774 | - <httpCaching lastModifiedFrom="openTime" | |
775 | - etagSeed="Solr"> | |
776 | - <cacheControl>max-age=30, public</cacheControl> | |
777 | - </httpCaching> | |
778 | - --> | |
779 | - </requestDispatcher> | |
780 | - | |
781 | - <!-- Request Handlers | |
782 | - | |
783 | - http://wiki.apache.org/solr/SolrRequestHandler | |
784 | - | |
785 | - Incoming queries will be dispatched to a specific handler by name | |
786 | - based on the path specified in the request. | |
787 | - | |
788 | - Legacy behavior: If the request path uses "/select" but no Request | |
789 | - Handler has that name, and if handleSelect="true" has been specified in | |
790 | - the requestDispatcher, then the Request Handler is dispatched based on | |
791 | - the qt parameter. Handlers without a leading '/' are accessed this way | |
792 | - like so: http://host/app/[core/]select?qt=name If no qt is | |
793 | - given, then the requestHandler that declares default="true" will be | |
794 | - used or the one named "standard". | |
795 | - | |
796 | - If a Request Handler is declared with startup="lazy", then it will | |
797 | - not be initialized until the first request that uses it. | |
798 | - | |
799 | - --> | |
800 | - <!-- SearchHandler | |
801 | - | |
802 | - http://wiki.apache.org/solr/SearchHandler | |
803 | - | |
804 | - For processing Search Queries, the primary Request Handler | |
805 | - provided with Solr is "SearchHandler" It delegates to a sequent | |
806 | - of SearchComponents (see below) and supports distributed | |
807 | - queries across multiple shards | |
808 | - --> | |
809 | - <requestHandler name="/select" class="solr.SearchHandler"> | |
810 | - <!-- default values for query parameters can be specified, these | |
811 | - will be overridden by parameters in the request | |
812 | - --> | |
813 | - <lst name="defaults"> | |
814 | - <str name="echoParams">explicit</str> | |
815 | - <int name="rows">10</int> | |
816 | - <str name="df">text</str> | |
817 | - </lst> | |
818 | - <!-- In addition to defaults, "appends" params can be specified | |
819 | - to identify values which should be appended to the list of | |
820 | - multi-val params from the query (or the existing "defaults"). | |
821 | - --> | |
822 | - <!-- In this example, the param "fq=instock:true" would be appended to | |
823 | - any query time fq params the user may specify, as a mechanism for | |
824 | - partitioning the index, independent of any user selected filtering | |
825 | - that may also be desired (perhaps as a result of faceted searching). | |
826 | - | |
827 | - NOTE: there is *absolutely* nothing a client can do to prevent these | |
828 | - "appends" values from being used, so don't use this mechanism | |
829 | - unless you are sure you always want it. | |
830 | - --> | |
831 | - <!-- | |
832 | - <lst name="appends"> | |
833 | - <str name="fq">inStock:true</str> | |
834 | - </lst> | |
835 | - --> | |
836 | - <!-- "invariants" are a way of letting the Solr maintainer lock down | |
837 | - the options available to Solr clients. Any params values | |
838 | - specified here are used regardless of what values may be specified | |
839 | - in either the query, the "defaults", or the "appends" params. | |
840 | - | |
841 | - In this example, the facet.field and facet.query params would | |
842 | - be fixed, limiting the facets clients can use. Faceting is | |
843 | - not turned on by default - but if the client does specify | |
844 | - facet=true in the request, these are the only facets they | |
845 | - will be able to see counts for; regardless of what other | |
846 | - facet.field or facet.query params they may specify. | |
847 | - | |
848 | - NOTE: there is *absolutely* nothing a client can do to prevent these | |
849 | - "invariants" values from being used, so don't use this mechanism | |
850 | - unless you are sure you always want it. | |
851 | - --> | |
852 | - <!-- | |
853 | - <lst name="invariants"> | |
854 | - <str name="facet.field">cat</str> | |
855 | - <str name="facet.field">manu_exact</str> | |
856 | - <str name="facet.query">price:[* TO 500]</str> | |
857 | - <str name="facet.query">price:[500 TO *]</str> | |
858 | - </lst> | |
859 | - --> | |
860 | - <!-- If the default list of SearchComponents is not desired, that | |
861 | - list can either be overridden completely, or components can be | |
862 | - prepended or appended to the default list. (see below) | |
863 | - --> | |
864 | - <!-- | |
865 | - <arr name="components"> | |
866 | - <str>nameOfCustomComponent1</str> | |
867 | - <str>nameOfCustomComponent2</str> | |
868 | - </arr> | |
869 | - --> | |
870 | - </requestHandler> | |
871 | - | |
872 | - <!-- A request handler that returns indented JSON by default --> | |
873 | - <requestHandler name="/query" class="solr.SearchHandler"> | |
874 | - <lst name="defaults"> | |
875 | - <str name="echoParams">explicit</str> | |
876 | - <str name="wt">json</str> | |
877 | - <str name="indent">true</str> | |
878 | - <str name="df">text</str> | |
879 | - </lst> | |
880 | - </requestHandler> | |
881 | - | |
882 | - | |
883 | - <!-- realtime get handler, guaranteed to return the latest stored fields of | |
884 | - any document, without the need to commit or open a new searcher. The | |
885 | - current implementation relies on the updateLog feature being enabled. --> | |
886 | - <requestHandler name="/get" class="solr.RealTimeGetHandler"> | |
887 | - <lst name="defaults"> | |
888 | - <str name="omitHeader">true</str> | |
889 | - <str name="wt">json</str> | |
890 | - <str name="indent">true</str> | |
891 | - </lst> | |
892 | - </requestHandler> | |
893 | - | |
894 | - | |
895 | - <!-- A Robust Example | |
896 | - | |
897 | - This example SearchHandler declaration shows off usage of the | |
898 | - SearchHandler with many defaults declared | |
899 | - | |
900 | - Note that multiple instances of the same Request Handler | |
901 | - (SearchHandler) can be registered multiple times with different | |
902 | - names (and different init parameters) | |
903 | - --> | |
904 | - <requestHandler name="/browse" class="solr.SearchHandler"> | |
905 | - <lst name="defaults"> | |
906 | - <str name="echoParams">explicit</str> | |
907 | - | |
908 | - <!-- VelocityResponseWriter settings --> | |
909 | - <str name="wt">velocity</str> | |
910 | - <str name="v.template">browse</str> | |
911 | - <str name="v.layout">layout</str> | |
912 | - <str name="title">Solritas</str> | |
913 | - | |
914 | - <!-- Query settings --> | |
915 | - <str name="defType">edismax</str> | |
916 | - <str name="qf"> | |
917 | - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 | |
918 | - title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0 | |
919 | - </str> | |
920 | - <str name="df">text</str> | |
921 | - <str name="mm">100%</str> | |
922 | - <str name="q.alt">*:*</str> | |
923 | - <str name="rows">10</str> | |
924 | - <str name="fl">*,score</str> | |
925 | - | |
926 | - <str name="mlt.qf"> | |
927 | - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 | |
928 | - title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0 | |
929 | - </str> | |
930 | - <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str> | |
931 | - <int name="mlt.count">3</int> | |
932 | - | |
933 | - <!-- Faceting defaults --> | |
934 | - <str name="facet">on</str> | |
935 | - <str name="facet.field">cat</str> | |
936 | - <str name="facet.field">manu_exact</str> | |
937 | - <str name="facet.field">content_type</str> | |
938 | - <str name="facet.field">author_s</str> | |
939 | - <str name="facet.query">ipod</str> | |
940 | - <str name="facet.query">GB</str> | |
941 | - <str name="facet.mincount">1</str> | |
942 | - <str name="facet.pivot">cat,inStock</str> | |
943 | - <str name="facet.range.other">after</str> | |
944 | - <str name="facet.range">price</str> | |
945 | - <int name="f.price.facet.range.start">0</int> | |
946 | - <int name="f.price.facet.range.end">600</int> | |
947 | - <int name="f.price.facet.range.gap">50</int> | |
948 | - <str name="facet.range">popularity</str> | |
949 | - <int name="f.popularity.facet.range.start">0</int> | |
950 | - <int name="f.popularity.facet.range.end">10</int> | |
951 | - <int name="f.popularity.facet.range.gap">3</int> | |
952 | - <str name="facet.range">manufacturedate_dt</str> | |
953 | - <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str> | |
954 | - <str name="f.manufacturedate_dt.facet.range.end">NOW</str> | |
955 | - <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str> | |
956 | - <str name="f.manufacturedate_dt.facet.range.other">before</str> | |
957 | - <str name="f.manufacturedate_dt.facet.range.other">after</str> | |
958 | - | |
959 | - <!-- Highlighting defaults --> | |
960 | - <str name="hl">on</str> | |
961 | - <str name="hl.fl">content features title name</str> | |
962 | - <str name="hl.encoder">html</str> | |
963 | - <str name="hl.simple.pre"><b></str> | |
964 | - <str name="hl.simple.post"></b></str> | |
965 | - <str name="f.title.hl.fragsize">0</str> | |
966 | - <str name="f.title.hl.alternateField">title</str> | |
967 | - <str name="f.name.hl.fragsize">0</str> | |
968 | - <str name="f.name.hl.alternateField">name</str> | |
969 | - <str name="f.content.hl.snippets">3</str> | |
970 | - <str name="f.content.hl.fragsize">200</str> | |
971 | - <str name="f.content.hl.alternateField">content</str> | |
972 | - <str name="f.content.hl.maxAlternateFieldLength">750</str> | |
973 | - | |
974 | - <!-- Spell checking defaults --> | |
975 | - <str name="spellcheck">on</str> | |
976 | - <str name="spellcheck.extendedResults">false</str> | |
977 | - <str name="spellcheck.count">5</str> | |
978 | - <str name="spellcheck.alternativeTermCount">2</str> | |
979 | - <str name="spellcheck.maxResultsForSuggest">5</str> | |
980 | - <str name="spellcheck.collate">true</str> | |
981 | - <str name="spellcheck.collateExtendedResults">true</str> | |
982 | - <str name="spellcheck.maxCollationTries">5</str> | |
983 | - <str name="spellcheck.maxCollations">3</str> | |
984 | - </lst> | |
985 | - | |
986 | - <!-- append spellchecking to our list of components --> | |
987 | - <arr name="last-components"> | |
988 | - <str>spellcheck</str> | |
989 | - </arr> | |
990 | - </requestHandler> | |
991 | - | |
992 | - | |
993 | - <!-- Update Request Handler. | |
994 | - | |
995 | - http://wiki.apache.org/solr/UpdateXmlMessages | |
996 | - | |
997 | - The canonical Request Handler for Modifying the Index through | |
998 | - commands specified using XML, JSON, CSV, or JAVABIN | |
999 | - | |
1000 | - Note: Since solr1.1 requestHandlers requires a valid content | |
1001 | - type header if posted in the body. For example, curl now | |
1002 | - requires: -H 'Content-type:text/xml; charset=utf-8' | |
1003 | - | |
1004 | - To override the request content type and force a specific | |
1005 | - Content-type, use the request parameter: | |
1006 | - ?update.contentType=text/csv | |
1007 | - | |
1008 | - This handler will pick a response format to match the input | |
1009 | - if the 'wt' parameter is not explicit | |
1010 | - --> | |
1011 | - <requestHandler name="/update" class="solr.UpdateRequestHandler"> | |
1012 | - <!-- See below for information on defining | |
1013 | - updateRequestProcessorChains that can be used by name | |
1014 | - on each Update Request | |
1015 | - --> | |
1016 | - <!-- | |
1017 | - <lst name="defaults"> | |
1018 | - <str name="update.chain">dedupe</str> | |
1019 | - </lst> | |
1020 | - --> | |
1021 | - </requestHandler> | |
1022 | - | |
1023 | - <!-- for back compat with clients using /update/json and /update/csv --> | |
1024 | - <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler"> | |
1025 | - <lst name="defaults"> | |
1026 | - <str name="stream.contentType">application/json</str> | |
1027 | - </lst> | |
1028 | - </requestHandler> | |
1029 | - <requestHandler name="/update/csv" class="solr.CSVRequestHandler"> | |
1030 | - <lst name="defaults"> | |
1031 | - <str name="stream.contentType">application/csv</str> | |
1032 | - </lst> | |
1033 | - </requestHandler> | |
1034 | - | |
1035 | - <!-- Solr Cell Update Request Handler | |
1036 | - | |
1037 | - http://wiki.apache.org/solr/ExtractingRequestHandler | |
1038 | - | |
1039 | - --> | |
1040 | - <requestHandler name="/update/extract" | |
1041 | - startup="lazy" | |
1042 | - class="solr.extraction.ExtractingRequestHandler" > | |
1043 | - <lst name="defaults"> | |
1044 | - <str name="lowernames">true</str> | |
1045 | - <str name="uprefix">ignored_</str> | |
1046 | - | |
1047 | - <!-- capture link hrefs but ignore div attributes --> | |
1048 | - <str name="captureAttr">true</str> | |
1049 | - <str name="fmap.a">links</str> | |
1050 | - <str name="fmap.div">ignored_</str> | |
1051 | - </lst> | |
1052 | - </requestHandler> | |
1053 | - | |
1054 | - | |
1055 | - <!-- Field Analysis Request Handler | |
1056 | - | |
1057 | - RequestHandler that provides much the same functionality as | |
1058 | - analysis.jsp. Provides the ability to specify multiple field | |
1059 | - types and field names in the same request and outputs | |
1060 | - index-time and query-time analysis for each of them. | |
1061 | - | |
1062 | - Request parameters are: | |
1063 | - analysis.fieldname - field name whose analyzers are to be used | |
1064 | - | |
1065 | - analysis.fieldtype - field type whose analyzers are to be used | |
1066 | - analysis.fieldvalue - text for index-time analysis | |
1067 | - q (or analysis.q) - text for query time analysis | |
1068 | - analysis.showmatch (true|false) - When set to true and when | |
1069 | - query analysis is performed, the produced tokens of the | |
1070 | - field value analysis will be marked as "matched" for every | |
1071 | - token that is produces by the query analysis | |
1072 | - --> | |
1073 | - <requestHandler name="/analysis/field" | |
1074 | - startup="lazy" | |
1075 | - class="solr.FieldAnalysisRequestHandler" /> | |
1076 | - | |
1077 | - | |
1078 | - <!-- Document Analysis Handler | |
1079 | - | |
1080 | - http://wiki.apache.org/solr/AnalysisRequestHandler | |
1081 | - | |
1082 | - An analysis handler that provides a breakdown of the analysis | |
1083 | - process of provided documents. This handler expects a (single) | |
1084 | - content stream with the following format: | |
1085 | - | |
1086 | - <docs> | |
1087 | - <doc> | |
1088 | - <field name="id">1</field> | |
1089 | - <field name="name">The Name</field> | |
1090 | - <field name="text">The Text Value</field> | |
1091 | - </doc> | |
1092 | - <doc>...</doc> | |
1093 | - <doc>...</doc> | |
1094 | - ... | |
1095 | - </docs> | |
1096 | - | |
1097 | - Note: Each document must contain a field which serves as the | |
1098 | - unique key. This key is used in the returned response to associate | |
1099 | - an analysis breakdown to the analyzed document. | |
1100 | - | |
1101 | - Like the FieldAnalysisRequestHandler, this handler also supports | |
1102 | - query analysis by sending either an "analysis.query" or "q" | |
1103 | - request parameter that holds the query text to be analyzed. It | |
1104 | - also supports the "analysis.showmatch" parameter which when set to | |
1105 | - true, all field tokens that match the query tokens will be marked | |
1106 | - as a "match". | |
1107 | - --> | |
1108 | - <requestHandler name="/analysis/document" | |
1109 | - class="solr.DocumentAnalysisRequestHandler" | |
1110 | - startup="lazy" /> | |
1111 | - | |
1112 | - <!-- Admin Handlers | |
1113 | - | |
1114 | - Admin Handlers - This will register all the standard admin | |
1115 | - RequestHandlers. | |
1116 | - --> | |
1117 | - <requestHandler name="/admin/" | |
1118 | - class="solr.admin.AdminHandlers" /> | |
1119 | - <!-- This single handler is equivalent to the following... --> | |
1120 | - <!-- | |
1121 | - <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" /> | |
1122 | - <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" /> | |
1123 | - <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" /> | |
1124 | - <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" /> | |
1125 | - <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" /> | |
1126 | - <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" > | |
1127 | - --> | |
1128 | - <!-- If you wish to hide files under ${solr.home}/conf, explicitly | |
1129 | - register the ShowFileRequestHandler using: | |
1130 | - --> | |
1131 | - <!-- | |
1132 | - <requestHandler name="/admin/file" | |
1133 | - class="solr.admin.ShowFileRequestHandler" > | |
1134 | - <lst name="invariants"> | |
1135 | - <str name="hidden">synonyms.txt</str> | |
1136 | - <str name="hidden">anotherfile.txt</str> | |
1137 | - </lst> | |
1138 | - </requestHandler> | |
1139 | - --> | |
1140 | - | |
1141 | - <!-- ping/healthcheck --> | |
1142 | - <requestHandler name="/admin/ping" class="solr.PingRequestHandler"> | |
1143 | - <lst name="invariants"> | |
1144 | - <str name="q">solrpingquery</str> | |
1145 | - </lst> | |
1146 | - <lst name="defaults"> | |
1147 | - <str name="echoParams">all</str> | |
1148 | - </lst> | |
1149 | - <!-- An optional feature of the PingRequestHandler is to configure the | |
1150 | - handler with a "healthcheckFile" which can be used to enable/disable | |
1151 | - the PingRequestHandler. | |
1152 | - relative paths are resolved against the data dir | |
1153 | - --> | |
1154 | - <!-- <str name="healthcheckFile">server-enabled.txt</str> --> | |
1155 | - </requestHandler> | |
1156 | - | |
1157 | - <!-- Echo the request contents back to the client --> | |
1158 | - <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" > | |
1159 | - <lst name="defaults"> | |
1160 | - <str name="echoParams">explicit</str> | |
1161 | - <str name="echoHandler">true</str> | |
1162 | - </lst> | |
1163 | - </requestHandler> | |
1164 | - | |
1165 | - <!-- Solr Replication | |
1166 | - | |
1167 | - The SolrReplicationHandler supports replicating indexes from a | |
1168 | - "master" used for indexing and "slaves" used for queries. | |
1169 | - | |
1170 | - http://wiki.apache.org/solr/SolrReplication | |
1171 | - | |
1172 | - It is also necessary for SolrCloud to function (in Cloud mode, the | |
1173 | - replication handler is used to bulk transfer segments when nodes | |
1174 | - are added or need to recover). | |
1175 | - | |
1176 | - https://wiki.apache.org/solr/SolrCloud/ | |
1177 | - --> | |
1178 | - <requestHandler name="/replication" class="solr.ReplicationHandler" > | |
1179 | - <!-- | |
1180 | - To enable simple master/slave replication, uncomment one of the | |
1181 | - sections below, depending on whether this solr instance should be | |
1182 | - the "master" or a "slave". If this instance is a "slave" you will | |
1183 | - also need to fill in the masterUrl to point to a real machine. | |
1184 | - --> | |
1185 | - <!-- | |
1186 | - <lst name="master"> | |
1187 | - <str name="replicateAfter">commit</str> | |
1188 | - <str name="replicateAfter">startup</str> | |
1189 | - <str name="confFiles">schema.xml,stopwords.txt</str> | |
1190 | - </lst> | |
1191 | - --> | |
1192 | - <!-- | |
1193 | - <lst name="slave"> | |
1194 | - <str name="masterUrl">http://your-master-hostname:8983/solr</str> | |
1195 | - <str name="pollInterval">00:00:60</str> | |
1196 | - </lst> | |
1197 | - --> | |
1198 | - </requestHandler> | |
1199 | - | |
1200 | - <!-- Search Components | |
1201 | - | |
1202 | - Search components are registered to SolrCore and used by | |
1203 | - instances of SearchHandler (which can access them by name) | |
1204 | - | |
1205 | - By default, the following components are available: | |
1206 | - | |
1207 | - <searchComponent name="query" class="solr.QueryComponent" /> | |
1208 | - <searchComponent name="facet" class="solr.FacetComponent" /> | |
1209 | - <searchComponent name="mlt" class="solr.MoreLikeThisComponent" /> | |
1210 | - <searchComponent name="highlight" class="solr.HighlightComponent" /> | |
1211 | - <searchComponent name="stats" class="solr.StatsComponent" /> | |
1212 | - <searchComponent name="debug" class="solr.DebugComponent" /> | |
1213 | - | |
1214 | - Default configuration in a requestHandler would look like: | |
1215 | - | |
1216 | - <arr name="components"> | |
1217 | - <str>query</str> | |
1218 | - <str>facet</str> | |
1219 | - <str>mlt</str> | |
1220 | - <str>highlight</str> | |
1221 | - <str>stats</str> | |
1222 | - <str>debug</str> | |
1223 | - </arr> | |
1224 | - | |
1225 | - If you register a searchComponent to one of the standard names, | |
1226 | - that will be used instead of the default. | |
1227 | - | |
1228 | - To insert components before or after the 'standard' components, use: | |
1229 | - | |
1230 | - <arr name="first-components"> | |
1231 | - <str>myFirstComponentName</str> | |
1232 | - </arr> | |
1233 | - | |
1234 | - <arr name="last-components"> | |
1235 | - <str>myLastComponentName</str> | |
1236 | - </arr> | |
1237 | - | |
1238 | - NOTE: The component registered with the name "debug" will | |
1239 | - always be executed after the "last-components" | |
1240 | - | |
1241 | - --> | |
1242 | - | |
1243 | - <!-- Spell Check | |
1244 | - | |
1245 | - The spell check component can return a list of alternative spelling | |
1246 | - suggestions. | |
1247 | - | |
1248 | - http://wiki.apache.org/solr/SpellCheckComponent | |
1249 | - --> | |
1250 | - <searchComponent name="spellcheck" class="solr.SpellCheckComponent"> | |
1251 | - | |
1252 | - <str name="queryAnalyzerFieldType">text_general</str> | |
1253 | - | |
1254 | - <!-- Multiple "Spell Checkers" can be declared and used by this | |
1255 | - component | |
1256 | - --> | |
1257 | - | |
1258 | - <!-- a spellchecker built from a field of the main index --> | |
1259 | - <lst name="spellchecker"> | |
1260 | - <str name="name">default</str> | |
1261 | - <str name="field">text</str> | |
1262 | - <str name="classname">solr.DirectSolrSpellChecker</str> | |
1263 | - <!-- the spellcheck distance measure used, the default is the internal levenshtein --> | |
1264 | - <str name="distanceMeasure">internal</str> | |
1265 | - <!-- minimum accuracy needed to be considered a valid spellcheck suggestion --> | |
1266 | - <float name="accuracy">0.5</float> | |
1267 | - <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 --> | |
1268 | - <int name="maxEdits">2</int> | |
1269 | - <!-- the minimum shared prefix when enumerating terms --> | |
1270 | - <int name="minPrefix">1</int> | |
1271 | - <!-- maximum number of inspections per result. --> | |
1272 | - <int name="maxInspections">5</int> | |
1273 | - <!-- minimum length of a query term to be considered for correction --> | |
1274 | - <int name="minQueryLength">4</int> | |
1275 | - <!-- maximum threshold of documents a query term can appear to be considered for correction --> | |
1276 | - <float name="maxQueryFrequency">0.01</float> | |
1277 | - <!-- uncomment this to require suggestions to occur in 1% of the documents | |
1278 | - <float name="thresholdTokenFrequency">.01</float> | |
1279 | - --> | |
1280 | - </lst> | |
1281 | - | |
1282 | - <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage --> | |
1283 | - <lst name="spellchecker"> | |
1284 | - <str name="name">wordbreak</str> | |
1285 | - <str name="classname">solr.WordBreakSolrSpellChecker</str> | |
1286 | - <str name="field">name</str> | |
1287 | - <str name="combineWords">true</str> | |
1288 | - <str name="breakWords">true</str> | |
1289 | - <int name="maxChanges">10</int> | |
1290 | - </lst> | |
1291 | - | |
1292 | - <!-- a spellchecker that uses a different distance measure --> | |
1293 | - <!-- | |
1294 | - <lst name="spellchecker"> | |
1295 | - <str name="name">jarowinkler</str> | |
1296 | - <str name="field">spell</str> | |
1297 | - <str name="classname">solr.DirectSolrSpellChecker</str> | |
1298 | - <str name="distanceMeasure"> | |
1299 | - org.apache.lucene.search.spell.JaroWinklerDistance | |
1300 | - </str> | |
1301 | - </lst> | |
1302 | - --> | |
1303 | - | |
1304 | - <!-- a spellchecker that use an alternate comparator | |
1305 | - | |
1306 | - comparatorClass be one of: | |
1307 | - 1. score (default) | |
1308 | - 2. freq (Frequency first, then score) | |
1309 | - 3. A fully qualified class name | |
1310 | - --> | |
1311 | - <!-- | |
1312 | - <lst name="spellchecker"> | |
1313 | - <str name="name">freq</str> | |
1314 | - <str name="field">lowerfilt</str> | |
1315 | - <str name="classname">solr.DirectSolrSpellChecker</str> | |
1316 | - <str name="comparatorClass">freq</str> | |
1317 | - --> | |
1318 | - | |
1319 | - <!-- A spellchecker that reads the list of words from a file --> | |
1320 | - <!-- | |
1321 | - <lst name="spellchecker"> | |
1322 | - <str name="classname">solr.FileBasedSpellChecker</str> | |
1323 | - <str name="name">file</str> | |
1324 | - <str name="sourceLocation">spellings.txt</str> | |
1325 | - <str name="characterEncoding">UTF-8</str> | |
1326 | - <str name="spellcheckIndexDir">spellcheckerFile</str> | |
1327 | - </lst> | |
1328 | - --> | |
1329 | - </searchComponent> | |
1330 | - | |
1331 | - <!-- A request handler for demonstrating the spellcheck component. | |
1332 | - | |
1333 | - NOTE: This is purely as an example. The whole purpose of the | |
1334 | - SpellCheckComponent is to hook it into the request handler that | |
1335 | - handles your normal user queries so that a separate request is | |
1336 | - not needed to get suggestions. | |
1337 | - | |
1338 | - IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS | |
1339 | - NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM! | |
1340 | - | |
1341 | - See http://wiki.apache.org/solr/SpellCheckComponent for details | |
1342 | - on the request parameters. | |
1343 | - --> | |
1344 | - <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy"> | |
1345 | - <lst name="defaults"> | |
1346 | - <str name="df">text</str> | |
1347 | - <!-- Solr will use suggestions from both the 'default' spellchecker | |
1348 | - and from the 'wordbreak' spellchecker and combine them. | |
1349 | - collations (re-written queries) can include a combination of | |
1350 | - corrections from both spellcheckers --> | |
1351 | - <str name="spellcheck.dictionary">default</str> | |
1352 | - <str name="spellcheck.dictionary">wordbreak</str> | |
1353 | - <str name="spellcheck">on</str> | |
1354 | - <str name="spellcheck.extendedResults">true</str> | |
1355 | - <str name="spellcheck.count">10</str> | |
1356 | - <str name="spellcheck.alternativeTermCount">5</str> | |
1357 | - <str name="spellcheck.maxResultsForSuggest">5</str> | |
1358 | - <str name="spellcheck.collate">true</str> | |
1359 | - <str name="spellcheck.collateExtendedResults">true</str> | |
1360 | - <str name="spellcheck.maxCollationTries">10</str> | |
1361 | - <str name="spellcheck.maxCollations">5</str> | |
1362 | - </lst> | |
1363 | - <arr name="last-components"> | |
1364 | - <str>spellcheck</str> | |
1365 | - </arr> | |
1366 | - </requestHandler> | |
1367 | - | |
1368 | - <!-- Term Vector Component | |
1369 | - | |
1370 | - http://wiki.apache.org/solr/TermVectorComponent | |
1371 | - --> | |
1372 | - <searchComponent name="tvComponent" class="solr.TermVectorComponent"/> | |
1373 | - | |
1374 | - <!-- A request handler for demonstrating the term vector component | |
1375 | - | |
1376 | - This is purely as an example. | |
1377 | - | |
1378 | - In reality you will likely want to add the component to your | |
1379 | - already specified request handlers. | |
1380 | - --> | |
1381 | - <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy"> | |
1382 | - <lst name="defaults"> | |
1383 | - <str name="df">text</str> | |
1384 | - <bool name="tv">true</bool> | |
1385 | - </lst> | |
1386 | - <arr name="last-components"> | |
1387 | - <str>tvComponent</str> | |
1388 | - </arr> | |
1389 | - </requestHandler> | |
1390 | - | |
1391 | - <!-- Clustering Component | |
1392 | - | |
1393 | - You'll need to set the solr.clustering.enabled system property | |
1394 | - when running solr to run with clustering enabled: | |
1395 | - | |
1396 | - java -Dsolr.clustering.enabled=true -jar start.jar | |
1397 | - | |
1398 | - http://wiki.apache.org/solr/ClusteringComponent | |
1399 | - http://carrot2.github.io/solr-integration-strategies/ | |
1400 | - --> | |
1401 | - <searchComponent name="clustering" | |
1402 | - enable="${solr.clustering.enabled:false}" | |
1403 | - class="solr.clustering.ClusteringComponent" > | |
1404 | - <lst name="engine"> | |
1405 | - <str name="name">lingo</str> | |
1406 | - | |
1407 | - <!-- Class name of a clustering algorithm compatible with the Carrot2 framework. | |
1408 | - | |
1409 | - Currently available open source algorithms are: | |
1410 | - * org.carrot2.clustering.lingo.LingoClusteringAlgorithm | |
1411 | - * org.carrot2.clustering.stc.STCClusteringAlgorithm | |
1412 | - * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm | |
1413 | - | |
1414 | - See http://project.carrot2.org/algorithms.html for more information. | |
1415 | - | |
1416 | - A commercial algorithm Lingo3G (needs to be installed separately) is defined as: | |
1417 | - * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm | |
1418 | - --> | |
1419 | - <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str> | |
1420 | - | |
1421 | - <!-- Override location of the clustering algorithm's resources | |
1422 | - (attribute definitions and lexical resources). | |
1423 | - | |
1424 | - A directory from which to load algorithm-specific stop words, | |
1425 | - stop labels and attribute definition XMLs. | |
1426 | - | |
1427 | - For an overview of Carrot2 lexical resources, see: | |
1428 | - http://download.carrot2.org/head/manual/#chapter.lexical-resources | |
1429 | - | |
1430 | - For an overview of Lingo3G lexical resources, see: | |
1431 | - http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources | |
1432 | - --> | |
1433 | - <str name="carrot.resourcesDir">clustering/carrot2</str> | |
1434 | - </lst> | |
1435 | - | |
1436 | - <!-- An example definition for the STC clustering algorithm. --> | |
1437 | - <lst name="engine"> | |
1438 | - <str name="name">stc</str> | |
1439 | - <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str> | |
1440 | - </lst> | |
1441 | - | |
1442 | - <!-- An example definition for the bisecting kmeans clustering algorithm. --> | |
1443 | - <lst name="engine"> | |
1444 | - <str name="name">kmeans</str> | |
1445 | - <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str> | |
1446 | - </lst> | |
1447 | - </searchComponent> | |
1448 | - | |
1449 | - <!-- A request handler for demonstrating the clustering component | |
1450 | - | |
1451 | - This is purely as an example. | |
1452 | - | |
1453 | - In reality you will likely want to add the component to your | |
1454 | - already specified request handlers. | |
1455 | - --> | |
1456 | - <requestHandler name="/clustering" | |
1457 | - startup="lazy" | |
1458 | - enable="${solr.clustering.enabled:false}" | |
1459 | - class="solr.SearchHandler"> | |
1460 | - <lst name="defaults"> | |
1461 | - <bool name="clustering">true</bool> | |
1462 | - <bool name="clustering.results">true</bool> | |
1463 | - <!-- Field name with the logical "title" of a each document (optional) --> | |
1464 | - <str name="carrot.title">name</str> | |
1465 | - <!-- Field name with the logical "URL" of a each document (optional) --> | |
1466 | - <str name="carrot.url">id</str> | |
1467 | - <!-- Field name with the logical "content" of a each document (optional) --> | |
1468 | - <str name="carrot.snippet">features</str> | |
1469 | - <!-- Apply highlighter to the title/ content and use this for clustering. --> | |
1470 | - <bool name="carrot.produceSummary">true</bool> | |
1471 | - <!-- the maximum number of labels per cluster --> | |
1472 | - <!--<int name="carrot.numDescriptions">5</int>--> | |
1473 | - <!-- produce sub clusters --> | |
1474 | - <bool name="carrot.outputSubClusters">false</bool> | |
1475 | - | |
1476 | - <!-- Configure the remaining request handler parameters. --> | |
1477 | - <str name="defType">edismax</str> | |
1478 | - <str name="qf"> | |
1479 | - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 | |
1480 | - </str> | |
1481 | - <str name="q.alt">*:*</str> | |
1482 | - <str name="rows">10</str> | |
1483 | - <str name="fl">*,score</str> | |
1484 | - </lst> | |
1485 | - <arr name="last-components"> | |
1486 | - <str>clustering</str> | |
1487 | - </arr> | |
1488 | - </requestHandler> | |
1489 | - | |
1490 | - <!-- Terms Component | |
1491 | - | |
1492 | - http://wiki.apache.org/solr/TermsComponent | |
1493 | - | |
1494 | - A component to return terms and document frequency of those | |
1495 | - terms | |
1496 | - --> | |
1497 | - <searchComponent name="terms" class="solr.TermsComponent"/> | |
1498 | - | |
1499 | - <!-- A request handler for demonstrating the terms component --> | |
1500 | - <requestHandler name="/js" class="org.apache.solr.handler.js.JavaScriptRequestHandler" startup="lazy"/> | |
1501 | - <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy"> | |
1502 | - <lst name="defaults"> | |
1503 | - <bool name="terms">true</bool> | |
1504 | - <bool name="distrib">false</bool> | |
1505 | - </lst> | |
1506 | - <arr name="components"> | |
1507 | - <str>terms</str> | |
1508 | - </arr> | |
1509 | - </requestHandler> | |
1510 | - | |
1511 | - | |
1512 | - <!-- Query Elevation Component | |
1513 | - | |
1514 | - http://wiki.apache.org/solr/QueryElevationComponent | |
1515 | - | |
1516 | - a search component that enables you to configure the top | |
1517 | - results for a given query regardless of the normal lucene | |
1518 | - scoring. | |
1519 | - --> | |
1520 | - <searchComponent name="elevator" class="solr.QueryElevationComponent" > | |
1521 | - <!-- pick a fieldType to analyze queries --> | |
1522 | - <str name="queryFieldType">string</str> | |
1523 | - <str name="config-file">elevate.xml</str> | |
1524 | - </searchComponent> | |
1525 | - | |
1526 | - <!-- A request handler for demonstrating the elevator component --> | |
1527 | - <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy"> | |
1528 | - <lst name="defaults"> | |
1529 | - <str name="echoParams">explicit</str> | |
1530 | - <str name="df">text</str> | |
1531 | - </lst> | |
1532 | - <arr name="last-components"> | |
1533 | - <str>elevator</str> | |
1534 | - </arr> | |
1535 | - </requestHandler> | |
1536 | - | |
1537 | - <!-- Highlighting Component | |
1538 | - | |
1539 | - http://wiki.apache.org/solr/HighlightingParameters | |
1540 | - --> | |
1541 | - <searchComponent class="solr.HighlightComponent" name="highlight"> | |
1542 | - <highlighting> | |
1543 | - <!-- Configure the standard fragmenter --> | |
1544 | - <!-- This could most likely be commented out in the "default" case --> | |
1545 | - <fragmenter name="gap" | |
1546 | - default="true" | |
1547 | - class="solr.highlight.GapFragmenter"> | |
1548 | - <lst name="defaults"> | |
1549 | - <int name="hl.fragsize">100</int> | |
1550 | - </lst> | |
1551 | - </fragmenter> | |
1552 | - | |
1553 | - <!-- A regular-expression-based fragmenter | |
1554 | - (for sentence extraction) | |
1555 | - --> | |
1556 | - <fragmenter name="regex" | |
1557 | - class="solr.highlight.RegexFragmenter"> | |
1558 | - <lst name="defaults"> | |
1559 | - <!-- slightly smaller fragsizes work better because of slop --> | |
1560 | - <int name="hl.fragsize">70</int> | |
1561 | - <!-- allow 50% slop on fragment sizes --> | |
1562 | - <float name="hl.regex.slop">0.5</float> | |
1563 | - <!-- a basic sentence pattern --> | |
1564 | - <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str> | |
1565 | - </lst> | |
1566 | - </fragmenter> | |
1567 | - | |
1568 | - <!-- Configure the standard formatter --> | |
1569 | - <formatter name="html" | |
1570 | - default="true" | |
1571 | - class="solr.highlight.HtmlFormatter"> | |
1572 | - <lst name="defaults"> | |
1573 | - <str name="hl.simple.pre"><![CDATA[<em>]]></str> | |
1574 | - <str name="hl.simple.post"><![CDATA[</em>]]></str> | |
1575 | - </lst> | |
1576 | - </formatter> | |
1577 | - | |
1578 | - <!-- Configure the standard encoder --> | |
1579 | - <encoder name="html" | |
1580 | - class="solr.highlight.HtmlEncoder" /> | |
1581 | - | |
1582 | - <!-- Configure the standard fragListBuilder --> | |
1583 | - <fragListBuilder name="simple" | |
1584 | - class="solr.highlight.SimpleFragListBuilder"/> | |
1585 | - | |
1586 | - <!-- Configure the single fragListBuilder --> | |
1587 | - <fragListBuilder name="single" | |
1588 | - class="solr.highlight.SingleFragListBuilder"/> | |
1589 | - | |
1590 | - <!-- Configure the weighted fragListBuilder --> | |
1591 | - <fragListBuilder name="weighted" | |
1592 | - default="true" | |
1593 | - class="solr.highlight.WeightedFragListBuilder"/> | |
1594 | - | |
1595 | - <!-- default tag FragmentsBuilder --> | |
1596 | - <fragmentsBuilder name="default" | |
1597 | - default="true" | |
1598 | - class="solr.highlight.ScoreOrderFragmentsBuilder"> | |
1599 | - <!-- | |
1600 | - <lst name="defaults"> | |
1601 | - <str name="hl.multiValuedSeparatorChar">/</str> | |
1602 | - </lst> | |
1603 | - --> | |
1604 | - </fragmentsBuilder> | |
1605 | - | |
1606 | - <!-- multi-colored tag FragmentsBuilder --> | |
1607 | - <fragmentsBuilder name="colored" | |
1608 | - class="solr.highlight.ScoreOrderFragmentsBuilder"> | |
1609 | - <lst name="defaults"> | |
1610 | - <str name="hl.tag.pre"><![CDATA[ | |
1611 | - <b style="background:yellow">,<b style="background:lawgreen">, | |
1612 | - <b style="background:aquamarine">,<b style="background:magenta">, | |
1613 | - <b style="background:palegreen">,<b style="background:coral">, | |
1614 | - <b style="background:wheat">,<b style="background:khaki">, | |
1615 | - <b style="background:lime">,<b style="background:deepskyblue">]]></str> | |
1616 | - <str name="hl.tag.post"><![CDATA[</b>]]></str> | |
1617 | - </lst> | |
1618 | - </fragmentsBuilder> | |
1619 | - | |
1620 | - <boundaryScanner name="default" | |
1621 | - default="true" | |
1622 | - class="solr.highlight.SimpleBoundaryScanner"> | |
1623 | - <lst name="defaults"> | |
1624 | - <str name="hl.bs.maxScan">10</str> | |
1625 | - <str name="hl.bs.chars">.,!? 	 </str> | |
1626 | - </lst> | |
1627 | - </boundaryScanner> | |
1628 | - | |
1629 | - <boundaryScanner name="breakIterator" | |
1630 | - class="solr.highlight.BreakIteratorBoundaryScanner"> | |
1631 | - <lst name="defaults"> | |
1632 | - <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE --> | |
1633 | - <str name="hl.bs.type">WORD</str> | |
1634 | - <!-- language and country are used when constructing Locale object. --> | |
1635 | - <!-- And the Locale object will be used when getting instance of BreakIterator --> | |
1636 | - <str name="hl.bs.language">en</str> | |
1637 | - <str name="hl.bs.country">US</str> | |
1638 | - </lst> | |
1639 | - </boundaryScanner> | |
1640 | - </highlighting> | |
1641 | - </searchComponent> | |
1642 | - | |
1643 | - <!-- Update Processors | |
1644 | - | |
1645 | - Chains of Update Processor Factories for dealing with Update | |
1646 | - Requests can be declared, and then used by name in Update | |
1647 | - Request Processors | |
1648 | - | |
1649 | - http://wiki.apache.org/solr/UpdateRequestProcessor | |
1650 | - | |
1651 | - --> | |
1652 | - <!-- Deduplication | |
1653 | - | |
1654 | - An example dedup update processor that creates the "id" field | |
1655 | - on the fly based on the hash code of some other fields. This | |
1656 | - example has overwriteDupes set to false since we are using the | |
1657 | - id field as the signatureField and Solr will maintain | |
1658 | - uniqueness based on that anyway. | |
1659 | - | |
1660 | - --> | |
1661 | - <!-- | |
1662 | - <updateRequestProcessorChain name="dedupe"> | |
1663 | - <processor class="solr.processor.SignatureUpdateProcessorFactory"> | |
1664 | - <bool name="enabled">true</bool> | |
1665 | - <str name="signatureField">id</str> | |
1666 | - <bool name="overwriteDupes">false</bool> | |
1667 | - <str name="fields">name,features,cat</str> | |
1668 | - <str name="signatureClass">solr.processor.Lookup3Signature</str> | |
1669 | - </processor> | |
1670 | - <processor class="solr.LogUpdateProcessorFactory" /> | |
1671 | - <processor class="solr.RunUpdateProcessorFactory" /> | |
1672 | - </updateRequestProcessorChain> | |
1673 | - --> | |
1674 | - | |
1675 | - <!-- Language identification | |
1676 | - | |
1677 | - This example update chain identifies the language of the incoming | |
1678 | - documents using the langid contrib. The detected language is | |
1679 | - written to field language_s. No field name mapping is done. | |
1680 | - The fields used for detection are text, title, subject and description, | |
1681 | - making this example suitable for detecting languages form full-text | |
1682 | - rich documents injected via ExtractingRequestHandler. | |
1683 | - See more about langId at http://wiki.apache.org/solr/LanguageDetection | |
1684 | - --> | |
1685 | - <!-- | |
1686 | - <updateRequestProcessorChain name="langid"> | |
1687 | - <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory"> | |
1688 | - <str name="langid.fl">text,title,subject,description</str> | |
1689 | - <str name="langid.langField">language_s</str> | |
1690 | - <str name="langid.fallback">en</str> | |
1691 | - </processor> | |
1692 | - <processor class="solr.LogUpdateProcessorFactory" /> | |
1693 | - <processor class="solr.RunUpdateProcessorFactory" /> | |
1694 | - </updateRequestProcessorChain> | |
1695 | - --> | |
1696 | - | |
1697 | - <!-- Script update processor | |
1698 | - | |
1699 | - This example hooks in an update processor implemented using JavaScript. | |
1700 | - | |
1701 | - See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor | |
1702 | - --> | |
1703 | - <!-- | |
1704 | - <updateRequestProcessorChain name="script"> | |
1705 | - <processor class="solr.StatelessScriptUpdateProcessorFactory"> | |
1706 | - <str name="script">update-script.js</str> | |
1707 | - <lst name="params"> | |
1708 | - <str name="config_param">example config parameter</str> | |
1709 | - </lst> | |
1710 | - </processor> | |
1711 | - <processor class="solr.RunUpdateProcessorFactory" /> | |
1712 | - </updateRequestProcessorChain> | |
1713 | - --> | |
1714 | - | |
1715 | - <!-- Response Writers | |
1716 | - | |
1717 | - http://wiki.apache.org/solr/QueryResponseWriter | |
1718 | - | |
1719 | - Request responses will be written using the writer specified by | |
1720 | - the 'wt' request parameter matching the name of a registered | |
1721 | - writer. | |
1722 | - | |
1723 | - The "default" writer is the default and will be used if 'wt' is | |
1724 | - not specified in the request. | |
1725 | - --> | |
1726 | - <!-- The following response writers are implicitly configured unless | |
1727 | - overridden... | |
1728 | - --> | |
1729 | - <!-- | |
1730 | - <queryResponseWriter name="xml" | |
1731 | - default="true" | |
1732 | - class="solr.XMLResponseWriter" /> | |
1733 | - <queryResponseWriter name="json" class="solr.JSONResponseWriter"/> | |
1734 | - <queryResponseWriter name="python" class="solr.PythonResponseWriter"/> | |
1735 | - <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/> | |
1736 | - <queryResponseWriter name="php" class="solr.PHPResponseWriter"/> | |
1737 | - <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/> | |
1738 | - <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/> | |
1739 | - <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/> | |
1740 | - --> | |
1741 | - | |
1742 | - <queryResponseWriter name="json" class="solr.JSONResponseWriter"> | |
1743 | - <!-- For the purposes of the tutorial, JSON responses are written as | |
1744 | - plain text so that they are easy to read in *any* browser. | |
1745 | - If you expect a MIME type of "application/json" just remove this override. | |
1746 | - --> | |
1747 | - <str name="content-type">text/plain; charset=UTF-8</str> | |
1748 | - </queryResponseWriter> | |
1749 | - | |
1750 | - <!-- | |
1751 | - Custom response writers can be declared as needed... | |
1752 | - --> | |
1753 | - <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/> | |
1754 | - | |
1755 | - | |
1756 | - <!-- XSLT response writer transforms the XML output by any xslt file found | |
1757 | - in Solr's conf/xslt directory. Changes to xslt files are checked for | |
1758 | - every xsltCacheLifetimeSeconds. | |
1759 | - --> | |
1760 | - <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter"> | |
1761 | - <int name="xsltCacheLifetimeSeconds">5</int> | |
1762 | - </queryResponseWriter> | |
1763 | - | |
1764 | - <!-- Query Parsers | |
1765 | - | |
1766 | - http://wiki.apache.org/solr/SolrQuerySyntax | |
1767 | - | |
1768 | - Multiple QParserPlugins can be registered by name, and then | |
1769 | - used in either the "defType" param for the QueryComponent (used | |
1770 | - by SearchHandler) or in LocalParams | |
1771 | - --> | |
1772 | - <!-- example of registering a query parser --> | |
1773 | - <!-- | |
1774 | - <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/> | |
1775 | - --> | |
1776 | - | |
1777 | - <!-- Function Parsers | |
1778 | - | |
1779 | - http://wiki.apache.org/solr/FunctionQuery | |
1780 | - | |
1781 | - Multiple ValueSourceParsers can be registered by name, and then | |
1782 | - used as function names when using the "func" QParser. | |
1783 | - --> | |
1784 | - <!-- example of registering a custom function parser --> | |
1785 | - <!-- | |
1786 | - <valueSourceParser name="myfunc" | |
1787 | - class="com.mycompany.MyValueSourceParser" /> | |
1788 | - --> | |
1789 | - | |
1790 | - | |
1791 | - <!-- Document Transformers | |
1792 | - http://wiki.apache.org/solr/DocTransformers | |
1793 | - --> | |
1794 | - <!-- | |
1795 | - Could be something like: | |
1796 | - <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" > | |
1797 | - <int name="connection">jdbc://....</int> | |
1798 | - </transformer> | |
1799 | - | |
1800 | - To add a constant value to all docs, use: | |
1801 | - <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" > | |
1802 | - <int name="value">5</int> | |
1803 | - </transformer> | |
1804 | - | |
1805 | - If you want the user to still be able to change it with _value:something_ use this: | |
1806 | - <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" > | |
1807 | - <double name="defaultValue">5</double> | |
1808 | - </transformer> | |
1809 | - | |
1810 | - If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The | |
1811 | - EditorialMarkerFactory will do exactly that: | |
1812 | - <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" /> | |
1813 | - --> | |
1814 | - | |
1815 | - | |
1816 | - <!-- Legacy config for the admin interface --> | |
1817 | - <admin> | |
1818 | - <defaultQuery>*:*</defaultQuery> | |
1819 | - </admin> | |
1820 | - | |
1821 | -</config> |
scripts/Arquivos/solr/solrinit
... | ... | @@ -1,45 +0,0 @@ |
1 | -#!/bin/bash | |
2 | -# chkconfig: 2345 95 20 | |
3 | -# description: Solr | |
4 | -# processname: myscript | |
5 | -# | |
6 | -#----------------------------------------------------- | |
7 | -# Script for running solr as a service. | |
8 | -# | |
9 | -# Usage: service solr {start|stop|restart|status}" | |
10 | -# | |
11 | -#----------------------------------------------------- | |
12 | -# This should be placed in /etc/init.d | |
13 | - | |
14 | -. /etc/rc.d/init.d/functions | |
15 | - | |
16 | -# Path to pid file | |
17 | -PIDFILE=/var/run/solr.pid | |
18 | - | |
19 | -# Service name | |
20 | -NAME="Solr" | |
21 | - | |
22 | -# Service description | |
23 | -DESC="start/stop Solr Server" | |
24 | - | |
25 | -SOLR_INIT="/usr/share/solr/start.sh" | |
26 | - | |
27 | -case $1 in | |
28 | - start) | |
29 | - action "Starting ${NAME}: " daemon --pidfile $PIDFILE $SOLR_INIT | |
30 | - ;; | |
31 | - stop) | |
32 | - action "Stopping ${NAME}: " killproc -p $PIDFILE | |
33 | - ;; | |
34 | - restart) | |
35 | - $0 stop | |
36 | - $0 start | |
37 | - ;; | |
38 | - status) | |
39 | - status -p $PIDFILE solr | |
40 | - ;; | |
41 | - *) | |
42 | - echo "Usage: $0 {start|stop|restart|status}" | |
43 | - exit 3 | |
44 | - ;; | |
45 | -esac | |
46 | 0 | \ No newline at end of file |
scripts/Arquivos/solr/start.sh
... | ... | @@ -1,20 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -# Directory where solr is installed | |
4 | -SOLR_HOME=/usr/share/solr/example | |
5 | - | |
6 | -# Java options for Solr | |
7 | -OPTIONS="-Xmx1024m" | |
8 | - | |
9 | -# Path to pid file | |
10 | -PIDFILE=/var/run/solr.pid | |
11 | - | |
12 | -# Path to log file | |
13 | -LOG_FILE=/var/log/solr.log | |
14 | - | |
15 | -COMMAND="java $OPTIONS -jar start.jar" | |
16 | - | |
17 | -cd $SOLR_HOME | |
18 | -nohup $COMMAND > $LOG_FILE 2>&1 & | |
19 | -echo $! > $PIDFILE | |
20 | -exit $? |
scripts/colab.sh
... | ... | @@ -1,204 +0,0 @@ |
1 | -#!/bin/sh | |
2 | -#Instalação do Colab | |
3 | -#------------------- | |
4 | -# | |
5 | -#Siga os passo na máquina destinada ao Colab | |
6 | - | |
7 | -IP_HOSTS=$1 | |
8 | -COLAB_IP=$2 | |
9 | -COLAB_PORT=$3 | |
10 | - | |
11 | -if [[ ! "$IP_HOSTS" || ! "$COLAB_IP" || ! "$COLAB_PORT" ]] | |
12 | - then | |
13 | - echo " Parametros nao encontrados. Utiliza o caminho absoluto para o arquivo." | |
14 | - echo "" | |
15 | - echo " ./colab.sh <PATH_TO_IP_HOSTS.YML> <IP_COLAB_EXTERN> <PORT> " | |
16 | - echo "" | |
17 | - echo "Utilize o modelo de ips: | |
18 | - wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/colab/ipconfig.yml -O /tmp/ipconfig.yml | |
19 | - | |
20 | -Exemplo: ./colab.sh /tmp/ipconfig.yml 127.0.0.1 8000 | |
21 | -" | |
22 | - exit -1 | |
23 | -fi | |
24 | - | |
25 | - | |
26 | -# | |
27 | -#*NOTE:* | |
28 | -# | |
29 | -# Libere um acesso externo para esta máquina, pois o site do colab será acessado por esta máquina. | |
30 | -# | |
31 | -#Instale as ferramentas de desenvolvimento do python e algumas dependências para compilar o python | |
32 | -# | |
33 | -#.. code-block:: | |
34 | -# | |
35 | - sudo yum groupinstall "Development tools" -y | |
36 | - sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel libxslt-devel vim -y | |
37 | -# | |
38 | -#Faça o download e compile o Python 2.7 | |
39 | -# | |
40 | -#.. code-block:: | |
41 | -# | |
42 | - cd /tmp | |
43 | - sudo wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz | |
44 | - sudo tar xf Python-2.7.6.tar.xz | |
45 | - cd Python-2.7.6 | |
46 | - sudo ./configure --prefix=/usr/local | |
47 | - sudo make | |
48 | -# | |
49 | -#Instale o python 2.7 como um python alternativo | |
50 | -# | |
51 | -#.. code-block:: | |
52 | -# | |
53 | - sudo make altinstall | |
54 | -# | |
55 | -#Atualize a variável PATH para executar o python2.7 | |
56 | -# | |
57 | -#.. code-block:: | |
58 | -# | |
59 | - sudo sh -c "echo 'export PATH=$PATH:/usr/local/bin/' >> ~/.bashrc" | |
60 | - sudo sh -c "source ~/.bashrc" | |
61 | -# | |
62 | -#Instale o easy_install para o python 2.7 | |
63 | -# | |
64 | -#.. code-block:: | |
65 | -# | |
66 | - cd /tmp | |
67 | - sudo wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | |
68 | - sudo /usr/local/bin/python2.7 ez_setup.py | |
69 | -# | |
70 | -#Instale o pip 2.7 | |
71 | -# | |
72 | -#.. code-block:: | |
73 | -# | |
74 | - sudo /usr/local/bin/easy_install-2.7 pip | |
75 | -# | |
76 | -#Instale alguns pacotes adicionais do python | |
77 | -# | |
78 | -#.. code-block:: | |
79 | -# | |
80 | - sudo yum remove libevent -y | |
81 | - sudo yum install mercurial libevent-devel python-devel -y | |
82 | -# | |
83 | -#Edite o arquivo sudores para executar o ``python2.7`` como sudo | |
84 | -# | |
85 | -# | |
86 | -#Mude a linha | |
87 | -# | |
88 | -# | |
89 | - sudo sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin/' /etc/sudoers | |
90 | -# | |
91 | -#Instalando o Django 1.6 | |
92 | -# | |
93 | -#Instale o django e o uwsgi | |
94 | -# | |
95 | -#.. code-block:: | |
96 | -# | |
97 | - sudo pip2.7 install django | |
98 | - sudo pip2.7 install uwsgi | |
99 | -# | |
100 | -#Instale o Colab | |
101 | -# | |
102 | -#Instale o git e clone o repositório do colab | |
103 | -# | |
104 | -#.. code-block:: | |
105 | - | |
106 | - #Verifica se git instalado para não conflitar com gitlab | |
107 | - git_loc=`type -p $1` | |
108 | - if [[ ! "$git_loc" ]] | |
109 | - then | |
110 | - sudo yum install git -y | |
111 | - fi | |
112 | - | |
113 | - cd /opt | |
114 | - sudo git clone https://github.com/colab-community/colab.git -b dev_spb | |
115 | -# | |
116 | -#Instale os pré-requisitos do colab | |
117 | -# | |
118 | -#.. code-block:: | |
119 | -# | |
120 | - sudo yum install postgresql-devel -y #Foi preciso adicionar esta linha quando o postgrsql não é instalado na mesma máquina | |
121 | - sudo pip2.7 install mimeparse | |
122 | - sudo pip2.7 install -r /opt/colab/requirements.txt | |
123 | -# | |
124 | -#Crie o arquivo local_settings na pasta src/colab | |
125 | -# | |
126 | -#.. code-block:: | |
127 | -# | |
128 | - sudo cp /opt/colab/src/colab/local_settings-dev.py /opt/colab/src/colab/local_settings.py | |
129 | -# | |
130 | -#Edite o arquivo local_settings criado, nele deverão ser alterados os IPs das máquinas utilizadas | |
131 | -# | |
132 | -#.. code-block:: | |
133 | -# | |
134 | - TRAC_IP=`sed -n 1p $1 | grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"` | |
135 | - GITLAB_IP=`sed -n 2p $1 | grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"` | |
136 | - REDMINE_IP=`sed -n 3p $1 | grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"` | |
137 | - | |
138 | - | |
139 | -#Troque os IPs das seguintes linhas | |
140 | -# | |
141 | -#.. code-block:: | |
142 | -# | |
143 | - sudo sed -i "s/http:\/\/localhost:5000\/trac\//http:\/\/$TRAC_IP:5000\/trac\//g" /opt/colab/src/colab/local_settings.py | |
144 | - sudo sed -i "s/http:\/\/localhost:8090\/gitlab\//http:\/\/$GITLAB_IP:8090\/gitlab\//g" /opt/colab/src/colab/local_settings.py | |
145 | - sudo sed -i "s/http:\/\/localhost:9080\/redmine\//http:\/\/$REDMINE_IP:9080\/redmine\//g" /opt/colab/src/colab/local_settings.py | |
146 | - | |
147 | -#Na máquina do colab, sincronize e migre o banco de dados. | |
148 | -# | |
149 | -#.. code-block:: | |
150 | -# | |
151 | -#Passo adicionado: Recebendo o IP onde está instalado o Postgresql | |
152 | - | |
153 | - DATABASE_IP=`sed -n 4p $1 | grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"` | |
154 | - | |
155 | - sudo sed -i "s/DATABASES\['default'\]\['HOST'\] = '[^']\+'/DATABASES\['default'\]\['HOST'\] = '$DATABASE_IP'/g" /opt/colab/src/colab/local_settings.py | |
156 | - sudo sed -i "s/DATABASES\['trac'\]\['HOST'\] = '[^']\+'/DATABASES\['trac'\]\['HOST'\] = '$DATABASE_IP'/g" /opt/colab/src/colab/local_settings.py | |
157 | - | |
158 | - cd /opt/colab/src | |
159 | - python2.7 manage.py syncdb | |
160 | - python2.7 manage.py migrate | |
161 | - | |
162 | -#Atualize o index com o solr, para executar esta ação o solr já deve estar funcionando na máquina voltada para o Solr | |
163 | -# | |
164 | -#.. code-block:: | |
165 | -# | |
166 | - SOLR_IP=`sed -n 5p $1 | grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"` | |
167 | - sudo sed -i "s/HAYSTACK_CONNECTIONS\['default'\]\['URL'\] = '[^']\+'/HAYSTACK_CONNECTIONS\['default'\]\['URL'\] = 'http:\/\/$SOLR_IP:8983\/solr\/'/g" /opt/colab/src/colab/local_settings.py | |
168 | - | |
169 | - cd /opt/colab/src | |
170 | - python2.7 manage.py update_index | |
171 | - | |
172 | -#Importe os e-mails do mailman | |
173 | -# | |
174 | -#.. code-block:: | |
175 | -# | |
176 | - sudo python2.7 /opt/colab/src/manage.py import_emails | |
177 | -# | |
178 | -#Crie os Cronjobs para rodar em background a importação de email e a atualização do index | |
179 | -# | |
180 | -#.. code-block:: | |
181 | -# | |
182 | - sudo sh -c "echo \"5 * * * * /usr/bin/python2.7 /opt/colab/src/manage.py import_emails | |
183 | -45 * * * * /usr/bin/python2.7 /opt/colab/src/manage.py update_index\" > /tmp/crontabs" | |
184 | - sudo crontab /tmp/crontabs | |
185 | - | |
186 | -#Instale a inicialização do colab como serviço | |
187 | -# Adicionando o repositório PUIAS(para o supervisor) | |
188 | -sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
189 | -sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-puias | |
190 | - | |
191 | -sudo yum install supervisor -y | |
192 | - | |
193 | -sudo sh -c "echo \"[program:colab] | |
194 | -command=/usr/local/bin/python2.7 /opt/colab/src/manage.py runserver $2:$3 | |
195 | -directory=/opt/colab | |
196 | -user=colab | |
197 | -autostart=true | |
198 | -autorestart=false | |
199 | -redirect_stderr=true\" >> /etc/supervisord.conf" | |
200 | - | |
201 | - | |
202 | -## 12. Reinicie o supervisor | |
203 | - | |
204 | -sudo service supervisord restart |
scripts/gitlab.sh
... | ... | @@ -1,87 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -#To show the debug log | |
4 | -set -x | |
5 | - | |
6 | -DATABASE_HOST=$1 | |
7 | -LOCALHOST=$2 | |
8 | - | |
9 | -if [[ ! "$DATABASE_HOST" && ! "$LOCALHOST" ]] | |
10 | - then | |
11 | - echo "Uso: ./gitlab.sh <DATABASE_HOST> <EXTERNAL_IP>" | |
12 | - exit -1 | |
13 | -fi | |
14 | - | |
15 | -# [ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" | |
16 | - | |
17 | -sudo yum install -y wget yum-utils | |
18 | - | |
19 | -sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 https://www.fedoraproject.org/static/0608B895.txt | |
20 | -sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 | |
21 | - | |
22 | -sudo wget -O /etc/yum.repos.d/PUIAS_6_computational.repo https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/install/centos/PUIAS_6_computational.repo | |
23 | -sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-puias http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias | |
24 | -sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-puias | |
25 | -sudo yum-config-manager --enable epel --enable PUIAS_6_computational | |
26 | - | |
27 | -sudo yum -y groupinstall 'Development Tools' | |
28 | -sudo yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc sqlite-devel libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui redis crontabs logwatch logrotate postfix zlib-devel perl-CPAN gettext curl-devel gettext-devel openssl-devel perl-Time-HiRes.x86_64 | |
29 | - | |
30 | -sudo chkconfig redis on | |
31 | -sudo service redis start | |
32 | - | |
33 | -sudo yum -y remove git | |
34 | - | |
35 | -mkdir /tmp/git && cd /tmp/git | |
36 | -wget https://git-core.googlecode.com/files/git-1.9.0.tar.gz | |
37 | -tar xzf git-1.9.0.tar.gz | |
38 | -cd git-1.9.0/ | |
39 | -./configure | |
40 | -make | |
41 | -sudo make prefix=/usr/local install | |
42 | - | |
43 | -sudo adduser --system --shell /bin/bash --comment 'GitLab' --create-home --home-dir /home/git/ git | |
44 | -sudo bash -c "echo 'git ALL=(ALL) ALL' > /etc/sudoers.d/git" | |
45 | -sudo -iu git rvm use 2.0.0@gitlab --default | |
46 | - | |
47 | -sudo -iu git /usr/local/bin/git clone https://gitlab.com/gitlab-org/gitlab-shell.git | |
48 | -sudo -iu git /usr/local/bin/git --git-dir=/home/git/gitlab-shell/.git --work-tree=/home/git/gitlab-shell/ reset --hard v1.9.3 | |
49 | -sudo -iu git cp /home/git/gitlab-shell/config.yml.example /home/git/gitlab-shell/config.yml | |
50 | -sudo -iu git ruby /home/git/gitlab-shell/bin/install | |
51 | -sudo restorecon -Rv /home/git/.ssh | |
52 | - | |
53 | -sudo -iu git /usr/local/bin/git clone https://github.com/colab-community/gitlabhq.git -b spb-stable /home/git/gitlab | |
54 | -sudo -iu git cp /home/git/gitlab/config/gitlab.yml.example /home/git/gitlab/config/gitlab.yml | |
55 | -sudo -iu git mkdir /home/git/gitlab-satellites | |
56 | -sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites | |
57 | -sudo -iu git cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/config/unicorn.rb | |
58 | -sudo -iu git cp /home/git/gitlab/config/initializers/rack_attack.rb.example /home/git/gitlab/config/initializers/rack_attack.rb | |
59 | -sudo sed -i "s/gitlab_url: \"http:\/\/localhost\/\"/gitlab_url: \"http:\/\/$LOCALHOST:8090\/gitlab\//" /home/git/gitlab-shell/config.yml | |
60 | - | |
61 | -sudo -iu git /usr/local/bin/git config --global user.name "GitLab" | |
62 | -sudo -iu git /usr/local/bin/git config --global user.email "gitlab@localhost" | |
63 | -sudo -iu git /usr/local/bin/git config --global core.autocrlf input | |
64 | -sudo su - git -c "echo 'production: | |
65 | - adapter: postgresql | |
66 | - encoding: unicode | |
67 | - database: gitlabhq_production | |
68 | - pool: 10 | |
69 | - username: git | |
70 | - host: $DATABASE_HOST' > /home/git/gitlab/config/database.yml" | |
71 | -sudo -iu git -H chmod o-rwx /home/git/gitlab/config/database.yml | |
72 | - | |
73 | -# Baixando as dependencias, criando o banco, instalando de fato | |
74 | -sudo su - git -c 'cd /home/git/gitlab && bundle config build.pg' | |
75 | -sudo su - git -c 'cd /home/git/gitlab && bundle config build.nokogiri --use-system-libraries' | |
76 | -sudo su - git -c 'cd /home/git/gitlab && bundle install --verbose --deployment --without development test mysql aws' | |
77 | -sudo su - git -c 'cd /home/git/gitlab && echo yes | bundle exec rake db:create db:migrate RAILS_ENV=production' | |
78 | -sudo su - git -c 'cd /home/git/gitlab && echo yes | bundle exec rake gitlab:setup RAILS_ENV=production' | |
79 | -sudo su - git -c 'cd /home/git/gitlab bundle exec rake assets:precompile RAILS_ENV=production' | |
80 | - | |
81 | -# Configurando o servico do gitlab | |
82 | -sudo wget -O /etc/init.d/gitlab https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/gitlab-unicorn | |
83 | -sudo chmod +x /etc/init.d/gitlab | |
84 | -sudo chkconfig --add gitlab | |
85 | -sudo chkconfig gitlab on | |
86 | -sudo cat /home/git/gitlab/lib/support/logrotate/gitlab > /etc/logrotate.d/gitlab | |
87 | -sudo service gitlab restart |
scripts/mailman.sh
... | ... | @@ -1,89 +0,0 @@ |
1 | -#!/bin/sh | |
2 | - | |
3 | -set -x | |
4 | - | |
5 | -if [[ ! "$1" || ! "$2" ]] | |
6 | - then | |
7 | - echo " Parametros nao encontrados." | |
8 | - echo " ./mailman.sh <ADMIN_MAIL> <ADMIN_PASSWD> " | |
9 | - exit -1 | |
10 | -fi | |
11 | - | |
12 | -LIST_NAME="mailman" | |
13 | -ADMIN_MAIL=$1 | |
14 | -ADMIN_PASSWD=$2 | |
15 | - | |
16 | -sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
17 | - | |
18 | -sudo echo '[nginx] | |
19 | -name=nginx repo | |
20 | -baseurl=http://nginx.org/packages/centos/6/$basearch/ | |
21 | -gpgcheck=0 | |
22 | -enabled=1' > /etc/yum.repos.d/nginx.repo | |
23 | - | |
24 | -sudo yum install nginx wget fcgi-devel git -y | |
25 | -sudo chkconfig nginx on | |
26 | - | |
27 | -cd /tmp | |
28 | -sudo git clone https://github.com/gnosek/fcgiwrap.git | |
29 | -sudo yum groupinstall "Development tools" -y | |
30 | -cd /tmp/fcgiwrap | |
31 | -sudo autoreconf -i | |
32 | -sudo ./configure | |
33 | -sudo make && make install | |
34 | - | |
35 | -sudo yum install spawn-fcgi -y | |
36 | - | |
37 | -sudo sh -c "echo 'FCGI_SOCKET=/var/run/fcgiwrap.socket' >> /etc/sysconfig/spawn-fcgi" | |
38 | -sudo sh -c "echo 'FCGI_PROGRAM=/usr/local/sbin/fcgiwrap' >> /etc/sysconfig/spawn-fcgi" | |
39 | -sudo sh -c "echo 'FCGI_USER=apache' >> /etc/sysconfig/spawn-fcgi" | |
40 | -sudo sh -c "echo 'FCGI_GROUP=apache' >> /etc/sysconfig/spawn-fcgi" | |
41 | -sudo sh -c "echo 'FCGI_EXTRA_OPTIONS=\"-M 0770\"' >> /etc/sysconfig/spawn-fcgi" | |
42 | -sudo sh -c "echo 'OPTIONS=\"-u \$FCGI_USER -g \$FCGI_GROUP -s \$FCGI_SOCKET -S \$FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- \$FCGI_PROGRAM\"' >> /etc/sysconfig/spawn-fcgi" | |
43 | - | |
44 | -sudo yum install mailman -y | |
45 | - | |
46 | -echo | sudo /usr/lib/mailman/bin/newlist $LIST_NAME $ADMIN_MAIL $ADMIN_PASSWD | |
47 | - | |
48 | -sudo sh -c "echo >> /etc/aliases" | |
49 | -sudo sh -c "echo '##$LIST_NAME mailing list' >> /etc/aliases" | |
50 | -sudo sh -c "echo '$LIST_NAME: \"|/usr/lib/mailman/mail/mailman post $LIST_NAME\"' >> /etc/aliases" | |
51 | -sudo sh -c "echo '$LIST_NAME-admin: \"|/usr/lib/mailman/mail/mailman admin $LIST_NAME\"' >> /etc/aliases" | |
52 | -sudo sh -c "echo '$LIST_NAME-bounces: \"|/usr/lib/mailman/mail/mailman bounces $LIST_NAME\"' >> /etc/aliases" | |
53 | -sudo sh -c "echo '$LIST_NAME-confirm: \"|/usr/lib/mailman/mail/mailman confirm $LIST_NAME\"' >> /etc/aliases" | |
54 | -sudo sh -c "echo '$LIST_NAME-join: \"|/usr/lib/mailman/mail/mailman join $LIST_NAME\"' >> /etc/aliases" | |
55 | -sudo sh -c "echo '$LIST_NAME-leave: \"|/usr/lib/mailman/mail/mailman leave $LIST_NAME\"' >> /etc/aliases" | |
56 | -sudo sh -c "echo '$LIST_NAME-owner: \"|/usr/lib/mailman/mail/mailman owner $LIST_NAME\"' >> /etc/aliases" | |
57 | -sudo sh -c "echo '$LIST_NAME-request: \"|/usr/lib/mailman/mail/mailman request $LIST_NAME\"' >> /etc/aliases" | |
58 | -sudo sh -c "echo '$LIST_NAME-subscribe: \"|/usr/lib/mailman/mail/mailman subscribe $LIST_NAME\"' >> /etc/aliases" | |
59 | -sudo sh -c "echo '$LIST_NAME-unsubscribe: \"|/usr/lib/mailman/mail/mailman unsubscribe $LIST_NAME\"' >> /etc/aliases" | |
60 | - | |
61 | -sudo newaliases | |
62 | - | |
63 | -sudo yum -y install postfix | |
64 | - | |
65 | -sudo /etc/init.d/postfix restart | |
66 | - | |
67 | -sudo chkconfig --levels 235 mailman on | |
68 | - | |
69 | -sudo /etc/init.d/mailman start | |
70 | -cd /usr/lib/mailman/cgi-bin/ | |
71 | -sudo ln -s ./ mailman | |
72 | - | |
73 | -sudo wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/mailman/list.conf -O /etc/nginx/conf.d/list.conf | |
74 | - | |
75 | -sudo service nginx restart | |
76 | - | |
77 | -sudo sh -c "echo 'DEFAULT_URL_PATTERN = \"https://%s/mailman/cgi-bin/\"' >> /etc/mailman/mm_cfg.py" | |
78 | - | |
79 | -sudo /usr/lib/mailman/bin/withlist -l -a -r fix_url | |
80 | -sudo service mailman restart | |
81 | - | |
82 | -sudo usermod -a -G apache nginx | |
83 | - | |
84 | -sudo chkconfig --levels 235 spawn-fcgi on | |
85 | -sudo /etc/init.d/spawn-fcgi start | |
86 | - | |
87 | -sudo service mailman restart | |
88 | -sudo service nginx restart | |
89 | - |
scripts/postgres.sh
... | ... | @@ -1,50 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -set -x | |
4 | - | |
5 | -if [ ! "$1" ] | |
6 | - then | |
7 | - echo "Arquivo de configuracao nao encontrado." | |
8 | - echo "./postgres.sh <CONFIG_FILE>" | |
9 | - exit -1 | |
10 | -fi | |
11 | - | |
12 | -CONFIG_FILE=$1 | |
13 | - | |
14 | -sudo yum localinstall http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm -y | |
15 | -sudo yum install postgresql-devel postgresql93 postgresql93-devel postgresql93-libs postgresql93-server vim wget -y | |
16 | - | |
17 | -sudo service postgresql-9.3 initdb | |
18 | - | |
19 | -sudo chkconfig postgresql-9.3 on | |
20 | - | |
21 | -sudo service postgresql-9.3 start | |
22 | - | |
23 | -echo "export PATH=$PATH:/usr/pgsql-9.3/bin/" >> ~/.bashrc | |
24 | -source ~/.bashrc | |
25 | -sudo sh -c "echo 'export PATH=$PATH:/usr/pgsql-9.3/bin/' >> ~/.bashrc" | |
26 | -sudo sh -c "source /root/.bashrc" | |
27 | - | |
28 | -sudo sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/pgsql-9.3\/bin/' /etc/sudoers | |
29 | - | |
30 | -sudo -u postgres psql -c "CREATE USER colab SUPERUSER INHERIT CREATEDB CREATEROLE;" | |
31 | -sudo -u postgres psql -c "ALTER USER colab PASSWORD 'colab';" | |
32 | -sudo -u postgres psql -c "CREATE USER git SUPERUSER INHERIT CREATEDB CREATEROLE;" | |
33 | -sudo -u postgres psql -c "CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'redmine' NOINHERIT VALID UNTIL 'infinity';" | |
34 | -sudo -u postgres psql -c "CREATE DATABASE colab WITH OWNER colab ENCODING 'UTF8' LC_COLLATE='en_US.UTF-8' LC_CTYPE='en_US.UTF-8' TEMPLATE=template0;" | |
35 | -sudo -u postgres psql -c "CREATE DATABASE trac_colab WITH OWNER colab ENCODING 'UTF8' LC_COLLATE='en_US.UTF-8' LC_CTYPE='en_US.UTF-8' TEMPLATE=template0;" | |
36 | -sudo -u postgres psql -c "CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;" | |
37 | - | |
38 | -sudo wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/postgres/pg_hba.conf -O /var/lib/pgsql/9.3/data/pg_hba.conf | |
39 | - | |
40 | -source $CONFIG_FILE | |
41 | - | |
42 | -sudo sed -i "s/host redmine redmine 127.0.0.1\/32 md5/host redmine redmine $REDMINE_IP\/32 md5/" /var/lib/pgsql/9.3/data/pg_hba.conf | |
43 | -sudo sed -i "s/host trac_colab colab 127.0.0.1\/32 md5/host trac_colab colab $TRAC_IP\/32 md5/" /var/lib/pgsql/9.3/data/pg_hba.conf | |
44 | -sudo sed -i "s/host colab colab 127.0.0.1\/32 md5/host colab colab $COLAB_IP\/32 md5/" /var/lib/pgsql/9.3/data/pg_hba.conf | |
45 | -sudo sed -i "s/host gitlabhq_production git 127.0.0.1\/32 trust/host gitlabhq_production git $GITLAB_IP\/32 trust/" /var/lib/pgsql/9.3/data/pg_hba.conf | |
46 | - | |
47 | -sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/" /var/lib/pgsql/9.3/data/postgresql.conf | |
48 | - | |
49 | -sudo service postgresql-9.3 restart | |
50 | - |
scripts/redmine.sh
... | ... | @@ -1,75 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -LOCAL_HOST=$1 | |
4 | -if [ -e $LOCAL_HOST ]; then | |
5 | - echo "Please, inform the IP address Redmine will be listening" | |
6 | - echo "ex: ./redmine.sh 127.0.0.1" | |
7 | - exit -1 | |
8 | -fi | |
9 | - | |
10 | -echo "Installing a lot of system dependencies also making use of EPEL repository" | |
11 | -sudo rpm -iUvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
12 | -sudo yum -y install zlib-devel curl-devel httpd-devel apr-devel apr-util-devel subversion git postgresql-devel gcc gcc-c++.x86_64 make automake autoconf curl-devel openssl-devel httpd-devel apr-devel apr-util-devel sqlite-devel libxslt-devel libxml2-devel.x86_64 php-pear ImageMagick ImageMagick-devel ImageMagick-perl vim patch readline readline-devel zlib libffi-devel make bzip2 libtool bison wget libyaml-devel | |
13 | - | |
14 | -echo "Making sure $USER can access /opt" | |
15 | -sudo chown $USER /opt && cd /opt | |
16 | - | |
17 | -echo "Downloading Redmine 2.3" | |
18 | -git clone https://github.com/redmine/redmine.git --branch 2.3-stable && cd /opt/redmine | |
19 | -ln -s /opt/redmine/public /opt/redmine/public/redmine | |
20 | - | |
21 | -echo "Installing Ruby/Redmine dependencies, this will take a VERY LONG TIME, grab a cup of coffee..." | |
22 | -rvm gemset use redmine | |
23 | -bundle install --verbose --without mysql sqlite | |
24 | -gem --verbose install unicorn --no-ri --no-rdoc | |
25 | -gem --verbose install pg -v '0.17.1' --no-ri --no-rdoc | |
26 | - | |
27 | -echo "Setting Redmine database file" | |
28 | -cd config/ && echo "production: | |
29 | - adapter: postgresql | |
30 | - database: redmine | |
31 | - host: $LOCAL_HOST | |
32 | - username: redmine | |
33 | - password: redmine | |
34 | - encoding: utf8" > database.yml | |
35 | - | |
36 | -echo "Initializing Redmine database" | |
37 | -export RAILS_ENV=production | |
38 | -rake generate_secret_token | |
39 | -rake db:migrate | |
40 | -echo "pt-BR" | rake redmine:load_default_data | |
41 | - | |
42 | -echo "Downloading Redmine plugins" | |
43 | -cd /opt/redmine/plugins && git clone https://github.com/colab-community/single_auth.git | |
44 | -cd /opt/redmine/plugins && git clone https://github.com/backlogs/redmine_backlogs.git | |
45 | - | |
46 | -echo "Installing backlogs plugin" | |
47 | -cd redmine_backlogs && git checkout v1.0.6 | |
48 | -bundle install --verbose | |
49 | -gem uninstall rack -v '1.5.2' | |
50 | - | |
51 | -echo "Finishing Redmine settings" | |
52 | -cd /opt/redmine | |
53 | -bundle install --verbose --without mysql sqlite | |
54 | -bundle exec rake db:migrate | |
55 | -bundle exec rake redmine:backlogs:install story_trackers=2 task_tracker=1 | |
56 | - | |
57 | -echo "Downloading server configuration files" | |
58 | -cd /opt/redmine && mkdir pids | |
59 | -wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/redmine/unicorn.rb -O config/unicorn.rb | |
60 | -wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/redmine/routes.rb -O config/routes.rb | |
61 | - | |
62 | -echo "Setting up initialization on supervisor" | |
63 | -if [ -e `cat /etc/supervisord.conf | grep redmine` ]; then | |
64 | - CMD="source /usr/local/rvm/scripts/rvm &&"; | |
65 | - CMD="$CMD rvm gemset use redmine &&"; | |
66 | - CMD="$CMD unicorn_rails -c /opt/redmine/config/unicorn.rb -E $RAILS_ENV -p 9080 -D"; | |
67 | - | |
68 | - echo "[program:redmine]" >> /etc/supervisord.conf; | |
69 | - echo "command=$CMD" >> /etc/supervisord.conf; | |
70 | - echo "user=$USER" >> /etc/supervisord.conf; | |
71 | -fi | |
72 | - | |
73 | -echo "Finished installing, starting Redmine service" | |
74 | -supervisorctl start redmine | |
75 | - |
scripts/rvm.sh
... | ... | @@ -1,13 +0,0 @@ |
1 | -#! /bin/bash | |
2 | - | |
3 | -echo "Make sure rvm is installed at /user/local/rvm" | |
4 | -sudo bash -c "curl -L get.rvm.io | bash -s stable" | |
5 | - | |
6 | -echo "Set rvm on the PATH and install ruby 2.0.0" | |
7 | -sudo bash -c "source /usr/local/rvm/scripts/rvm && rvm install ruby-2.0.0" | |
8 | -sudo bash -c "source /usr/local/rvm/scripts/rvm && rvm use 2.0.0 --default" | |
9 | - | |
10 | -echo "Create gemsets for gitlab and redmine" | |
11 | -sudo bash -c "source /usr/local/rvm/scripts/rvm && rvm gemset create gitlab" | |
12 | -sudo bash -c "source /usr/local/rvm/scripts/rvm && rvm gemset create redmine" | |
13 | - |
scripts/solr.sh
... | ... | @@ -1,38 +0,0 @@ |
1 | -#Instalação do Solr 4.6.1 | |
2 | -#------------------------ | |
3 | - | |
4 | -## Atualizacao | |
5 | -sudo yum update -y | |
6 | - | |
7 | -##Instalacao das Dependencias | |
8 | -sudo yum install -y wget java-1.7.0-openjdk vim | |
9 | - | |
10 | -## 0. Libere a porta 8983 desta máquina para que máquina do colab possa ouvi-la | |
11 | -#sudo iptables -A INPUT -p tcp -dport 8983 -j ACCEPT | |
12 | -#sudo /sbin/service iptables save | |
13 | - | |
14 | -##Faça o download e descompacte o Solr no /tmp | |
15 | -sudo wget http://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz -O /tmp/solr-4.6.1.tgz | |
16 | -sudo tar xvzf /tmp/solr-4.6.1.tgz -C /usr/share | |
17 | -sudo mv /usr/share/solr-4.6.1 /usr/share/solr | |
18 | - | |
19 | -#Instale o Solr no diretório ``/usr/share`` | |
20 | -sudo cp /usr/share/solr/example/webapps/solr.war /usr/share/solr/example/solr/solr.war | |
21 | - | |
22 | -#Remova a tag ``updateLog`` no solrconfig.xml | |
23 | -sudo wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/solr/solrconfig.xml -O /usr/share/solr/example/solr/collection1/conf/solrconfig.xml | |
24 | - | |
25 | -#Copiar o solr schema | |
26 | -sudo wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/solr/schema.xml -O /usr/share/solr/example/solr/collection1/conf/schema.xml | |
27 | - | |
28 | -#Copiar script de inicialização | |
29 | -sudo wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/solr/solrinit -O /etc/init.d/solr | |
30 | -sudo chmod +x /etc/init.d/solr | |
31 | - | |
32 | -sudo wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/solr/start.sh -O /usr/share/solr/start.sh | |
33 | -sudo chmod +x /usr/share/solr/start.sh | |
34 | - | |
35 | -sudo chkconfig solr on | |
36 | - | |
37 | -#Inicie o solr | |
38 | -sudo service solr start | |
39 | 0 | \ No newline at end of file |
scripts/supervisor.sh
scripts/trac.sh
... | ... | @@ -1,52 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -if [[ ! "$1" ]] | |
4 | - then | |
5 | - echo " Parametro nao encontrado." | |
6 | - echo " ./tra.sh <DATABASE_HOST>" | |
7 | - exit -1 | |
8 | -fi | |
9 | - | |
10 | -DATABASE_HOST=$1 | |
11 | - | |
12 | -sudo rm -rf /opt/trac | |
13 | - | |
14 | -if [[ $DATABASE_HOST == "127.0.0.1" ]]; then | |
15 | - sudo -u postgres psql -c "DROP DATABASE trac_colab;" | |
16 | - sudo -u postgres psql -c "CREATE DATABASE trac_colab WITH OWNER colab ENCODING 'UTF8' LC_COLLATE='en_US.UTF-8' LC_CTYPE='en_US.UTF-8' TEMPLATE=template0;" | |
17 | -fi | |
18 | - | |
19 | -sudo yum install -y wget | |
20 | -sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 https://www.fedoraproject.org/static/0608B895.txt | |
21 | -sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 | |
22 | - | |
23 | -sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
24 | -sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-puias | |
25 | - | |
26 | -sudo yum install gcc python-devel python-setuptools vim -y | |
27 | -sudo yum install postgresql-devel -y | |
28 | - | |
29 | -sudo easy_install psycopg2 | |
30 | - | |
31 | -sudo yum install -y trac | |
32 | - | |
33 | -sudo mkdir -p /opt/trac | |
34 | -sudo trac-admin /opt/trac initenv colab postgres://colab:colab@/trac_colab?host=$DATABASE_HOST | |
35 | - | |
36 | -sudo yum install subversion -y | |
37 | - | |
38 | -sudo wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/remote-user-auth.py -O /opt/trac/plugins/remote-user-auth.py | |
39 | -sudo sed -i "s/\[trac\]/\[trac\]\nobey_remote_user_header = true/" /opt/trac/conf/trac.ini | |
40 | - | |
41 | -sudo yum install -y supervisor | |
42 | - | |
43 | -sudo sh -c "echo \"[program:trac] | |
44 | -command=/usr/sbin/tracd --port 5000 /opt/trac | |
45 | -directory=/opt/trac | |
46 | -user=root | |
47 | -autostart=true | |
48 | -autorestart=false | |
49 | -redirect_stderr=True\" > /etc/supervisor/conf.d/trac.conf" | |
50 | - | |
51 | -sudo service supervisord start | |
52 | - |
scripts/users.sh
... | ... | @@ -1,53 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -# Make sure the current user is in sudoers file | |
4 | - | |
5 | -# Make sure to create user colab and colabdev group | |
6 | -COLAB_USER=colab | |
7 | -COLAB_GROUP=colabdev | |
8 | - | |
9 | -# Get user and group | |
10 | -COLAB_USER_EXISTS=`cat /etc/group | grep $COLAB_USER:` | |
11 | -COLAB_GROUP_EXISTS=`cat /etc/group | grep $COLAB_GROUP:` | |
12 | - | |
13 | -# Errors | |
14 | -ERROR_NOT_ALLOWED=126 | |
15 | -ERROR_ALREADY_EXIST=9 | |
16 | -ERROR_OK=0 | |
17 | - | |
18 | -echo "Making sure there is $COLAB_USER user and $COLAB_GROUP group in the system" | |
19 | - | |
20 | -# Make sure colab user exist | |
21 | -if [ -e $COLAB_USER_EXISTS ]; then | |
22 | - sudo adduser $COLAB_USER; | |
23 | - LAST_CMD=`echo $?` | |
24 | - if [ $LAST_CMD == $ERROR_OK ]; then | |
25 | - echo "User $COLAB_USER was created successfully!"; | |
26 | - elif [ $LAST_CMD == $ERROR_NOT_ALLOWED ]; then | |
27 | - echo "You don't have permission to create users" | |
28 | - echo "Aborting installation" | |
29 | - exit -1 | |
30 | - else | |
31 | - echo "Something went weird, please check for files from $COLAB_USER"; | |
32 | - fi | |
33 | -else | |
34 | - echo "User $COLAB_USER already exist, skipping creation..." | |
35 | -fi | |
36 | - | |
37 | -# Make sure colab group exist | |
38 | -if [ -e $COLAB_GROUP_EXISTS ]; then | |
39 | - sudo groupadd $COLAB_GROUP; | |
40 | - LAST_CMD=`echo $?` | |
41 | - if [ $LAST_CMD == $ERROR_OK ]; then | |
42 | - echo "Group $COLAB_GROUP was created successfully!"; | |
43 | - elif [ $LAST_CMD == $ERROR_NOT_ALLOWED ]; then | |
44 | - echo "You don't have permission to create groups" | |
45 | - echo "Aborting installation" | |
46 | - exit -1 | |
47 | - else | |
48 | - echo "Something went weird, please check $COLAB_GROUP group" | |
49 | - fi | |
50 | -else | |
51 | - echo "Group $COLAB_GROUP already exist, skipping creation..." | |
52 | -fi | |
53 | - |