Sakai Server Install

From BeSTGRID

Jump to: navigation, search

To The Gateway Server Configuration

BeSTGRID Sakai VRE - Production/Pilot deployment details
http://jira.sakaiproject.org/jira/browse/PROD-118

Contents

[edit] Setting up the Sakai VRE Virtual Machine

To create a virtual machine for the Sakai server a procedure from section "Creation of Other Domains" described in APACGrid twiki page has been used.

There were some changes which we've implemented in this sequence:

[edit] Disc space for VM:

  • Two logical volumes in VolumeGroup00 were created:
    • SakaiR with 8G size for root partition of VM
    • SakaiS with 512M for swap partition

[edit] Sakai VM configuration:

  • Directory for Sakai VM file system is /srv/sakai
  • Config file is /etc/xen/Sakai
  • Changes in config file:
    • ramdisk="/boot/initrd.img-2.6.16.33-xen
    • name="Sakai"
    • memory=1024
    • cpus="0" //using cpus="" makes an perl error
    • disk=['phy:VolumeGroup00/SakaiR,sda1,w','phy:VolumeGroup00/SakaiS,sda2,w'
    • vif=['00:16:3E:01:01:01, bridge=xenbr0']
    • added lines:
      • netmask="255.255.255.0"
      • gateway="130.216.189.254"
      • hostname="sakai.bestgrid.org"

[edit] Additional software packages:

[edit] Compulsory requirements:

  • Sakai 2.3.0 requires Tomcat JDK 1.4 Compatibility Package;
  • Sakai doesn't work with JDK 6;

[edit] Software Installation

[edit] Make JDK 5 binary file executable and run it

chmod 755 jdk-1_5_0_11-linux-i586-rpm.bin
./jdk-1_5_0_11-linux-i586-rpm.bin

[edit] Install and Configure MySQL

  • Install MySQL RPMs
rpm -iv MySQL-server-standard-4.1.22-0.rhel4.i386.rpm
rpm -iv MySQL-client-standard-4.1.22-0.rhel4.i386.rpm
rpm -iv MySQL-shared-standard-4.1.22-0.rhel4.i386.rpm
  • Change password for root user
mysqladmin -u root password PASSWORD
  • Configure Tomcat's mysql user and authority database
mysql> GRANT ALL PRIVILEGES ON *.* TO TOMCATUSERNAME@localhost 
   ->   IDENTIFIED BY 'TOMCATPASSWORD' WITH GRANT OPTION;
mysql> create database authority;
mysql> use authority;
mysql> create table users (
   ->   id int not null auto_increment primary key,
   ->   user_name varchar(20), 
   ->   user_pass varchar(20));
mysql> create table user_roles (
   ->   id int not null auto_increment primary key,
   ->   user_name varchar(20), 
   ->   role_name varchar(20));
mysql> insert into users (user_name, user_pass) values ('admin', 'adminpw');
mysql> insert into users (user_name, user_pass) values ('manager', 'managerpw');
mysql> insert into user_roles (user_name, user_pass) values ('admin', 'admin');
mysql> insert into user_roles (role_name, user_pass) values ('manager', 'manager');

[edit] Install Apache Tomcat 5.5.20

tar -xzfv apache-tomcat-5.5.20.tar.gz -C /opt
tar -xzfv apache-tomcat-5.5.20-admin.tar.gz -C /opt
tar -xzfv apache-tomcat-5.5.20-compat.tar.gz -C /opt
mv /opt/apache-tomcat-5.5.20 /opt/tomcat

[edit] Configure Tomcat

  • Untar and move MySQL Connector/J (JDBC driver) into /opt/tomcat/common/lib
tar -xzvf mysql-connector-java-5.0.4.tar.gz mysql-connector-java-5.0.4/mysql-connector-java-5.0.4-bin.jar
mv mysql-connector-java-5.0.4/mysql-connector-java-5.0.4-bin.jar /opt/tomcat/common/lib 
  • Add the attribute URIEncoding="UTF-8" to the <connector> element
  • Change port to 80 in the <connector>:
   <Connector
       enableLookups="false"
       acceptCount="100"
       debug="0"
       disableUploadTimeout="true"
       URIEncoding="UTF-8"
       port="80"
       redirectPort="8443"
       minSpareThreads="25"
       connectionTimeout="20000"
       maxSpareThreads="75"
       maxThreads="150">
   </Connector>
  • Realm
   <Realm className="org.apache.catalina.realm.JDBCRealm"
       connectionName="tomcat"
       connectionPassword="Tomcat#1"
       connectionURL="jdbc:mysql://localhost/authority"
       driverName="org.gjt.mm.mysql.Driver"
       roleNameCol="role_name"
       userCredCol="user_pass"
       userNameCol="user_name"
       userRoleTable="user_roles"
       userTable="users"/>