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

(-)a/Makefile.PL (-1 / +1 lines)
Lines 481-487 my %config_defaults = ( Link Here
481
  'PAZPAR2_PORT' => '11002',
481
  'PAZPAR2_PORT' => '11002',
482
  'RUN_DATABASE_TESTS' => 'no',
482
  'RUN_DATABASE_TESTS' => 'no',
483
  'PATH_TO_ZEBRA' => '',
483
  'PATH_TO_ZEBRA' => '',
484
  'USE_MEMCACHED'     => 'no',
484
  'USE_MEMCACHED'     => 'yes',
485
  'MEMCACHED_SERVERS' => '127.0.0.1:11211',
485
  'MEMCACHED_SERVERS' => '127.0.0.1:11211',
486
  'MEMCACHED_NAMESPACE' => 'KOHA',
486
  'MEMCACHED_NAMESPACE' => 'KOHA',
487
  'FONT_DIR'          => '/usr/share/fonts/truetype/ttf-dejavu'
487
  'FONT_DIR'          => '/usr/share/fonts/truetype/ttf-dejavu'
(-)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
    </varlistentry>
149
    </varlistentry>
151
150
152
    <varlistentry>
151
    <varlistentry>
153
      <term><option>--use-memcached</option></term>
154
      <listitem>
155
        <para>Make the Koha instance use memcached. <option>Disabled by default</option>.</para>
156
      </listitem>
157
    </varlistentry>
158
159
    <varlistentry>
160
      <term><option>--memcached-servers</option></term>
152
      <term><option>--memcached-servers</option></term>
161
      <listitem>
153
      <listitem>
162
        <para>Specify a comma-separated list of host:port memcached servers for using with the created Koha instance. Defaults to <option>127.0.0.1:11211</option>, the needed configuration for a locally installed memcached server.</para>
154
        <para>Specify a comma-separated list of host:port memcached servers for using with the created Koha instance. Defaults to <option>127.0.0.1:11211</option>, the needed configuration for a locally installed memcached server.</para>
Lines 278-290 Link Here
278
      </varlistentry>
270
      </varlistentry>
279
271
280
      <varlistentry>
272
      <varlistentry>
281
        <term><option>USE_MEMCACHED</option></term>
282
        <listitem>
283
          <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>
284
        </listitem>
285
      </varlistentry>
286
287
      <varlistentry>
288
        <term><option>MEMCACHED_SERVERS</option></term>
273
        <term><option>MEMCACHED_SERVERS</option></term>
289
        <listitem>
274
        <listitem>
290
          <para>A comma-separated list of valid memcached servers. Usually in the form of <option>host:port</option>. If not present koha-create will default to <option>127.0.0.1:11211</option>. Also, this will be overriden by the arguments of the <option>--memcached-servers</option> switch.</para>
275
          <para>A comma-separated list of valid memcached servers. Usually in the form of <option>host:port</option>. If not present koha-create will default to <option>127.0.0.1:11211</option>. Also, this will be overriden by the arguments of the <option>--memcached-servers</option> switch.</para>
(-)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 395-401 ADMINUSER="1" Link Here
395
PASSWDFILE="/etc/koha/passwd"
394
PASSWDFILE="/etc/koha/passwd"
396
395
397
# memcached variables
396
# memcached variables
398
USE_MEMCACHED="no"
397
USE_MEMCACHED="yes"
399
MEMCACHED_SERVERS=""
398
MEMCACHED_SERVERS=""
400
MEMCACHED_PREFIX=""
399
MEMCACHED_PREFIX=""
401
# hardcoded memcached defaults
400
# hardcoded memcached defaults
Lines 433-439 fi Link Here
433
432
434
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
433
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
435
434
436
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:,upload-path:,letsencrypt, \
435
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:,upload-path:,letsencrypt, \
437
     -n "$0" -- "$@"`
436
     -n "$0" -- "$@"`
438
437
439
# Note the quotes around `$TEMP': they are essential!
438
# Note the quotes around `$TEMP': they are essential!
Lines 461-468 while true ; do Link Here
461
            op=populate ; shift ;;
460
            op=populate ; shift ;;
462
        -u|--use-db)
461
        -u|--use-db)
463
            op=use ; shift ;;
462
            op=use ; shift ;;
464
        --use-memcached)
465
            USE_MEMCACHED="yes" ; shift ;;
466
        --memcached-servers)
463
        --memcached-servers)
467
            CLO_MEMCACHED_SERVERS="$2" ; shift 2 ;;
464
            CLO_MEMCACHED_SERVERS="$2" ; shift 2 ;;
468
        --memcached-prefix)
465
        --memcached-prefix)
Lines 572-596 NO_DB Link Here
572
    die;
569
    die;
573
fi
570
fi
574
571
575
if [ "$USE_MEMCACHED" = "yes" ]; then
572
set_memcached $name
576
    set_memcached $name
577
elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \
578
     [ "$CLO_MEMCACHED_PREFIX" != "" ]; then
579
580
    MSG=`cat <<EOF
581
582
Error: you provided memcached configuration switches but memcached is not enabled.
583
Please set USE_MEMCACHED="yes" on /etc/koha/koha-sites.conf or use the
584
--use-memcached option switch to enable it.
585
586
EOF`
587
588
    usage ; die $MSG
589
else
590
    # Unset memcached-related variables
591
    MEMCACHED_SERVERS=""
592
    MEMCACHED_PREFIX=""
593
fi
594
573
595
# Are we root? If not, the mod_rewrite check will fail and be confusing, so
574
# Are we root? If not, the mod_rewrite check will fail and be confusing, so
596
# we look into this first.
575
# we look into this first.
(-)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