2011년 5월 4일 수요일

How to install Moodle


Now to get all the security updates.
sudo apt-get update

sudo apt-get dselect-upgrade
Normally you would just use sudo apt-get upgrade.
And reboot to run on the new kernel!
sudo reboot

Install MySQL (skip Postgresql)

At this point we'll need to log in again to the server and type:
sudo apt-get install mysql-server php5-mysql
Press Y to continue the install.

설치를 완료할 때 오류가 3가지 정도 뜬다. 
그걸 막기 위해 여기서 추가...
sudo apt-get install php5-curl php5-xmlrpc php5-intl
어디에 사용되는 지는 나도 잘... 그냥 오류 해결!!

Replace the following string NewRootDatabasePassword with a secure password of your own choosing.
There is no space between the -p and the password on the second command.
mysqladmin -u root password NewRootDatabasePassword

mysqladmin -u root -h localhost password NewRootDatabasePassword -pNewRootDatabasePassword
We now need to create the Moodle database and Moodle user in MySQL.
The mysql command will prompt for your NewRootDatabasePassword (from above). Replace NewMoodleDatabasePassword with a secure password of your own choosing.
mysql -u root -p
> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
> GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'NewMoodleDatabasePassword';
> GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY 'MoodleBackupPassword';
> FLUSH PRIVILEGES;
> QUIT
The above also creates a backup user moodlebackup so that you can use mysqldump to make database backups without accident.

Install Apache

The following modsecurity, ldap, and odbc libraries are optional.
sudo apt-get install apache2 libapache2-mod-php5 php5-gd

sudo apt-get install libapache2-modsecurity php5-ldap php5-odbc
Restart Apache
sudo /etc/init.d/apache2 restart
Note: To install Moodle 2.0 for the current ubuntu, you need to install PHP from an external repository --Olli Savolainen 19:28, 10 April 2009 (UTC)

Install other software

On the command line, type:
sudo apt-get install openssh-server unattended-upgrades

sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es

sudo apt-get install curl php5-curl php5-xmlrpc

sudo apt-get install clamav-base clamav-freshclam clamav
Press Y to continue the install after each of these apt-get commands.
The clamav package will support virus checking on file uploads into Moodle. May have to run it again to configure properly.
Additional languages are available for aspell.

Install Moodle

On the command line, type:
cd /var/www

sudo wget http://download.moodle.org/stable19/moodle-latest-19.tgz <이부분은 20으로 바뀐지 좀 됐다. 수정해서 받도록.
sudo tar -zxf moodle-latest-19.tgz

----
in ubuntu 8.04 it should be:
sudo tar zxf moodle-latest-19.tgz
----

sudo mkdir /var/moodledata

sudo chown -R www-data:www-data /var/moodledata
where www-data is whatever user/group was created automatically when apache was installed.
We now need to edit the location of the default web site. On lines five and ten, replace /var/www/ with /var/www/moodle/. Restart Apache. (See page comments for more details on this instruction.)
sudo nano /etc/apache2/sites-available/default  

sudo /etc/init.d/apache2 restart

댓글 없음:

댓글 쓰기