Construction of the Sakai development environment on the open-source network teaching platform

Source: Internet
Author: User
Sakai demo

Decompress sakai-demo-2.8.0.zip to the E: \ Sakai directory.

Modify the java_opts and catalina_opts parameters in the start-sakai.bat file, if the machine memory has 4G can not be changed.

Change-server-xmx1024m-XX: maxnewsize = 256 m-XX: maxpermsize = 512m to-server-xmx512m-XX: maxnewsize = 128 M-XX: maxpermsize = 256 m

Run start-sakai.bat

Access http: // localhost: 8080/portal. All accounts and passwords are admin

Sakai bin package installation

This method is generally used for deployment in the formal running environment.

Tomcat tuning process see: https://confluence.sakaiproject.org/display/DOC/Sakai+CLE+2.8+Release+Notes

Decompress sakai-bin-2.8.0.zip and overwrite all directories to the tomcat installation directory.

Create a Sakai directory under the Tomcat root directory and add a Sakai. properties file. For details about the files, see the Sakai-demo directory.

The default database is HSQLDB.

To replace it with MySQL, first create a new database Sakai in MySQL, and the table Sakai in the database will be automatically created.

Modify the Sakai. properties file.

# Database Driver Class driverClassName@javax. SQL .BaseDataSource = com. MySQL. JDBC. Driver # database connection string url@javax. SQL .BaseDataSource = JDBC: mysql: // localhost: 3306/Sakai? Useunicode = true & characterencoding = UTF-8 # Database Type vendor@org.sakaiproject.db.api.SqlService = MySQL # configure hibernatehibernate. dialect = org. hibernate. dialect. mysqlinnodbdialect # automatically create a table, index auto. DDL = true

Sakai Development Environment

1. Install apache-maven-2.2.1

Install it to the root directory of drive D and add it to the Environment Variable

Maven_home is D: \ apache-maven-2.2.1

Add D: \ apache-maven-2.2.1 \ bin in Path

Modify the D: \ apache-maven-2.2.1 \ conf \ Settings. xml file, add

<localRepository>D:/m2/repository</localRepository>

2. Decompress sakai-src-2.8.0.zip to the E: \ Sakai directory.

3. Open the command line window function in any directory

To add a command at the command prompt to the shortcut menu, copy the following text to a file named exist here. Reg:

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\shell\OpenNew]@="Command Prompt"[HKEY_CLASSES_ROOT\Directory\shell\OpenNew\Command]@="cmd.exe /k cd %1"

Double-click the register here. reg file to automatically add the registry key.

4. Open the command line window in the E: \ Sakai \ sakai-src-2.8.0 directory

Common Maven commands

MVN cleanmvn compilemvn install # compile and generate jar or war files first, and then store the local repositorymvn-dmaven. tomcat. Home = E:/Sakai/tomcat SAKAI: deploy # deploy to Tomcat

Run MVN install to compile the entire project.

5. Create a new workspace in eclipse pointing to E: \ Sakai

6. Add the m2_repo variable to eclipse

Choose WINDOW> preferences> JAVA> build path> classpath variables.

Add m2_repo classpath variable to point to $ user_home/. MAVEN/Repository

7. Run in E: \ Sakai \ sakai-src-2.8.0

mvn eclipse:cleanmvn eclipse:eclipse

The two commands re-produce the. classpath file under the root directory and add dependency packages to it.

If a new dependency package is added, the two commands must be re-executed.

8. Import the project

Delete. classpath and. Project under the E: \ Sakai \ sakai-src-2.8.0 directory.

Import an existing project from eclipse, directory select E: \ Sakai \ sakai-src-2.8.0. Note that do not select copy projects into workspace.

After the import is complete, there will be 12 errors (27 errors are generated after compilation in eclipse), mainly because the webapp directory or bundle directory is not found.

In the first case, the webapp directory is not found. For example, login-render is a war Steamed Stuffed Bun project. Its compilation depends on login-render-engine-impl, while login-render-engine-impl is in SRC of the compiling path, login-render is also referenced with an absolute path, so both projects cannot be compiled. The solution is to delete the pair e in login-render-engine-impl: sakai-src-2.8.0/login-render-engine-impl/Pack/src/webapp references.

For example, Sakai-calendar-impl, select the source in the compilation path, and delete the error record.

The general project reference sequence is XXX-pack => XXX-impl => XXX-API.

In the second case, the bundle directory is not found because the bundle directory is put in the same level directory as the project, and the Pom is not created. Eclipse does not recognize this project. The solution is to delete the reference of the error source directory in the source of the compilation path.

Follow these steps to solve all errors in eclipse.

Eclipse is only used to assist in development and compilation. You can use the MVN install command to package the project.

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.