Instalación Moodle 2 en Linux mediante paquetes compilados

De MoodleDocs
Revisión del 11:56 16 feb 2011 de Jose L Guerra (discusión | contribs.) (Página creada con 'Información inicial El software se instalará en el sistema de ficheros /moode_soft/<nombre software> Los datos estarán en el sistema de ficheros /moode_datos/bddatos Los ant...')
(difs.) ← Revisión anterior | Revisión actual (difs.) | Revisión siguiente → (difs.)

Información inicial

El software se instalará en el sistema de ficheros /moode_soft/<nombre software> Los datos estarán en el sistema de ficheros /moode_datos/bddatos Los anteriores sistemas de ficheros deben existir y tener espacio sufiente



Descargamos los programas

httpd-2.2.17 moodle-latest-20 mysql-5.5.8 php-5.3.5 phpMyAdmin-3.3.9-all-languages


Deben estar instaladas las extensiones de PHP

  • PHP cURL
  • PHP Zip


INSTALAR CMAKE

wget http://www.cmake.org/files/v2.8/cmake-2.8.4-rc2.tar.gz

tar -xvzf cmake-2.8.4-rc2.tar.gz

cd ./cmake-2.8.4-rc2

./bootstrap --prefix=/usr/bin

make

make install




INSTALAR MYSQL

groupadd mysql

useradd -g mysql -c "MySQL Server" mysql

gzip -d mysql-5.5.8.tar.gz

tar -xvf mysql-5.5.8.tar

cmake . -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/moodle_datos/bdmoodle -DCMAKE_INSTALL_PREFIX=/moodle_soft/mysql -DINSTALL_LAYOUT=STANDALONE -DENABLED_PROFILING=ON -DMYSQL_MAINTAINER_MODE=OFF -DWITH_DEBUG=OFF

make

make install

cd /moodle_soft/mysql

chown -R mysql .

chgrp -R mysql .

/etc/init.d/mysql.server start

scripts/mysql_install_db --user=mysql --datadir=/moodle_datos/bdmoodle/

chown -R root .

chown -R mysql /moodle_datos/bdmoodle/

cp support-files/my-medium.cnf /etc/my.cnf

chown root:sys /etc/my.cnf

chmod 644 /etc/my.cnf

cp support-files/mysql.server /etc/init.d/mysql.server

chmod +x /etc/init.d/mysql.server

/sbin/chkconfig --level 3 mysql.server on

echo "/moodle_soft/mysql/lib/mysql" >> /etc/ld.so.conf

ldconfig

cd /moodle_soft/mysql/bin

for file in *; do ln -s /moodle_soft/mysql/bin/$file /usr/bin/$file; done

mysqladmin -u root password jlggYO01

mysqladmin -h lcmsjlgg password jlggYO01

mysql -u root -p

drop database test;

use mysql;

delete from db;

delete from user where not (host="localhost" and user="root");

update user set user="sqladmin" where user="root";

flush privileges;

(Dentro de mysql ejecutamos) exit

Editar el fichero /etc/my.cnf

  • Añadir las siguientes líneas
   basedir=/moodle_soft/mysql
   datadir=/moodle_datos/bdmoodle




INSTALAR APACHE

groupadd apache

useradd -g apache -c "Apache Server" apache

gzip -d httpd-2.2.17.tar.gz

tar -xvf httpd-2.2.17.tar

cd httpd-2.2.17

./configure --prefix=/moodle_soft/apache --enable-module=so

make

make install

ln -s /moodle_soft/apache/bin/apachectl /etc/init.d/httpd

cd /etc/rc3.d

ln -s ../init.d/httpd S98httpd




INSTALAR PHP

gzip -d php-5.3.5.tar.gz

tar -xvf php-5.3.5.tar

./configure --prefix=/moodle_soft/php --with-apxs2=/moodle_soft/apache/bin/apxs --enable-mbstring --with-mysql=/moodle_soft/mysql --with-pear --enable-sockets --with-gd --with-gettext --with-zlib-dir=/usr --with-iconv --with-curl --with-openssl --enable-soap --with-xmlrpc --enable-zip --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

make

make install

cp /moodle_soft/soft_base/php-5.3.5/php.ini-production /etc/php.ini



CONFIGURAR APACHE Editar el fichero ../conf/httpd.conf

  • Añadir las siguientes líneas
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
   AddType application/x-tar .tgz
  • Modificar la linea de forma que quede
   DirectoryIndex index.php index.htm index.html

Crear el fichero info.php con <?php phpinfo() ?>

Arrancar Apache y poner la URL http://127.0.0.1/info.php

Si da error al arrancar apache o no sale info de PHP ejecutar

chcon -t texrel_shlib_t /moodle_soft/apache/modules/libphp5.so




INSTALAR Moodle

groupadd moodle

useradd -g moodle -c "Moodle Server" moodleuser

gzip -d moodle-latest-20.tgzcd

tar -xvf moodle-latest-20.tar (en el raiz donde queramos instalarlo)

Editar el fichero ../config/httpd.conf y modificar DocumentRoot "/moodle_soft/moodle" <Directory "/moodle_soft/moodle">

mysql -u sqladmin -p

mysql>CREATE DATABASE moodle;ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; mysql>GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'jlggYO0