一路走来, 坑还是蛮多的.
此次安装的sakai11的binary版, 根据官方安装指引, 让我们按照一步一个坑的模式开始填.
......
export JAVA_HOME=/home/bosheng/work/javafile/jdk1.8.0_141
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
<Connector port="8080" URIEncoding="UTF-8" ...
......
export JAVA_HOME=/home/bosheng/work/javafile/jdk1.8.0_141
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
# (3)添加的变量
export CATALINA_HOME=/home/bosheng/work/javafile/tomcat8
# (4)添加的变量, 用冒号":"把多个PATH变量隔开, 此处有3个PATH变量${JAVA_HOME}/bin和$PATH和${CATALINA_HOME}/bin
export PATH=${JAVA_HOME}/bin:$PATH:${CATALINA_HOME}/bin
export JAVA_HOME=/home/bosheng/work/javafile/jdk1.8.0_141
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export CATALINA_HOME=/home/bosheng/work/javafile/tomcat8
export PATH=${JAVA_HOME}/bin:$PATH:${CATALINA_HOME}/bin
# 此为(5)添加的内容
export JAVA_OPTS="-server -Xmx1028m -XX:MaxMetaspaceSize=512m -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.awt.headless=true -Dcom.sun.management.jmxremote -Dhttp.agent=Sakai -Djava.util.Arrays.useLegacyMergeSort=true"
<JarScanner>
<!-- This is to speedup startup so that tomcat doesn't scan as much -->
<JarScanFilter defaultPluggabilityScan="false"
defaultTldScan="false"
tldScan="jsf-impl-*.jar,jsf-widgets-*.jar,myfaces-impl-*.jar,pluto-taglib-*.jar,sakai-sections-app-util-*.jar,spring-webmvc-*.jar,standard-*.jar,tomahawk*.jar,tomahawk-*.jar"/>
</JarScanner>
export JAVA_HOME=/home/bosheng/work/javafile/jdk1.8.0_141
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export CATALINA_HOME=/home/bosheng/work/javafile/tomcat8
export PATH=${JAVA_HOME}/bin:$PATH:${CATALINA_HOME}/bin
# 加入了-Dsakai.demo=true和-Dsakai.home=/your/path/tomcat8/sakai/home/
export JAVA_OPTS="-server -Xmx1028m -XX:MaxMetaspaceSize=512m -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.awt.headless=true -Dcom.sun.management.jmxremote -Dhttp.agent=Sakai -Djava.util.Arrays.useLegacyMergeSort=true -Dsakai.demo=true -Dsakai.home=/home/bosheng/work/javafile/tomcat8/sakai/home/"
Excerpt from sakai.properties
username@javax.sql.BaseDataSource=sakaiuser
password@javax.sql.BaseDataSource=sakaipassword
## MySQL settings
vendor@org.sakaiproject.db.api.SqlService=mysql
driverClassName@javax.sql.BaseDataSource=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
url@javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakaidatabase?useUnicode=true&characterEncoding=UTF-8
validationQuery@javax.sql.BaseDataSource=select 1 from DUAL
defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 272
Server version: 5.1.46 MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database sakaidatabase default character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on sakaidatabase.* to sakaiuser@'localhost' identified by 'sakaipassword';
Query OK, 0 rows affected (0.00 sec
mysql> grant all on sakaidatabase.* to sakaiuser@'127.0.0.1' identified by 'sakaipassword';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
sh startup.sh
初次运行, 需要等待一段时间大概3-5分钟保险一点. 之后在浏览器输入http://localhost:8080/portal ,方可访问中文内容的sakai11sh shutdown.sh