View | Details | Raw Unified | Return to bug 18342
Collapse All | Expand All

(-)a/Makefile.PL (-1 / +1 lines)
Lines 483-489 my %config_defaults = ( Link Here
483
  'PAZPAR2_PORT' => '11002',
483
  'PAZPAR2_PORT' => '11002',
484
  'RUN_DATABASE_TESTS' => 'no',
484
  'RUN_DATABASE_TESTS' => 'no',
485
  'PATH_TO_ZEBRA' => '',
485
  'PATH_TO_ZEBRA' => '',
486
  'USE_MEMCACHED'     => 'no',
486
  'USE_MEMCACHED'     => 'yes',
487
  'MEMCACHED_SERVERS' => '127.0.0.1:11211',
487
  'MEMCACHED_SERVERS' => '127.0.0.1:11211',
488
  'MEMCACHED_NAMESPACE' => 'KOHA',
488
  'MEMCACHED_NAMESPACE' => 'KOHA',
489
  'TEMPLATE_CACHE_DIR' => '/tmp/koha',
489
  'TEMPLATE_CACHE_DIR' => '/tmp/koha',
(-)a/debian/docs/koha-create.xml (-15 lines)
Lines 29-35 Link Here
29
      <arg><option>--zebralang</option> en|es|fr|gr|nb|ru|uk</arg>
29
      <arg><option>--zebralang</option> en|es|fr|gr|nb|ru|uk</arg>
30
      <arg><option>--auth-idx</option> dom|grs1</arg>
30
      <arg><option>--auth-idx</option> dom|grs1</arg>
31
      <arg><option>--biblio-idx</option> dom|grs1</arg>
31
      <arg><option>--biblio-idx</option> dom|grs1</arg>
32
      <arg><option>--use-memcached</option></arg>
33
      <arg><option>--memcached-servers</option> server:port</arg>
32
      <arg><option>--memcached-servers</option> server:port</arg>
34
      <arg><option>--memcached-prefix</option> namespace_prefix</arg>
33
      <arg><option>--memcached-prefix</option> namespace_prefix</arg>
35
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
34
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
Lines 150-162 Link Here
150
      </listitem>
149
      </listitem>
151
    </varlistentry>
150
    </varlistentry>
152
151
153
    <varlistentry>
154
      <term><option>--use-memcached</option></term>
155
      <listitem>
156
        <para>Make the Koha instance use memcached. <option>Disabled by default</option>.</para>
157
      </listitem>
158
    </varlistentry>
159
160
    <varlistentry>
152
    <varlistentry>
161
      <term><option>--memcached-servers</option></term>
153
      <term><option>--memcached-servers</option></term>
162
      <listitem>
154
      <listitem>
Lines 286-298 Link Here
286
        </listitem>
278
        </listitem>
287
      </varlistentry>
279
      </varlistentry>
288
280
289
      <varlistentry>
290
        <term><option>USE_MEMCACHED</option></term>
291
        <listitem>
292
          <para>Valid values are <option>yes</option> and <option>no</option>. If not present koha-create will default to <option>no</option>. Also, this will be overriden by the <option>--use-memcached</option> switch.</para>
293
        </listitem>
294
      </varlistentry>
295
296
      <varlistentry>
281
      <varlistentry>
297
        <term><option>MEMCACHED_SERVERS</option></term>
282
        <term><option>MEMCACHED_SERVERS</option></term>
298
        <listitem>
283
        <listitem>
(-)a/debian/scripts/koha-create (-24 / +3 lines)
Lines 57-63 Options: Link Here
57
                            values are dom (default) and grs1.
57
                            values are dom (default) and grs1.
58
  --biblio-idx idx_mode     Set the indexing mode for bibliographic records.
58
  --biblio-idx idx_mode     Set the indexing mode for bibliographic records.
59
                            Valid values are dom (default) and grs1.
59
                            Valid values are dom (default) and grs1.
60
  --use-memcached           Set the instance to make use of memcache.
61
  --memcached-servers str   Set a comma-separated list of host:port memcached servers.
60
  --memcached-servers str   Set a comma-separated list of host:port memcached servers.
62
  --memcached-prefix str    Set the desired prefix for the instance memcached namespace.
61
  --memcached-prefix str    Set the desired prefix for the instance memcached namespace.
63
  --enable-sru              Enable the Z39.50/SRU server (default: disabled).
62
  --enable-sru              Enable the Z39.50/SRU server (default: disabled).
Lines 404-410 ADMINUSER="1" Link Here
404
PASSWDFILE="/etc/koha/passwd"
403
PASSWDFILE="/etc/koha/passwd"
405
404
406
# memcached variables
405
# memcached variables
407
USE_MEMCACHED="no"
406
USE_MEMCACHED="yes"
408
MEMCACHED_SERVERS=""
407
MEMCACHED_SERVERS=""
409
MEMCACHED_PREFIX=""
408
MEMCACHED_PREFIX=""
410
# hardcoded memcached defaults
409
# hardcoded memcached defaults
Lines 444-450 fi Link Here
444
443
445
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
444
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
446
445
447
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \
446
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \
448
     -n "$0" -- "$@"`
447
     -n "$0" -- "$@"`
449
448
450
# Note the quotes around `$TEMP': they are essential!
449
# Note the quotes around `$TEMP': they are essential!
Lines 473-480 while true ; do Link Here
473
            op=populate ; shift ;;
472
            op=populate ; shift ;;
474
        -u|--use-db)
473
        -u|--use-db)
475
            op=use ; shift ;;
474
            op=use ; shift ;;
476
        --use-memcached)
477
            USE_MEMCACHED="yes" ; shift ;;
478
        --memcached-servers)
475
        --memcached-servers)
479
            CLO_MEMCACHED_SERVERS="$2" ; shift 2 ;;
476
            CLO_MEMCACHED_SERVERS="$2" ; shift 2 ;;
480
        --memcached-prefix)
477
        --memcached-prefix)
Lines 586-610 NO_DB Link Here
586
    die;
583
    die;
587
fi
584
fi
588
585
589
if [ "$USE_MEMCACHED" = "yes" ]; then
586
set_memcached $name
590
    set_memcached $name
591
elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \
592
     [ "$CLO_MEMCACHED_PREFIX" != "" ]; then
593
594
    MSG=`cat <<EOF
595
596
Error: you provided memcached configuration switches but memcached is not enabled.
597
Please set USE_MEMCACHED="yes" on /etc/koha/koha-sites.conf or use the
598
--use-memcached option switch to enable it.
599
600
EOF`
601
602
    usage ; die $MSG
603
else
604
    # Unset memcached-related variables
605
    MEMCACHED_SERVERS=""
606
    MEMCACHED_PREFIX=""
607
fi
608
587
609
# Set template cache dir
588
# Set template cache dir
610
if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then
589
if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then
(-)a/debian/templates/koha-sites.conf (-2 / +2 lines)
Lines 46-53 AUTHORITIES_INDEXING_MODE="dom" Link Here
46
#
46
#
47
# USE_MEMCACHED: 'yes' | 'no'
47
# USE_MEMCACHED: 'yes' | 'no'
48
# Make the created instance use memcached. Can be altered later.
48
# Make the created instance use memcached. Can be altered later.
49
# default: 'no'
49
# default: 'yes'
50
USE_MEMCACHED="no"
50
USE_MEMCACHED="yes"
51
51
52
# MEMCACHED_SERVERS: comma separated list of memcached servers (ip:port)
52
# MEMCACHED_SERVERS: comma separated list of memcached servers (ip:port)
53
# Specify a list of memcached servers for the Koha instance
53
# Specify a list of memcached servers for the Koha instance
(-)a/rewrite-config.PL (-2 / +1 lines)
Lines 149-155 $prefix = $ENV{'INSTALL_BASE'} || "/usr"; Link Here
149
  "__BIB_INDEX_MODE__" => 'grs1',
149
  "__BIB_INDEX_MODE__" => 'grs1',
150
  "__RUN_DATABASE_TESTS__" => 'no',
150
  "__RUN_DATABASE_TESTS__" => 'no',
151
  "__PATH_TO_ZEBRA__" => "",
151
  "__PATH_TO_ZEBRA__" => "",
152
  "__USE_MEMCACHED__" => 'no',
152
  "__USE_MEMCACHED__" => 'yes',
153
  "__MEMCACHED_SERVERS__" => "",
153
  "__MEMCACHED_SERVERS__" => "",
154
  "__MEMCACHED_NAMESPACE__" => "",
154
  "__MEMCACHED_NAMESPACE__" => "",
155
  "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu",
155
  "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu",
156
- 

Return to bug 18342