Installation and Maintenance

Lucene RPC-Server

Apache Lucene

Apache Lucene is a high-performance, full-featured text search engine library
written entirely in Java. It is a technology suitable for nearly any application
that requires full-text search, especially cross-platform.
ILIAS uses this engine to search within files objects (e.g PDF or HTML).

Requirements

This Java server has been tested with Sun Java Runtime Environment 1.4.2.
To be able to index and search for non-ASCII characters your system should
support UTF-8 encodings.

Try:
bash$ export LC_CTYPE=en_EN.UTF-8

to set the default character encoding for the Java Virtual Machine to utf-8,
before starting the RPC-Server

ILIAS needs the pear XML_RPC library.

Installation

  1. Install pear XML_RPC:

    bash$ pear install XML_RPC

  2. Change directory to:

    bash$ cd <YOUR_ILIAS_DIR>/Services/WebServices/RPC/lib

  3. Edit the file ilServer.properties

    ilServer.properties:
    IpAddress = 127.0.0.1 # Configure the Ip the RPC server is bound to.
    # If the loopback device is configured on your system, you
    # can use the default value (127.0.0.1)

    Port = 11111 # Configure the port number the RPC server is bound to.
    # You can use any port.

    IndexPath = /tmp # Choose an existing directory where lucene will store the
    # index files. Write permission is required for this dierectory.

    LogFile = /var/log/ilServer.log # Choose a filename. The LogFile will be created.

  4. Start the server:

    Set the default character encoding:

    bash$ export LC_CTYPE=en_EN.UTF-8

    Start the server:

    bash$ java -jar ilServer.jar ilServer.properties &

    You will receive the PROCESS_ID of the started RPC-Server

    To stop the server simply type:

    bash$ kill <PROCESS_ID>

Preparing ILIAS

Update ILIAS and enable Lucene by adding the following to your setup.json:

"webservices" : {
"rpc_server_host" : "127.0.0.1",
"rpc_server_port" : "11111"
},

Apply this changes by executing php setup/setup.php update /path/to/setup.json.

For further information regarding ILIAS setup cli visit the setup instructions in GitHub.

Indexing ILIAS HTML learning modules and file objects

  1. Change to the directory of your ILIAS installation.

    bash$ cd <YOUR_ILIAS_DIR>

  2. Start indexing:

    bash$ php cron/cron.php <ADMIN_LOGIN> <ADMIN_PASSWORD> <ILIAS_CLIENT_NAME>

  3. You will find informations about the new created index in the Lucene LogFile

Finally, start searching

  1. Log in to ILIAS

  2. Click on Search in the Main-Menu

  3. Enter a search string and tick the checkboxes 'Detail search', 'Learning materials' and 'Files'.

Starting Lucene server at boot time

To start the Lucene RPC server automatically at boottime, follow these instructions:

  1. Change to the super user root

    bash$ su

    Type in your root password

  2. Change the working directory and create a file named rpcserver

    bash$ cd /etc/init.d # Adjust this path according to your distribution
    bash$ vi rpcserver


    with this content:

    #!/bin/bash
     
    JAVABIN=/usr/bin/java
    ILIASDIR=/var/www/ilias # Type in the root directory of your ILIAS installation
    USER=wwwrun # Replace with the useranme who should run the rpcserver
     
    case "\$1" in
    start)
    if [ -f /tmp/rpcserver.pid ]
    then
    echo "The RPC Server seems to be running. Type 'rpcserver stop' or remove the file '/tmp/rpcserver.pid' manually"
    exit 1
    fi
    echo "Starting RPC server"
    su -c "$JAVABIN -jar $ILIASDIR/Services/WebServices/RPC/lib/ilServer.jar $ILIASDIR/Services/WebServices/RPC/lib/ilServer.properties" $USER &
    echo $! > /tmp/rpcserver.pid
    ;;
     
    stop)
    echo "Shutting down RPC server"
    {
    kill `cat /tmp/rpcserver.pid`
    unlink /tmp/rpcserver.pid
    } 2> /dev/null
    ;;
     
    restart)
    stop
    sleep 2
    start
    ;;
     
    *)
    echo "Usage: {start|stop|restart}"
    exit 1
    esac
     
    exit 0
  3. Change the file permissions by typing

    bash$ chmod 750 rpcserver

  4. You can start the RPC server by typing:

    bash$ /etc/init.d/rpcserver start

    stop it:

    bash$ /etc/init.d/rpcserver stop

    or restart it:

    bash$ /etc/init.d/rpcserver restart

  5. You can start the rpcserver automatically at boottime by linking 'rpcserver'
    to one of the /etc/rcX.d (X indicates the specific runlevel).



No comment has been posted yet.