2009. 6. 13. 11:17

무들의 본격 설치 – Install Moodle for Linux

MOODLE의 설치전 준비사항을 앞전 포스팅에서 알아보았다. 이제 무들을 설치해보자. 리눅스 시스템관리자라면 무들용 계정을 만들거나, 호스팅을 받는 사람들이라면, 이 단락을 뛰어넘어 실제 설치부터 시작하면 된다.

무들을 설치하기 위한 계정준비 사항이니 참조하기 바랍니다.

무들용 사용자 계정의 추가

 

[bestakas@localhost ~]$ su -

암호:

[root@localhost ~]# useradd testmoodle

[root@localhost ~]# passwd testmoodle

testmoodle 사용자의 비밀 번호 변경 중

새 UNIX 암호:

잘못된 암호: it is based on a dictionary word

새 UNIX 암호 재입력:

passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다.

[root@localhost ~]#

 

 

무들용 MySQL DB 계정의 추가

 

[root@localhost ~]# mysql -uroot -p mysql

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 4811

Server version: 5.1.32-log Source distribution

 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 

mysql> create database moodletest default character set utf8 collate utf8_unicode_ci;

Query OK, 1 row affected (0.02 sec)

 

mysql> grant all on moodletest.* to moodletest@localhost identified by 'moodle1234';

Query OK, 0 rows affected (0.02 sec)

 

mysql> quit

Bye

[root@localhost ~]# mysqladmin -uroot -p shutdown

Enter password:

[root@localhost ~]# mysqld_safe --user=mysql &

[1] 23920

[root@localhost ~]# 090613 10:06:57 mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err'.

090613 10:06:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

[root@localhost ~]#

 

<!—항상 MySQL에서 MYSQL DB와 MYSQL 계정을 추가하면 반드시 Mysql을 재시동하여야 한다.

 

무들용 도메인의 버추얼호스팅 등록

[root@localhost ~]# vi /usr/local/httpd/conf/extra/httpd-vhosts.conf

<VirtualHost *:80>

DocumentRoot /home/moodletest/public_html

ErrorLog logs/moodletest.japasop.com_error_log

CustomLog logs/moodletest.japasop.com_access_log common

ServerName moodletest.japasop.com

ServerAlias moodletest.japasop.com

</VirtualHost>

<Directory /home/moodletest/public_html/>

AllowOverride All

</Directory>

[root@localhost ~]# /usr/local/httpd/bin/httpd -k restart

[root@localhost ~]#chmod 707 –R /home/testmoodle

 

도메인은 도메인을 구입한 딜러회사의 네임서버에서 도메인을 등록하던지, 아니면 자신의 네임서버에 등록한다.

웹페이지가 외부에서 볼수 있게끔 707권한을 준다. (moodle은 기본적으로 무들이 설치되는 바로 앞단계의 디렉토리에 moodledata디렉토리인 캐쉬용 저장소를 만든다. 이 캐쉬용 저장소는 http프로토콜로 외부에서 접근할수 없는 디렉토리에 위치시키는것이 좋다. 단, moodle캐쉬용 디렉토리인 moodledata이외의 moodle용 파일들은 설치후 705로 바꿔도 무관하다.

(현재는 도메인이 발급안된 상태이므로, IP/~moodletest 상태로 진행해본다.)

  • 무들의 설치

무들을 인터넷상에서 다운로드한다.

 

셀상에서의 직접다운로드와 압축해제

 

[testmoodle@localhost ~]$ wget http://download.moodle.org/download.php/stable19/moodle-weekly-19.tgz

--2009-06-13 10:24:58-- http://download.moodle.org/download.php/stable19/moodle-weekly-19.tgz

Resolving download.moodle.org... 70.86.136.82

Connecting to download.moodle.org|70.86.136.82|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: unspecified [text/html]

Saving to: `moodle-weekly-19.tgz'

 

[ <=> ] 14,172 39.2K/s in 0.4s

 

2009-06-13 10:25:00 (39.2 KB/s) - `moodle-weekly-19.tgz' saved [14172]

 

[testmoodle@localhost ~]$ ls -la

합계 52

drwx------ 5 testmoodle testmoodle 4096 2009-06-13 10:24 .

drwx--x--x 14 root root 4096 2009-06-13 10:02 ..

-rw-r--r-- 1 testmoodle testmoodle 18 2008-02-29 23:27 .bash_logout

-rw-r--r-- 1 testmoodle testmoodle 258 2009-06-12 08:43 .bash_profile

-rw-r--r-- 1 testmoodle testmoodle 124 2008-02-29 23:27 .bashrc

drwxr-xr-x 2 testmoodle testmoodle 4096 2008-04-07 05:43 .gnome2

drwxr-xr-x 4 testmoodle testmoodle 4096 2009-06-03 01:26 .mozilla

-rw-rw-r-- 1 testmoodle testmoodle 14172 2009-06-13 10:25 moodle-weekly-19.tgz

drwx---rwx 3 testmoodle testmoodle 4096 2009-06-04 23:05 public_html

[testmoodle@localhost ~]$ tar -xzvf moodle-weekly-19.tgz

중간생략~

moodle/question/move_form.php

moodle/question/upgrade.php

moodle/question/export.php

moodle/question/preview.php

moodle/question/restorelib.php

moodle/index.php

[testmoodle@localhost ~]$ ls

moodle public_html moodle-weekly-19.tgz'

[testmoodle@localhost ~]$ cd moodle/

[testmoodle@localhost moodle]$ ls

[testmoodle@localhost moodle]$ mv * ../public_html/

[testmoodle@localhost moodle]$ cd ..

[testmoodle@localhost ~]$ cd moodle/

[testmoodle@localhost moodle]$ cd ../public_html/

[testmoodle@localhost public_html]$ ls

README.txt blocks course files help.php install.php lib mnet pix sso user

admin blog enrol filter index.html iplookup login mod question tag userpix

auth calendar error grade index.php kongsa.JPG manifest.txt my rss tags version.php

backup config-dist.php file.php group install lang message notes search theme weblog

[testmoodle@localhost public_html]$

압축이 제대로 다운받아지지 않았거나 에러가 생기면 FTP를 통하여 업로드후 압축을 풀면 된다.

압축을 풀면 moodle이라는 디렉토리를 만들므로, 직접 도메인에서 index.html을 호출하기 쉽게, public_html에 압축을 푼 파일을 모두 옮긴다. (moodle디렉토리 아래 있는 파일만 옮긴다.)

클라이언트 브라우져로 이동하여, 압축된 파일을 이동하여, 무들을 본격 설치하자.


설치한 웹서버의 주소창을 입력하면, 무들 설치화면 나온다. 기본 언어팩을 물어보는데, 한글을 선택할경우 한글언어팩이 다운이 안받아지는 경우가 있다. 차후 설치후 언어팩을 변경할수 있으니 영어 언어팩 하나로만 진행해보자.


      PHP라이브러리에 대한 체킹을 실시한다. Pass되지 않으면 무들을 설치할수 없다.



  무들이 설치될 디렉토리와 웹주소, 캐쉬디렉토리, 설치디렉토리를 묻는다. 별다른 입력이 없으면 자동으로 설정된다. (차후에 도메인이 변경될때는 셀에서 변경하여 주면 된다.)


  SQL DB이름과 계정,비밀번호를 입력한다. 단락에서 생성한 SQL DB 사용해보기로 하겠다.



서버에 필요한 프로그램들과 php확장요소들이 설치되었는지 마지막으로 체크한다. 모두 OK 나오면 성공, 만약 모두 OK 나오지 않으면 불안요소가 될수도 있으므로 리눅스의 경우 Apache PHP 재컴파일하거나 윈도우즈의 경우 라이브러리모듈을 추가한다.


 무들의 설치를 진행하겠다는 메세지

  저작권확인등의 작업이다.

  자동으로 설치할것이냐? 아니면 수동으로 설치할것이냐를 묻는다. 자동/수동 아무런 차이가 없다. 수동은 OK Next버튼을 눌러줘야 다음단계가 진행되는것뿐이다.


DB Table 생성과 filed 생성하고 기본적인 항목에 데이타를 기입하며, 웹상으로 설치를 다이나믹하게 보여준다.

 최고관리자의 비번과 정보를 입력한다.

  사이트에 대한 정보를 물어본다. (사이트에 대한 정보입력을 취소하고 진행했다.)

 최종으로 설치된 무들의 초기화면...! 소문과는 틀리게 상당히 심플(?)하고 단순한 레이아웃을 보여준다.

이상으로 무들의 설치과정을 자세히 포스팅했다. 드디어 무들의 테마(Moodle theme)작성에 대한 포스팅을 시작하여야 겠다.