Odo.lv » Recipes » Rapla resursu plānošanas serveris

Rapla resursu plānošanas serveris

en

Uzstādīšana

  1. Lejuplādē instalāciju no rapla-binary-1.4.2.zip;
  2. Ieliek šo failu /usr/local/bin katalogā.
  3. Atarhivē:
    cd /usr/local/bin
    sudo unzip rapla-binary-1.4.2.zip
    sudo mv rapla-binary-1.4.2 rapla
  4. Ja Jums ir grafisks Linux, tad var kā parasts (ne-root) lietotājs darbināt lietotni rapla.sh, kas piestartēs Raplas GUI:
    sudo chmod 755 rapla.sh
    ./rapla.sh start rapla
  5. Visos citos gadījumos (piemēram, uz Linux servera) ir jādarbina Rapla kā tīmekļa un datubāzu aplikācija (sk. zemāk).

Datu glabāšanai MySQL

  1. Izveido jaunu datubāzi:
    mysql -u root -p   (spiež Enter un ieraksta paroli) 
    create database rapla;
  2. Izveido lietotāju:
    grant all on rapla.* to rapla@"%" identified by "rapla", rapla@localhost identified by "rapla";
    FLUSH PRIVILEGES;
  3. Aktivizē rapla-mysql.sql skriptu (to dara /webapps/rapla katalogā:
    mysql> use rapla;
    mysql> source /WEB-INF/rapla-mysql.sql;
  4. Lejuplādē JDBC dzini priekš MySQL and put it into /WEB-INF/lib and /webapp/WEB-INF/lib folders);
  5. Izmaina raplaserver.xconf iestatījumus /WEB-INF/ and /webapp/WEB-INF/:
    <store>sql</store>
    ....................
    <db-storage id="sql">
        <driver>org.gjt.mm.mysql.Driver</driver>
        <url>jdbc:mysql://localhost/rapla</url>
        <user>student</user>
        <password>Student007</password>
    </db-storage>
  6. Nomaina glabāšanas iestatījumus no faila uz SQL bāzi (katalogā/rapla/):
    ./raplaserver.sh import data.xml Rapla;
  7. Ja vēlas glabāt datus SQl bāzē, aktivizēšo skriptu:
    ./raplaserver.sh export Rapla data.xml;

Darbināšana

  1. Rapla serveri aktivizē ar komandu:
    ./raplaserver.sh start
  2. Ar pārlūkprogrammu atver URLi http://localhost:8051/rapla;
  3. Noklusētais lietotājs ir admin bez paroles.

Skatu ekportēšana uz HTML

Rapla has a good feature - it can export calendars to HTML and automatically update them. For now, we'll use an iframe to import it to XWiki. For example, paste this code into XWiki page:
<div style="overflow: hidden">
<iframe src="http://192.168.220.128:8051/rapla?page=calendar&user=admin&file=Jupiter&today"  name="iframe" id="html-calendar" frameborder="0">
</iframe>
</div>
iframe source is an external html-page created by Rapla.
&today at the end of the link means that view will always display the current situation.

Add this style to /xwiki/skins/accenture/style.css:
iframe#html-calendar {
    width: 100%; 
    height: 460px; 
    border: 0; 
    display: block;
    overflow: hidden;
}

Creating a navigation menu

This menu will display different exported calendars, which very useful for switching between different meeting rooms or simple events.
<div class="floatcontainer">
<ul class="xwikitabbar">
<li><a href="http://192.168.220.128:8051/rapla?page=calendar&user=admin&file=All+rooms&today" target="iframe">All rooms load</a></li>
<li><a href="http://192.168.220.128:8051/rapla?page=calendar&user=admin&file=Jupiter&today" target="iframe">Jupiter</a></li>
</ul>
</div>
Also add these two links to start Rapla directly, using Java plugin or Java Web Start:
* <a href="http://192.168.220.128:8051/rapla?page=calendar&user=admin&file=Jupiter&today">Start Rapla (with Java Web Start)</a>
* <a href="http://192.168.220.128:8051/rapla?page=raplaapplet" target="_blank">Start Rapla (with Java plugin)</a>

Rapla uz Tomcat

  1. Izveido tukšu katalogu "rapla" katalogā $TOMCAT_HOME/webapps.
  2. Pārkopē saturu no Jetty "webapps" kataloga uz Tomcat webapps "rapla" katalogu.
  3. Izmaina žurnāla kataloga tiesības:
    chmod -R 777 /usr/share/tomcat5.5/webapps/rapla
  4. Konfigurē JkMount, faila /etc/apache2/apache2.conf beigās pievienojot 2 jaunas rindas:
    JkMount /rapla ajp13_worker
    JkMount /rapla/* ajp13_worker
  5. Pieslēdzas lietotnei uz URLi http://localhost/rapla un piesakās ar vārdu "admin" un tukšu paroli.

Created by Valdis Vītoliņš on 2008/08/09 20:29
Last modified by Kalvis Apsītis on 2011/10/27 23:37

XWiki Enterprise 2.7.33656 - Documentation
Creative Commons Attribution 3.0 Unported License