补充:php插件安装后重启apache,输入database地址是127.(通常),
一。 准备工作
1。下载Moodle2.0最新的Linux安装包
http://download.moodle.org/
2。下载CentOS 5.5
3。下载yum源安装包(见附件)升级到php5_3_4的yum源
二。安装
1。安装操作系统CentOS5.5
2。安装yum源: ( 没有必要 ,为了remi参数的)
#rpm -ivh epel-release-5-3.noarch.rpm
#rpm -ivh remi-release-5-7.el5.remi.noarch.rpm
3。升级PHP到PHP5.3.4和Mysql
yum --enablerepo=remi update php* mysql*
4. 创建Moodle 2.0的数据库:
#mysql -uroot -p
mysql> SHOW DATABASES;
mysql> CREATE DATABASE moodle; #注意此处数据库,就是config.php 中数据库
mysql> 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 'yourpassword';
mysql> QUIT
附注:
root@debian:~# mysql -u root -p
mysql> Create DATABASE moodle default charset utf8;
Query OK, 1 row affected (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON moodle.* TO user@localhost IDENTIFIED BY 'yourpassword';
Query OK, 0 rows affected (0.00 sec)
也可以
5. 安装PHP扩展库:(如果后装的,记得重启apache)
#yum install --enablerepo=remi php-dom
#yum install --enablerepo=remi php-mbstring
#yum install --enablerepo=remi xmlrpc
#yum install --enablerepo=remi php-xmlrpc
#yum install --enablerepo=remi php-soap
#yum install --enablerepo=remi php-gd
#yum install --enablerepo=remi php-intl6。运行Moodle的安装脚本
http://192.168.2.9/moodle
安装完毕后,打开网页以上网页就可以正常访问Moodle