Changes

Jump to navigation Jump to search
2,611 bytes added ,  18:13, 8 December 2013
wikify
Line 119: Line 119:  
mysql $CONNECT < <dbname>.dump</nowiki>
 
mysql $CONNECT < <dbname>.dump</nowiki>
 
   
 
   
===Install Moodle using git===
+
===Install Moodle 2.6 using git===
====Installation====
+
====Requirements====
<nowiki>
+
* Recommended minimum browser: recent Google Chrome, recent Mozilla Firefox, Safari 6, Internet Explorer 9 (IE 10 required for drag and drop of files from outside the browser into Moodle)
###
+
* Moodle upgrade: Moodle 2.2 or later (if upgrading from earlier versions, you must upgrade to 2.2.11 as a first step)
# TODO
+
* Minimum DB versions: PostgreSQL 8.3, <span style="color:red;">MySQL 5.1.33</span>, MariaDB 5.3.5, MSSQL 2005 or Oracle 10.2
###
+
* Minimum PHP version: <span style="color:green">PHP 5.3.3</span> (always use latest PHP 5.4.x or 5.5.x on Windows - http://windows.php.net/download/)
yum install php-soap --enablerepo=smedev
+
* New recommended PHP extensions: <span style="color:green">zlib</span>, <span style="color:red;">OPcache</span>
 +
 
 +
=====DB Version=====
 +
SME Server 8.x comes with MySQL v5.0.95.  In order to install Moodle without risking destabilizing a SME server by changing the MySQL version, you can install MariaDB 5.3.54 ''alongside'' MySql.
 +
 
 +
=====OPcache=====
 +
Zend OPcache is built-in to PHP 5.5, and can be compiled to work with PHP 5.3.3. 
   −
#
+
I have not been able to find a source online for an RPM for OPcache.
# http://wiki.contribs.org/Moodle
  −
#
  −
# Manual Process
     −
    # create ibay 'moodle'
+
I believe this will make Moodle run more slowly than it would *with* OPcache.
   −
    # fix ibay settings & permissions
+
====Installation====
 +
=====Prepare your server=====
 +
======Install useful php modules======
 +
* During installation, Moodle will request php-soap, php-xmlrpc and php-intl.  These are all available from the 'smeaddons' repository, and can be installed using:
 +
yum install php-soap php-xmlrpc php-intl
   −
IBAY=moodle
+
======Create an ibay======
 +
* Create an ibay named 'moodle' in server-manager
 +
* Customize some of the settings on the new moodle ibay
 +
<nowiki>IBAY=moodle
 
/sbin/e-smith/db accounts setprop $IBAY \
 
/sbin/e-smith/db accounts setprop $IBAY \
 
FollowSymLinks enabled \
 
FollowSymLinks enabled \
Line 149: Line 159:  
mkdir /home/e-smith/files/ibays/$IBAY/moodledata
 
mkdir /home/e-smith/files/ibays/$IBAY/moodledata
 
chown www:www /home/e-smith/files/ibays/$IBAY/moodledata
 
chown www:www /home/e-smith/files/ibays/$IBAY/moodledata
 +
#</nowiki>
 +
 +
======Create a database======
 +
* Install Mariadb ''alongside'' mysql
 +
* create a mariadb database for moodle
 +
<nowiki># Generate a random 23 character password
 +
DBPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c23`
 +
DBNAME=xmoodle
 +
DBUSER=xmoodle
 +
CONNECT=--socket=/opt/mariadb-data/mariadb.sock
 
#
 
#
# Install [[Mariadb]] "alongside"
+
echo Creating Database using: ; \
# create mariadb database
+
echo DBNAME=$DBNAME ;\
#
+
echo DBUSER=$DBUSER ;\
mysql --socket=/opt/mariadb-data/mariadb.sock
+
echo DBPASS=$DBPASS ;\
create database moodle;  
+
echo ;\
grant all privileges on moodle.* to moodle@localhost identified by '35W0SujwtMUmLFg7qkKi' with grant option;  
+
echo Save this information. You will need it later during initial application setup! (press \<enter\> when done) ;\
 +
read
 
#
 
#
 +
mysql $CONNECT -e "create database $DBNAME;
 +
grant all privileges on $DBNAME.* to $DBUSER@localhost identified by \"$DBPASS\" with grant option;
 +
quit"</nowiki>
    +
=====Install Moodle=====
 +
======Download & Checkout using git======
 +
<nowiki>
 
     #
 
     #
   
     # Download moodle using git
 
     # Download moodle using git
   
     # http://docs.moodle.org/26/en/Git_for_Administrators#Obtaining_the_code_from_Git
 
     # http://docs.moodle.org/26/en/Git_for_Administrators#Obtaining_the_code_from_Git
   
     #
 
     #
 
+
IBAY=moodle
 
cd /home/e-smith/files/ibays/$IBAY
 
cd /home/e-smith/files/ibays/$IBAY
git clone git://git.moodle.org/moodle.git
+
mv html html.org
cd moodle
+
git clone git://git.moodle.org/moodle.git html
 +
cd html
 
git branch -a
 
git branch -a
 
git branch --track MOODLE_26_STABLE origin/MOODLE_26_STABLE
 
git branch --track MOODLE_26_STABLE origin/MOODLE_26_STABLE
 
git checkout MOODLE_26_STABLE
 
git checkout MOODLE_26_STABLE
 
#
 
#
# rename git folder as html and correct ownership
+
# correct ownership
#
  −
cd /home/e-smith/files/ibays/$IBAY
  −
mv html html.org
  −
mv moodle html
   
signal-event ibay-modify $IBAY
 
signal-event ibay-modify $IBAY
#
+
</nowiki>
 +
======Run the installer======
 +
<nowiki>#
 
# run the command line installer
 
# run the command line installer
 
# if prompted, set:
 
# if prompted, set:
 
     # mysql port: 3307
 
     # mysql port: 3307
 
     # mysql socket: /opt/mariadb-data/mariadb.sock
 
     # mysql socket: /opt/mariadb-data/mariadb.sock
    #
  −
    # if not prompted, edit /home/e-smith/files/ibays/moodle/html/config.php manually
   
     #
 
     #
 
cd /home/e-smith/files/ibays/$IBAY/html/admin/cli
 
cd /home/e-smith/files/ibays/$IBAY/html/admin/cli
 
sudo -u www /usr/bin/php install.php
 
sudo -u www /usr/bin/php install.php
 
</nowiki>
 
</nowiki>
 +
======Correct database settings if necessary======
 +
If you were not prompted for database socket, port, or other connection settings during the command line setup, you will need to correct the settings manually.
 +
 +
The database connection settings are stored in this file:
 +
/home/e-smith/files/ibays/moodle/html/config.php
 +
 +
If you have just run the above database connection commands in the same putty session, you can correct your moodle settings using:
 +
<nowiki>sed -i  s/dbname.*/dbname\ \ \ \ \=\ \'$DBNAME\'\;/  /home/e-smith/files/ibays/moodle/html/config.php
 +
sed -i  s/dbuser.*/dbuser\ \ \ \ \=\ \'$DBUSER\'\;/  /home/e-smith/files/ibays/moodle/html/config.php
 +
sed -i  s/dbpass.*/dbpass\ \ \ \ \=\ \'$DBPASS\'\;/  /home/e-smith/files/ibays/moodle/html/config.php</nowiki>
    
===Notes on check_earlytalker===
 
===Notes on check_earlytalker===

Navigation menu