`

Instruction of Installing Sakai project for linux

阅读更多
In the follow sections, the “$” means the Linux command environment

Environment Configuration:
Java Environment -- JDK:
$java –version
Check the java environment  should be java version “1.5.0_16” or other editions like 1.5.0_xx.
Make sure your java environment is based on version 5  1.5.0_xx

Set the environment:
$export JAVA_HOME=/usr/java/javapath
e.g.: /usr/java/jdk1.5.0_16
$export PATH=$PATH:$JAVA_HOME/bin/
Set the path of bin directory of Java

Tomcat:
Install
$unzip apache-tomcat-5.5.23
Extract the zip file of tomcat
$cp apache-tomcat-5.5.23 /opt/tomcat
Copy the directory to tomcat directory which is under the opt directory
*this opt directory is an example, you can put tomcat to any where
$export CATALINA_HOME=/opt/tomcat
If your tomcat directory is in another directory, change the “opt” to your path in the command.
$export PATH=$PATH:$CATALINA_HOME/bin
$export JAVA_OPTS="-server -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=160m -Djava.awt.headless=true"
Set the tomcat and Java memory cache. If your memory is big enough, you can change the number in “-XX:MaxPermSize=160m”. *160m160 mega bytes
** This is important step, otherwise your server will occur no enough memory to startup.

Tomcat Configuration:
Modify the tomcat_path/conf/server.xml file.
e.g: $nano /opt/tomcat/conf/server.xml
find the connector tag with port 8080
then add the URIEncoding="UTF-8" at the end
example:
<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100" debug="0"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>

Maven Configuration:
Extract the maven tar file.
$tar xvf maven-2.0.6-bin.tar.gz
$cp maven-2.0.6-bin.tar.gz /opt/maven

Set environment:
$export MAVEN_HOME=/opt/maven
$export MAVEN_OPTS='-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m'
You need to execute this command, otherwise, the error may be occurred when you are building the sakai.
Create local maven directory
$cd $HOME
$mkdir -p .m2/repository
$cd .m2
Create a file called setting.xml
Add the lines as following:
<settings xmlns="http://maven.apache.org/POM/4.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <profiles>
    <profile>
      <id>tomcat5x</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <appserver.id>tomcat5x</appserver.id>
        <appserver.home>/opt/tomcat</appserver.home>
        <maven.tomcat.home>/opt/tomcat</maven.tomcat.home>
        <sakai.appserver.home>/opt/tomcat</sakai.appserver.home>
        <surefire.reportFormat>plain</surefire.reportFormat>
        <surefire.useFile>false</surefire.useFile>
      </properties>
    </profile>
  </profiles>
</settings>
**The green lines mean you should use your full path of tomcat.
if you use the network proxy, you should add lines as follow. If not, ignore it.:
<proxies>
     <proxy>
        <active>true</active>
        <protocol>http</protocol>
        <host>www.your.proxy.host</host>
        <port>80</port>
        <username>your_username</username>
        <password>your_password</password>
        <nonProxyHosts>localhost</nonProxyHosts>
     </proxy>
  </proxies>
</settings>

Check maven installation:
$mvn --version
If it shows something about maven, success.

Sakai Installation:
Extract Sakai source code under the tomcat directory. The directory name is not very important.
e.g. /opt/tomcat/sakai
modify the Sakai configuration:
$nano path/component/component-api/component/src/config/org/sakaiproject/config/sakai.properties
The path means the full path to your sakai directory.
e.g.: $nano /opt/tomcat/sakai/component/component-api/component/src/config/org/sakaiproject/config/sakai.properties

in this file, you should change something as follow.
Database configuration:
# sakai.properties - the default edition
# This file is the default for providing all configuration and placeholder values for Sakai.
# All other sakai.properties files override these settings

# set the hibernate dialect (for shared datasource), HSQLDB by default, mySql and Oracle
hibernate.dialect=org.hibernate.dialect.HSQLDialect
#hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#hibernate.dialect=org.hibernate.dialect.Oracle9iDialect
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect

In this section, you need to choose the database type.
In our environment, the codes can be modified as follow:
# sakai.properties - the default edition
# This file is the default for providing all configuration and placeholder values for Sakai.
# All other sakai.properties files override these settings

# set the hibernate dialect (for shared datasource), HSQLDB by default, mySql and Oracle
#hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#use MySQL database
url@javax.sql.BaseDataSource=jdbc:mysql://localhost:3306/sakai
#set database link to your database.
#sakai is your database name for Sakai project
# localhost:3306, this can be your database server address and port number
username@javax.sql.BaseDataSource=root
#set the username for using this database
#in this database, I use a username called root
password@javax.sql.BaseDataSource=xxxxxx
#this is the password for that username
#change “xxxxxx” to your password
vendor@org.sakaiproject.db.api.SqlService=mysql
#declare the sql service type  mysql, you don’t need to change
driverClassName@javax.sql.BaseDataSource=com.mysql.jdbc.Driver
#set the JDBC Driver for program connecting the database
validationQuery@javax.sql.BaseDataSource=select 1 from DUAL
#verify the database by testing the query.
#the DUAL is built inside. Actually, this is a test process
defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
#this also is a thing that built inside, you don’t need to change.
#hibernate.dialect=org.hibernate.dialect.Oracle9iDialect
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect

Make sure automatically generate all objects:
# establish auto.ddl - on by default
auto.ddl=true
#auto.ddl=false

Email Configuration:
smtp@org.sakaiproject.email.api.EmailService=some.smtp.org
add this line into this file in anywhere.
# dns addresses used for incoming email
smtp.dns.1 = 255.255.255.1
smtp.dns.2 = 255.255.255.2
# change the smtp dns address to your smtp server
# SMTP port on which our SMTP server runs. Default is 25.
#Recommend running on 8025, and using a standard mailer on 25 to forward mail to Sakai.
smtp.port = 25

# flag to enable or disable our SMTP server for incoming email (true | false)
smtp.enabled = true

# email address used as the "from" address for any email sent by Worksite Setup tool or Site Info tool. 
# Recipients may not receive notifications if this address isn't valid.
#setup.request=address@somedomain

You can find more information about modify this sakai.properties at /sakaipath/reference/docs/sakai.properties
*The sakaipath means the full path of your sakai directory.
MySQL Database Configuration:
Make sure your mysql is working.
$mysql --version
$mysql –u root –p
Enter password: ******
Type the command for creating the database.
mysql> create database sakai default character set utf8;
mysql> grant all on sakai.* to sakaiuser@'localhost' identified by 'sakaipassword';
mysql> grant all on sakai.* to sakaiuser@'127.0.0.1' identified by 'sakaipassword';
the sakaipassword needs to change to something you like.
The sakai project will automatically install the tables and objects into this database.
The database name should be the same as you defined in the sakai.properties
You also need to put a MySQL connector into tomcat/common/lib directory.
You can download it at here. Then click the download link of tar.gz file

Build and deploy the Sakai project
$cd /sakaipath/master
$mvn clean install
$cd ..
$ mvn clean install sakai:deploy -Dmaven.tomcat.home=/tomcatpath
Sakaipath is the full path of sakai directory
Tomcatpath is the full path of tomcat directory
e.g.:
$cd /opt/tomcat/sakai/master
$mvn clean install
$cd ..
$ mvn clean install sakai:deploy -Dmaven.tomcat.home=/opt/tomcat
/opt/tomcat is your tomcat path

You need to wait 10-60 minutes. It depends on your CPU and memory speed.
After all.
$cd /opt/tomcat/bin
$./startup.sh

Wait 10-20 minutes……
You will see the project by using link: http://localhost:8080/portal

Appendix:
Useful skills:
You can add these command into a script. (Example. Details should follow your environment)
export JAVA_HOME=/usr/java/javapath
export JAVA_OPTS="-server -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=160m -Djava.awt.headless=true"
export CATALINA_HOME=/opt/tomcat
export PATH=$PATH:$CATALINA_HOME/bin
export MAVEN_OPTS='-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m'
export MAVEN_HOME=/opt/maven-2.0.6
export PATH=$PATH:$MAVEN_HOME/bin

Basic error information:
You may see the error when you are deploying this project.
Exception details:
The cache manager is not a live.

Solution:
Delete all the .war files under the tomcat/webapps directory
Then, rebuild the the sakai project using command: $ mvn clean install sakai:deploy -Dmaven.tomcat.home=/opt/tomcat
分享到:
评论

相关推荐

    Instruction Manual for Software HAAKE RheoWin 3

    Instruction Manual for Software HAAKE RheoWin 3

    Instruction Set Reference_intel 64

    It provides detailed information about the instructions from A to M, which is a subset of the entire instruction set available for these architectures. #### Detailed Explanation of Key Knowledge ...

    LINUX下的CAN驱动

    在Linux操作系统中,CAN(Controller Area Network)是一种用于汽车电子设备和工业自动化系统的通信协议,因其高可靠性、实时性和抗干扰性而广受欢迎。本文将详细介绍LINUX下的CAN驱动,特别是针对mcp2515.c这个源...

    MIPS Instruction Memory (练习)

    - Instruction memory size/depth (instr_mem_depth with default value of 39 locations) - Instruction memory width (instr_mem_width with default value of 32 bits) • Inputs - Asynchronous reset for ...

    project 2007教程.doc

    《Project 2007教程》是一份详细指导如何使用Microsoft Project 2007的文档,它旨在帮助用户熟练掌握这款项目管理软件的各项功能。Project 2007是微软公司开发的一款强大的项目管理工具,广泛应用于企业、工程、教育...

    Rockchip_Instruction_Linux_Application_ISP20_CN.pdf

    本文档主要介绍了如何在Linux环境下,特别是在Rockchip的ISP20中获取Camera数据流,并且介绍了RkAiq3AServer独立进程。文档首先介绍了ISP20应用开发的基本概念,包括功能概述和数据流概述,然后详细介绍了如何基于...

    ubuntu_linux一些命令的学习_linux-basic--instruction.zip

    ubuntu_linux一些命令的学习_linux-basic--instruction

    iod.rar_for each linux

    标题 "iod.rar_for each linux" 暗示我们关注的是一个与在Linux系统上遍历目录中的每个条目相关的程序或脚本。描述指出这是一个功能,可以迭代处理目录中的每一个条目。考虑到压缩包内的文件名为 iod.c、Instruction...

    The instruction of RFQ module check list.pdf

    RFQ(Request for Quotation,报价请求)模块核对清单的指南文档,提供了关于液晶显示模块(LCM)及其附件的详细信息。核对清单分为多个部分,涉及LCD类型、显示模式、温度、显示内容、背光系统、触摸面板等关键知识...

    Instruction-of-Long_short_key.rar_short_site:www.pudn.com

    描述中提到,“这个文档可以搭配Long_short_key.rar里的文件使用,是它的说明文档”,这暗示了我们有一个名为“Long_short_key.rar”的压缩包,其中包含了与“Instruction of Long_short_key”一起使用的文件。...

    linux0.00版最早的linux

    Linux 0.00版是Linux操作系统的最早版本,它标志着Linus Torvalds开始创建一个自由、开源的Unix-like操作系统内核的起点。这个版本虽然功能极其基础,但对于研究操作系统设计原理和Linux的发展历史具有重要的学术...

    Arm A64 Instruction Set Architecture Armv8, for Armv8-A architecture profile.pdf

    标题和描述中提到的知识点为ARM A64指令集架构(ISA)以及针对Armv8-A架构配置文件的介绍和详细解读。A64 ISA是ARM架构中针对64位处理器设计的一套指令集。Armv8-A是一个具体的架构配置文件,它符合Armv8架构,主要...

    instruction scheduling for instruction level parallel processor

    在当今高性能计算领域,个人电脑、工作站处理器以及大部分嵌入式处理器核心普遍采用了指令级并行(Instruction Level Parallelism, ILP)处理技术,主要包括超标量(Superscalar)和非常长指令字(Very Long ...

    Design Of Energy-Efficient Application-Specific Instruction Set Processors

    serious bottleneck for the implementation of new competitive devices. Especially for embedded digital circuits, a shift from hardware to software implementations is a solution to this issue. ...

    Area-Efficient Instruction Set Synthesis for Reconfigurable SoC Designs的翻译

    指令集扩展 论文的 翻译Area-Efficient Instruction Set Synthesis for Reconfigurable SoC Designs的 翻译

    WCET-aware instruction scheduling and register allocation for clustered VLIW processors

    We study the problem of performing instruction re-scheduling and register re-allocation for basic blocks of a program executed on a.clustered VLIW processor such that the WCET of the program is ...

    ARM_v8_Instruction_Set_Architecture

    level overview of the ARMv8 instructions sets, being mainly the new A64 instruction set used in AArch64 state but also those new instructions added to the A32 and T32 instruction sets since ARMv7-A ...

    AScalable Front-End Architecture for Fast Instruction Delivery

    AScalable Front-End Architecture for Fast Instruction Delivery

Global site tag (gtag.js) - Google Analytics