Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: CentOS Linux installation.

CentOS Linux installation: Difference between revisions

From MoodleDocs
mNo edit summary
Line 48: Line 48:
yum -y install php-5.3-xmlrpc-zend-server
yum -y install php-5.3-xmlrpc-zend-server
</code>
</code>
Finally start the zend server:
<code php>
service zend-server start
<code>


=== MySQL ===
=== MySQL ===
Line 116: Line 122:
If you plan on having heavy duty Moodle instance with a lot of users you should increase <code>innodb_buffer_pool_size</code> and <code>innodb_log_file_size</code>, and of course add more RAM.
If you plan on having heavy duty Moodle instance with a lot of users you should increase <code>innodb_buffer_pool_size</code> and <code>innodb_log_file_size</code>, and of course add more RAM.


Do not forget to start the server.
<code>service mysql start</code>
==== Database ====
Now it is time to create database for the Moodle. This is the recommended command:
<code php>
create database <dbname> character set=utf8 collate=utf8_bin;
</code>
The reason for specifying collation as utf8_bin is that it is the only collation that offers proper treatment of special and accented characters in sorting and comparison. For more details on this see this [http://moodle.org/mod/forum/discuss.php?d=163766 forum thread].


=== Apache ===
TODO:


=== Moodle ===
TODO:


[[Category:Administrator]]  
[[Category:Administrator]]  
[[Category:Moodle_2.0]]
[[Category:Moodle_2.0]]

Revision as of 21:51, 8 February 2011

Moodle 2.0


Installing Moodle 2.0 on stock version of CentOS 5.x is not that straightforward due to a limitations imposed by the software available in the default repositories.

So let us go step by step in configuring and installing Moodle 2.0 on CentOS 5.5.

Asumptions

  • We have just a minimal OS installation
  • PHP is not installed
  • No RDBMS is installed
  • Apache is not installed
  • We plan on using MySQL as Moodle RDBMS

Requirements

As you may or may not know Moodle 2.0 requires following versions of software:

Element Version
PHP 5.2.8 (5.3.3 or more recent recommended)
MySQL 5.0.25 (5.5.x recommended)
Apache 2.2.x (CentOS ships with 2.2.3)

PHP

By default CentOS 5.5 ships with PHP 5.1.6. It is very old version and unsupported by Moodle 2. To avoid recompiling PHP I recommend use of certified PHP build -Zend Server 5.x Community Edition .

Before being able to download it you will need to register and login on the site which is free of charge. Site offers several options for installing the product and the one I recommend is the RPM installer.

You can find detailed description of this process here. Make sure to install PHP 5.3 for the best results.

Execute this in command line sh install_zs.sh 5.3 ce

and after all the installation process add this package:

yum -y install php-5.3-xmlrpc-zend-server

Finally start the zend server:

service zend-server start

MySQL

MySQL is a good choice for Moodle RDBMS but it requires a bit more tackling to get adequate power. CentOS repositories ship with older version of MySQL (5.0.77 at the time of writing). It is highly recommended to install and use MySQL 5.5 using Oracle's official rpm packages.

Getting the packages

To do that go to MySQL 5.5. GA download page. Download the client utilities ( MySQL-client-5.5.x-x.rhel5.xxxx.rpm ) and MySQL Server (MySQL-server-5.5.x-x.rhel5.xxxx.rpm) package.

Installation

After that install the downloaded packages by executing this from command line:

rpm -ivh MySQL-*

Configuration

MySQL 5.5 does not install any configuration file by default so we need to create one. You can use one of the existing configuration files as starting points for your personalized configuration. They are located here:

/usr/share/mysql/my-huge.cnf /usr/share/mysql/my-innodb-heavy-4G.cnf /usr/share/mysql/my-large.cnf /usr/share/mysql/my-medium.cnf /usr/share/mysql/my-small.cnf

To use any of these just copy them to the /etc/my.cnf. For example:

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

For the purporse of installing Moodle 2.0 this is the configuration that I recommend as a starting point for a small Moodle instance:

[client] port = 3306 socket = /var/lib/mysql/mysql.sock

[mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock

character-set-server=utf8 collation-server=utf8_bin

innodb_buffer_pool_size=400M innodb_additional_mem_pool_size=40M innodb_log_file_size=100M innodb_log_buffer_size=4M innodb_flush_method=O_DIRECT transaction_isolation=READ-COMMITTED

  1. You can disable the TCP/IP protocol support
  2. and all of the communication will be done through UNIX sockets

skip-networking

  1. If you use additional web applications or other programs
  2. that do not support connections through UNIX Sockets,
  3. do not disable TCP/IP. Just force the
  4. server to accept connections only from localhost
  5. bind-address=127.0.0.1
  1. Disable symbolic links

symbolic-links=0

If you plan on having heavy duty Moodle instance with a lot of users you should increase innodb_buffer_pool_size and innodb_log_file_size, and of course add more RAM.

Do not forget to start the server.

service mysql start

Database

Now it is time to create database for the Moodle. This is the recommended command:

create database <dbname> character set=utf8 collate=utf8_bin;

The reason for specifying collation as utf8_bin is that it is the only collation that offers proper treatment of special and accented characters in sorting and comparison. For more details on this see this forum thread.

Apache

TODO:

Moodle

TODO: