Installing Bupt Sakai

Source: Internet
Author: User
Tags arrays character set flush create database mysql database server port tomcat oracle database



system running Software Environment server side:
Operating system: Linux (The following command is based on centos6.4) Windows
Databases: Oracle database 10g or above, MySQL 5.5 or later
Compiling the runtime Environment: Java 1.7 Client:
Windows7, Windows8,ie7 or later, Chrome, Firefox browser
Sakai-resource requires Oracle

System Environment Configuration This installation setup step assumes that:
Linux under the use of Sakai users, user home directory/home/sakai;
Useradd Sakai
passwd Sakai
Cd/home/sakai

Under Windows, install to a partition under the Sakai directory.
If installed according to this hypothetical condition, most configurations do not need to be modified to run. 1. Install MySQL or Oracle (see official documentation) Note: 1. Use the UTF-8 character set and encoding for your database
2.mysql databases are case-sensitive by default in UNIX environments, and WINODWS are not differentiated below. In order to set UNIX below case-insensitive, the Mysqld field in profile my.conf is incremented lower_case_table_name=1

Hurriedly added under the [mysqld] section of MY.CNF (/ETC/MY.CNF) in CentOS: Lower_case_table_names=1

3 Start Service mysqld start
2. Download the installation package and the appropriate JDK versionBupt sakai10 full version Install package Click Download JDK install package Click Download-linux32 JDK install package Click Download-linux64 bit JDK install package Click Download-WINDOWS32 bit JDK install package click Download-WINDOWS64 bit
3. Unzip the installation packageUnzip the downloaded Bupt sakai10 installation package (note directory location)
Linux:
# Extract to current directory [SAKAI@KS1 ~] $unzip sakai10
Windows:
Unzip the Sakai directory of a partition with the decompression tool
4. Installing the JDKUnzip the downloaded JDK (note directory location) Linux: [sakai@ks1 ~] $tar –ZXVF jdk-7u****.tar.gz #
Duplicate the folder after unpacking
[SAKAI@KS1 ~] $MV jdk-7u**** jdk1.7
Windows:
Unzip it with the Unzip tool and rename it to jdk1.7, and the jdk1.7 folder and Tomcat7 folder are placed in the Sakai directory. After completing the above steps, under Linux/home/sakai and Windows partition Sakai directory, there should be jdk1.7, TOMCAT7, Mount three folders5. Tomcat configuration fileTuning JVM Memory Allocations: General Ms <= MX; permsize<=maxpermsize; newsize<=maxnewsize; Permsize+newsize<=ms/2
32-bit: MX setting is not up, can be set to 1024, while PermSize NewSize should be correspondingly reduced
64-bit: MX recommends a minimum setting of 2048, but less than the remaining available memory for the system
In addition to the official operation of the server, it is recommended that ms = MX
1 CD Tomcat7/bin
chmod +x *.sh
2
Linux under Edit tomcat7/bin/setenv.sh:
# Modify the settings to apply the home directory path (i.e. the directory where jdk1.7 and tomcat7 are extracted) user_dir= "/home/sakai"
# Modify settings JVM memory allocation export java_opts= '-server-xms1024m-xmx2048m-xx:P Ermsize=256m-xx:maxpermsize=512m-dhttp.agent=sakai- Xx:newsize=512m-xx:maxnewsize=512m-dorg.apache.jasper.compiler.parser.strict_quote_escaping=false- Djava.awt.headless=true-dcom.sun.management.jmxremote-dsun.lang.classloader.allowarraysyntax=true- Dfile.encoding=utf-8-dsun.jnu.encoding=utf-8-duser.language=zh-djava.util.arrays.uselegacymergesort=true '
3
Add Export jre_home= $JAVA _home/jre
4
SOURCE setenv.sh

Edit Tomcat7/bin/setenv.bat under Windows:
REM # Modify settings user home directory path
Set User_dir=/sakai
REM # Modify set JVM memory allocation
Set java_opts=-server-xms1024m-xmx2048m-xx:permsize=256m-xx:maxpermsize=512m-dhttp.agent=sakai-xx:newsize=512m- Xx:maxnewsize=512m-dorg.apache.jasper.compiler.parser.strict_quote_escaping=false-djava.awt.headless=true- Dcom.sun.management.jmxremote-dsun.lang.classloader.allowarraysyntax=true-duser.language=zh- Djava.util.arrays.uselegacymergesort=true

Edit Tomcat7/conf/server.xml
<context path= "/static" docbase= "/home/sakai/mount/www"/> Here DocBase changed to True path, under Windows for example: "E:/sakai/mount/www", Under Linux for example: "/home/sakai/mount/www".
All the ports in this profile can be adjusted to the server port occupancy you deploy, which is generally the default.
6. Modify the Sakai configuration file tomcat7/sakai/local.propertiesThe configuration items in the Local.properties file will automatically overwrite the configuration items in the Sakai.properties and the Sakai default configuration items, so the frequently-changed configuration items can be placed in this file, although it is possible to use only sakai.properties depending on the needs of the deployment.
Configure database connection: Note that before the configuration needs to establish the appropriate database, MySQL needs to create a new database and a user who has permission to manage the database, Oracle needs to create a new user and authorization, specifically how to build can be Baidu. 6.1
Mysql-u root-p
Enter password
6.2 Creating a user Sakai
6.3 Creating a Database Sakai
6.4 Pay database permissions to Sakai users
The general order is as follows,
Insert into Mysql.user (Host,user,password) VALUES ("localhost", "Sakai", Password ("Sakai"));
Flush privileges;
Create Database Sakai, or create SCHEMA ' Sakai ' DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;

Grant all privileges the sakai.* to sakai@localhost;
Flush privileges;

If you are using a MySQL database, add the following configuration:
Where 127.0.0.1:3306/sakai is changed to a real database address and database name 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/sakai?useunicode=true&characterencoding=utf-8
Validationquery@javax.sql.basedatasource=show variables like ' version '
defaulttransactionisolationstring@javax.sql.basedatasource=transaction_read_committed
  
If you are using an Oracle database, add the following configuration:
Where 127.0.0.1:1521:secondly changes to the real database address and database name
Vendor@org.sakaiproject.db.api.sqlservice=oracle
Driverclassname@javax.sql.basedatasource=oracle.jdbc.driver.oracledriver
Hibernate.dialect=org.hibernate.dialect.oracle10gdialect
Url@javax.sql.basedatasource=jdbc:oracle:thin:@127.0.0.1:1521:sakai
Validationquery@javax.sql.basedatasource=select 1 from DUAL
defaulttransactionisolationstring@javax.sql.basedatasource=transaction_read_committed
  
To set the database access user password:
# Database Login User Username@javax.sql.basedatasource=sakai
# Database Login Password Password@javax.sql.basedatasource=sakai
  
First run please set the data table to be created automatically: Auto.ddl=true
Configure the original components and Pathconfig path directly inside the local.properties to modify: Sakai.resource.path.mount=/home/sakai/mount (according to the actual path modified).
7. Modify various resource file save path
/tomcat7/webapps/sakai-resource/resource/scripts/ckfinder/config.xml
8. Curriculum Space Integration External Question Bank system configuration Instructions
/tomcat7/webapps/sakai-resource/web-inf/components.xml <entry key= "OutSys.exam.user" value= "Test1"/>
Here value is the user name in the question bank system used to connect to the external question bank, and if set to NULL, use Sakai Current user (need to establish the same name in the question bank). <entry key= "OutSys.exam.url.base" value= "http://218.249.255.9:9090"/>
The value here is the corresponding external question bank system address. If you do not configure an external question bank system then set the path to NULL, the relevant function of the question bank (job, self-test) is automatically closed.9. Course Space Integration External resource system Configuration instructions
/tomcat7/webapps/sakai-resource/web-inf/components.xml <entry key= "Sakai.resource.outSys.resSys.url.base" Value= ""/>
The value here is the corresponding external resource system address. If you do not configure the external resource system then set the path to NULL, when the resource system-related functions are automatically closed, related buttons are automatically hidden.10. Course Spatial Data Source configuration
/tomcat7/webapps/sakai-resource/web-inf/components.xml
<!--data Source configuration--
<bean id= "DataSource" class= "Org.apache.commons.dbcp.BasicDataSource" >
<property name= "Driverclassname" value= "Com.mysql.jdbc.Driver"/>
<property name= "url"
Value= "Jdbc:mysql://127.0.0.1:3306/sakai?useunicode=true&characterencoding=utf-8"/>
<property name= "username" value= "Sakai"/>
<property name= "Password" value= "Sakai"/>
</bean>
Note: This corresponds to the local.properties inside the database configuration to make changes.
11. Course Space database table update configuration

/tomcat7/webapps/sakai-resource/web-inf/components.xml
<property name= "Hibernateproperties" >
<props>
<prop key= "Hibernate.dialect" >${hibernate.dialect}</prop>
<prop key= "Hibernate.show_sql" >${hibernate.show_sql}</prop>
<prop key= "Hibernate.cache.provider_class" >${hibernate.cache.provider_class}</prop>
<prop key= "Hibernate.query.substitutions" >true 1, False 0</prop>
<prop key= "Hibernate.hbm2ddl.auto" >update</prop>
</props>
</property>
Note:<prop key= "Hibernate.hbm2ddl.auto" >update</prop>, update indicates the table is updated, none means not automatically updated.
12. Start Tomcat
Sakai boot time is longer, especially if the initial initialization of the database takes longer, and when booting, watch for error messages in the console or log file.
Access Address: Http://localhost:8080/portal
Initial User: Password = admin:admin

13 Some modifications made according to the reported errors

13.1 sakai.properties File

Set up
Serverid=localhost

Servername=localhost
13.2 Changing unrecognized variables (not yet clear why FIXME is not recognized)

CD components

Find *-exec grep-hn "hibernate.dialect" {} \;

sakai-kernel-component/web-inf/db-components.xml:345: <prop key= "Hibernate.dialect" >org.hibernate.dia Lect. Mysql5innodbdialect</prop>

Reference

1 http://www.cnblogs.com/analyzer/articles/1045072.html

2 http://www.bysakai.com/forum.php?mod=viewthread&tid=45&extra=page%3D1

Severe copy 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.