domingo, febrero 22, 2009

Installation of Sakai 2.5 under Solaris 10u6 using MySQL 5.1 CS

Sakai is a great virtual collaboration and learning environment designed mainly for research activities. It' s written in Java using a several open source componets such that: apache maven, apache tomcat, hibernate and others. Sakai is published under terms of Educational Community License v. 1.0., which is certified for OSI Initiative. More information about Sakai:
Enlace

Well, and now, i'm going to describe the installation process of Sakai from the sources under Solaris 10 OS (update 6), using the MySQL Server version 5.1 (Community Server). I think, this same instructions can be usefull for OpenSolaris (and Linux distros, with some changes !)

The summary of installation process:
  1. Download the Sakai sources and other components as the servlet container, the Java SDK, etc,,
  2. Install the database server (in this case MySQL) and create the Sakai's database.
  3. Create the environment to compile and deploy Sakai.
  4. Compile and deploy Sakai
  5. Connect Sakai with database Server.
  6. Start the Tomcat Server

Step 1: Download the necessary software:

To compile an deploy Sakai, with MySQL support, we need:

All this software may be downloaded on /opt directory, although you can choose another location.

Remark: The shell used for installation process is Bash. If you use another shell, for instance KSH or C-Shell, consult the documentation for export environment variables and execute files.

Step 2: Install the MySQL Server

Before to install the MySQL server, you must to create the mysql user and group:

# groupadd mysql
# useradd -d /var/lib/mysql -s /bin/bash mysql
# usermod -G mysql mysql

And now, we can to install and start the MySQL server:

# cd /opt
# gunzip mysql-5.1.31-solaris10-i386.pkg.gz
# pkgadd -d mysql-5.1.31-solaris10-i386.pkg all
# /etc/init.d/mysql start

Add the mysql commands to the PATH:

# export PATH=$PATH:/opt/mysql/mysql/bin

Verify the connection: (The root user has an empty password )

# mysql -u root -p

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.31 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Create the Sakai database:

mysql> create database sakai default character set utf8;
Query OK, 1 row affected (0.00 sec)

Note: If you want, you can to add the mySQL service as part of SMF. See: http://pastebin.com/f2c7200bd

For step 3 and 4, the main reference is the install guide of Sakai 2.4.5, however it can be summarized:

Step 3: Create the environment to compile and deploy Sakai:


# cd /opt
# tar xzf apache-tomcat-5.5.26.tar.gz
# tar xzf apache-maven-2.0.10-bin.tar.gz
# ln -s apache-tomcat-5.5.26 tomcat
# ./jdk-1_5_0_17-solaris-i586.sh
# export JAVA_HOME=/opt/jdk1.5.0_17
# export PATH=$PATH:$JAVA_HOME/bin
#export JAVA_OPTS="-server -Xms768m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:NewSize=192m -XX:MaxNewSize=384m"
# export CATALINA_HOME=/opt/tomcat
# export PATH=$PATH:/opt/tomcat/bin
# export MAVEN_HOME=/opt/apache-maven-2.0.10/
# export PATH=$PATH:/opt/apache-maven-2.0.10/bin
#export MAVEN_OPTS='-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m'Enlace# cd $HOME
# mkdir -p .m2/repository
# vi .m2/settings.xml /* with this content: See: Install Guide of Saka 2.5.4. section Maven; subsection: create a maven settings.xml file. */



After, create the setenv.sh file in /opt/tomcat/bin, with this content:

export JAVA_OPTS="-server -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=160m -Djava.awt.headless=true"


Note: You can save the environment variables declared above in your .bashrc file.

Modify the /opt/tomcat/bin/catalina.sh file and change the shell binary:

#!/bin/sh for:
#!/bin/bash

Step 4: Compile and deploy Sakai:

# cd /opt
# tar xzf sakai-src-2.5.4.tar.gz
# cd sakai-src-2.5.4/master
# mvn clean install
(outpur truncated ...)
# cd ..
# mvn clean install sakai:deploy -Dmaven.tomcat.home=/opt/tomcat
(meanwhile you can drink a coffee! )

If the Build is successfull, you can to go a the next step ....

Step 5: Connect Sakai with database Server.

# tar xvzf mysql-connector-java-5.1.7.tar.gz
# cp mysql-connector-java-5.1.7/*.jar /opt/tomcat/common/lib

Copy the sakai.properties file located at:

/opt/sakai-src-2.5.4/component/component-api/component/src/config/org/sakaiproject/config/sakai.properties

to /opt/tomcat/sakai

To add the information about the database vendor (MySQL), change for the
appropriate values:

# Usser and password to database access:

username@javax.sql.BaseDataSource=root
password@javax.sql.BaseDataSource=123456

# MySQL settings - make sure to alter as appropriate
vendor@org.sakaiproject.db.api.SqlService=mysql
driverClassName@javax.sql.BaseDataSource=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
url@javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUnicode=true&characterEncoding=UTF-8
validationQuery@javax.sql.BaseDataSource=select 1 from DUAL
defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED

Step 6: Start the tomcat server:

To finish:

# startup.sh

Ready, Sakai is installed !. To access it: http://{server-name}:8080/portal


6 comentarios:

Unknown dijo...

Domingo,
Would you know by any chance how Sakai is different than Moodle in terms of functionality and usage?

jpromerobx dijo...
Este comentario ha sido eliminado por el autor.
jpromerobx dijo...

Well, in the Epic website (http://www.epic.co.uk) you can find out some usefull papers about e-learning systems comparatives. However, i recommended to read the Mark Aberdour's paper (download it) an excellent reference. I hope this helps !

Anónimo dijo...

hi

can anyone help me
i have tried for over a week now to get a loan,i have very bad credit history mainly due to a failed marrage ,i have had all the usual ,wh loans,advantage loans ,yes loans ,get in touch and promise a [url=http://www.usainstantpayday.com]bad credit loans[/url] on paying the brokerage fee,i am reluctant due to reviews on the net and i have been stung before by a company called wentorth finance ,and never got the loan of the 50 pound fee back,
i have had an offer from flm but need a gaurantor which isnt really an option either .
i wondered if anyone had any loan companys that considered bad credit ,but loaned direct without these numerous sites with different alias but mainly did same thing pay us and we will get u loan (maybe)senario
has anyone also heard of a company called fresh loans they have they sent me details out but the may be a charge but not always ,i suspect she didnt want to tell me there was a charge

thanks
sottartaderve

Anónimo dijo...

[color=#5588aa]Hello

With the increasing popularity of bebo poker chips as a virtual currency in zynga texas holdem poker game many phishers have engaged themselves, who try their best to trick unsuspecting players out of their hard earned bebo poker chips. All over the internet forums are littered with posts by innocent people who have had their chips stolen. Nothing is as sorry state as logging to Facebook or MySpace to play a few games of poker only to find that someone has already been in your account and your poker chips are gone.[/color]

[url=http://www.chipshut.com][img]http://www.chipshut.com/img/facebook-poker-chips-hut.jpg[/img][/url]

[color=#5588aa]Follow these tips to keep your facebook poker chips safe:

Never give your password to a stranger: Trust is a delicate thing that takes a long time to build but only second to destroy. You may meet a sexy girl in poker room and you are friends with him/her. He/she will keep interacting with you days before playing her trick. So be carefull enough to protect your login credentials to yourself, else this may lead to disaster.

Be careful about what you download: Professional online gamers are looking for cheats or hacks for the games they play in order to give them an edge on their opponents. Poker is no different and there are many websites on the internet giving free downloads for facebook poker cheats and hacks for those brave enough to download and install them. But many of these so called facebook poker cheats have viruses or trojan programs. The moment you install any of these your computer is at the risk of attacks by the creator of the program. He can then have access to vital information that you access from your computer. Leaving your facebook poker account at risk of been hacked. If you never downloaded any of these programs then you’re probably safe, and if you have then you should run a spyware detection program. The best move will be for get your computer formatted to avoid any loop holes.

Phishing Links: This way of hacking has been thee for quite sometime now. Scammers send legitimate and official looking emails to your inbox. When you open them you are asked to click on the link and login in order to save your account or win free facebook poker chips, but in reality you are logging into a fake site that sends your information off to the hacker who made it. Before you find it out, its too late to react and they would have already broken into your account and emptied it of any facebook poker chips that you may have.

YouTube scams: If you do a search on youtube for facebook poker cheats, zynga poker hacks, or free facebook poker chips you’ll find hundreds of videos on the topic. More than 90% of them are made by idiots hoping to convince you to send them your account information. They range from slightly clever to completely moronic.

Image Photo Having Exe Embedded In it: This one is hard to catch. This is the latest fashion that is used by theif, you will be asked to share family photo's. When you open their photo, that will innitiate an exe in the background which will steal all your information and send to the mastermind behin it. So be careful with whom you share photos.

Hope these tips help you saving your chips.

These tips have been brought to you by [/color][url=http://www.chipshut.com]Chips Hut[/url][color=#5588aa] if you are looking to buy [/color][url=http://www.chipshut.com]facebook poker chips[/url], [color=#5588aa]you may go to our online store.

Have a nice day[/color][img]http://www.chipshut.com/img/chips-hut-smily.gif[/img]

Anónimo dijo...

Hello, as you may already noted I'm recent here.
I will be glad to get some assistance at the beginning.
Thanks and good luck everyone! ;)