Obsolete Releases > SME 8.x Contribs

[Announce] Moodle 2.5 for SME 8.0

(1/5) > >>

varuna:
Hi everyone,
 
Moodle (acronym for Modular Object-Oriented Dynamic Learning Environment) is a free software e-learning platform, also known as a Learning Management System, or Virtual Learning Environment (VLE). As of June 2013 it had a user base of 83,008 registered and verified sites, serving 70,696,570 users in 7.5+ million courses with 1.2+ million teachers. [wikipedia]

The latest version of Moodle is 2.5 (as of today) and the latest version of SME Server is 8.0 (as of today). Moodle requires PHP 5.3.3 (built in to SME8.0 ) and MySQL 5.1.33 (SME8 has 5.0.95).

There exists a problem as the latest mysql (5.5.32) does not work properly and fails to load up in SME8.

We have made an rpm that includes the latest Moodle 2.5 and figured out a way in getting MySQL to start.

The below steps is how we did this.

We first enable the InnoDB property of mysqld service.
/sbin/e-smith/db configuration setprop mysqld InnoDB enabled

Expand configuration to register
/sbin/e-smith/expand-template /etc/my.cnf

Then we fetch the latest MySQL 5.3.3 from the atomic repository as so:
/sbin/e-smith/db yum_repositories set atomic repository Name 'Atomic EL5' MirrorList 'http://www.atomicorp.com/mirrorlist/atomic/centos-5-$basearch' GPGCheck yes GPGKey 'https://www.atomicorp.com/RPM-GPG-KEY.art.txt' Visible no

Signal event now to register the yum command in accepting the added repository above:
/sbin/e-smith/signal-event yum-modify

Finally we yum install the MySQL with the command:
/usr/bin/yum -y --enablerepo='atomic' install mysql

At this point, MySQL still fails to start up properly. For are going to be adding a template that is related to InnoDB.

We first make the directory of the file we want to expand: (read SME Developer Manual to understand the logic behind why we do this)
/bin/mkdir -p /etc/e-smith/templates-custom/etc/my.cnf/

The template that we want to expand to form my.cnf: call it 009innodb and have the following contents:

{
    my $innodb = $mysqld{InnoDB} || 'disabled';

    return "skip-innodb" unless $innodb eq 'enabled';

    # innodb is enabled. We'll use the MySQL-AB-recommended innodb
    # defaults for small to medium sites, from the my-medium.cnf file
    # distributed with MySQL
    $OUT .= "innodb_data_home_dir = /var/lib/mysql/\n";
    $OUT .= "innodb_data_file_path = ibdata1:10M:autoextend\n";
    $OUT .= "innodb_log_group_home_dir = /var/lib/mysql/\n";
    $OUT .= "innodb_buffer_pool_size = 16M\n";
    $OUT .= "innodb_additional_mem_pool_size = 2M\n";
    $OUT .= "innodb_log_file_size = 5M\n";
    $OUT .= "innodb_log_buffer_size = 8M\n";
    $OUT .= "innodb_flush_log_at_trx_commit = 1\n";
    $OUT .= "innodb_lock_wait_timeout = 50\n";
}


We then copy this file to the template directory to be expanded:
cp /path/to/009innodb /etc/e-smith/templates-custom/etc/my.cnf/009innodb

Naturally, we finally expand this template to form my.cnf file:
/sbin/e-smith/expand-template /etc/my.cnf

All of the changes need to be registered in as post-upgrade and mysqld service would need to be restarted for the changes to take effect. Maybe a reboot command would be nice as well.
/sbin/e-smith/signal-event post-upgrade;
/usr/bin/sv t mysqld

The final step that we would want to do is install Moodle 2.5 over this.
We have made an RPM that installs the moodle directory in /opt/moodle/ . We would run the rpm installation command as:

rpm -i --nomd5 /path/to/moodle-2.5.0-01.noarch.rpm

You can find this RPM in my sourceforge.net project:
https://sourceforge.net/projects/moodle25forsmeserver80/

So this is how we did this. MySQL works well and seems to be compatible with Moodle. SME9 should support a much newer version of mysql that Moodle would support. What we did above is set up MySQL and play with SME8's default settings to make this work.

This is a good intermediate solution in my opinion before SME9 is released. Both moodle and SME8 seems to function as intended.

Thanks,
Varuna

john56:
interesting, thanks !
do you believe we can update moodle to the last version ?

LANMonkey:
I have tried to upgrade SME's MySQL to a 5.5 version or better with disastrous results.  Somebody refered me to this post and I thought I'd try your solution.  But I'm a little confused about what your target version upgrade is.  I see:


--- Quote ---There exists a problem as the latest mysql (5.5.32) does not work properly and fails to load up in SME8.
--- End quote ---

But later in the instructions you say,


--- Quote ---Then we fetch the latest MySQL 5.3.3 from the atomic repository as so:
--- End quote ---

Is that a typo?  Aren't you trying to upgrade to 5.5?  Or is 5.3.3 enough for your purposes?

Please explain.

janet:
LANMonkey

It took 2 minutes to configure the atomic repo & go part way through the install to see what packages would be installed.
Here is part of the log, showing that mysql will be upgraded to 5.5.33-20


 Package            Arch      Version                         Repository   Size
================================================================================
Updating:
 mysql              i386      5.5.33-20.el5.art               atomic      7.6 M
Installing for dependencies:
 libXaw             i386      1.0.2-8.1                       base        324 k
 libXmu             i386      1.0.2-5                         base         62 k
 libaio             i386      0.3.106-5                       base         19 k
 libedit            i386      3.0-2.20090923cvs.el5.art       atomic       80 k
 mysql-libs         i386      5.5.33-20.el5.art               atomic      1.1 M
 mysqlclient15      i386      5.0.90-2.el5.art                atomic      1.4 M
 t1lib              i386      5.1.2-2.el5.art                 atomic      194 k
Updating for dependencies:
 mysql-server       i386      5.5.33-20.el5.art               atomic       13 M
 php                i386      5.4.21-27.el5.art               atomic      3.2 M
 php-cli            i386      5.4.21-27.el5.art               atomic      3.1 M
 php-common         i386      5.4.21-27.el5.art               atomic      1.1 M
 php-devel          i386      5.4.21-27.el5.art               atomic      3.1 M
 php-gd             i386      5.4.21-27.el5.art               atomic      216 k
 php-imap           i386      5.4.21-27.el5.art               atomic       93 k
 php-ldap           i386      5.4.21-27.el5.art               atomic       66 k
 php-mbstring       i386      5.4.21-27.el5.art               atomic      1.2 M
 php-mysql          i386      5.4.21-27.el5.art               atomic      171 k
 php-pdo            i386      5.4.21-27.el5.art               atomic      126 k
 php-xml            i386      5.4.21-27.el5.art               atomic      221 k

Transaction Summary
================================================================================
Install       7 Package(s)
Upgrade      13 Package(s)

Total download size: 36 M
Is this ok [y/N]:

*************************************************

Another approach for yourself or other users wanting newer packages eg mysql, php etc, is to start using sme9.

I know you'll say, oh it's still beta & risky, but probably it's a safer option to use the sme9beta2 or beta3 OS software, than it is to upgrade sme8 with newer key packages which may or may not cause problems in time.
Keep in mind sme9 is using well proven CentOS 6 packages, so it's only the sme server specific additions & code that are really in beta stage.

Historically sme betas for past releases have been very good & most functions are operating once beta 2 or 3 is reached.
I know of people who used sme betas in production for 2 years without any real problems before the final release happened.

Try sme9 for yourself & see, it could be an easier, safer & better outcome.
I think the only real issues with sme9 beta 2 are installer based, note that beta 3 is almost released, an iso is in the hands of developers for testing, or it can be downloaded if you are in a hurry to get it, search the dev mail lists or ask here for the location.

Also see http://forums.contribs.org/index.php/topic,50337.0.html

LANMonkey:
I am using SME 9 alpha 3.  When I check the version of MySQL on this SME, I find:


--- Code: ---mysql  Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (i386) using readline 5.1
--- End code ---

This is not as late a version as I need.

I tried the above procedure and when I got to:


--- Code: ---Finally we yum install the MySQL with the command:
/usr/bin/yum -y --enablerepo='atomic' install mysql
--- End code ---

The procedure was halted with errors:


--- Code: ---....
--> Finished Dependency Resolution
Error: Package: php-imap-5.4.23-29.el5.art.i386 (atomic)
           Requires: libc-client.so.1
Error: Package: php-common-5.4.23-29.el5.art.i386 (atomic)
           Requires: libcurl.so.3
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

--- End code ---

The last time I tried to install a later version of MySQL, I had similar problems with PHP packages:

http://forums.famillecollet.com/viewtopic.php?pid=5320#p5320

Navigation

[0] Message Index

[#] Next page

Go to full version