Moodle

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. You can help by expanding it.
Resources
Resources

Moodle is a LAMP stack content management system for educators.

Installation

USE flags

Cannot load package information. Is the atom www-apps/moodle correct?

System Arrangement

root #
echo "www-apps/moodle mysqli" >> /etc/portage/package.use
echo "app-eselect/eselect-php apache2" >> /etc/portage/package.use
echo "dev-lang/php gd xmlrpc zip mysqli intl curl soap apache2" >> /etc/portage/package.use
echo "www-apps/moodle" >> /etc/portage/package.accept_keywords

Merge

root #emerge --ask moodle

Adjust Settings

Add -D PHP5 in APACHE2_OPTS to /etc/conf.d/apache

root #
APACHEPHP=$(cat /etc/conf.d/apache2 | grep -c PHP); if [ "$APACHEPHP" = 1 ] ;\
 then echo "done"; else sed -i -e 's/S="/S="-D PHP5 /' /etc/conf.d/apache2; fi

Link moodle to the web root.

root #ln -s /usr/share/webapps/moodle/2.5.1/htdocs/ /var/www/localhost/htdocs/moodle

Mysql

Create a database for moodle to interact with.

Important
change the changeme's to your own password
root #mysql -u root -p
mysql> SET GLOBAL binlog_format = 'ROW';
mysql> CREATE DATABASE IF NOT EXISTS `moodle_db` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
mysql> CREATE USER 'moodle_user'@'localhost' IDENTIFIED BY 'changeme';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `moodle_db`.* TO 'moodle_user'@'localhost' IDENTIFIED BY 'changeme';
mysql> \q

Adjust Configs

root #nano /var/www/localhost/htdocs/moodle/config.php

Adjust $CFG->dbpass to your password. If you intend on using this program with a domain name, insert domain name now.


Web end

Point your browser at http://localhost/moodle

  • continue
  • continue
  • continue (probably bottom left under spell checker module install)
  • fill out & update profile
  • name your site, save changes