開放式線上教育平台edX在今年六月份開源,當時按著Google Group中的方法“Clean install on Ubuntu Server 12.04”在一台全新的VPS上安裝了一把,雖然最終安裝成功,但也破費周折,最後對edX系統的總體印象是有些臃腫,依賴的東西過多,不太輕量。
前段時間一個北大的朋友在安裝edX的時候和我交流了一下,他最終通過直接安裝的一套完整的edX鏡像的方法“Quick Start to working with the edX Platform”在windows虛擬機器下安裝成功。當時沒有太在意這個事情,最近又撿起了edX這套開源平台,第一件事還是edX的安裝問題,這一次想到了安裝鏡像這個比較簡單的方法,於是照貓畫虎的在自己的Mac上安裝起了edX開源系統,全程基本沒有遇到什麼問題,比較容易上手,推薦想要玩edX開源平台的朋友在本機先試試這個方法。以下是我的簡單記錄,針對Mac OS系統,其他系統請下載相應的檔案進行安裝:
1、安裝VirtualBox
下載地址:https://www.virtualbox.org/wiki/Downloads
我下載安裝的是4.2.16版本的dmg檔案:VirtualBox 4.2.16 for OS X hosts
2、安裝Vagrant
下載地址:http://downloads.vagrantup.com
我下載安裝的是v1.2.7版本的dmg檔案:Vagrant-1.2.7.dmg
3、建立相關的目錄並下載edX的課程範例:
mkdir mitx-vagrant
cd mitx-vagrant
mkdir data
最後下載edx4edx_lite到data目錄下,關於edx4edx:
This is a set of source content and code for an edX course about the edX system. Included are demo problems for option, multiple choice, string, numerical, formula, symbolic math, image, custom (python script graded) response, and schematic response problems.
4、下載edX鏡像檔案並初始化和啟動虛擬機器(在mitx-vagrant目錄下):
a、下載這個3.4G的鏡像: mitxvm-edx-platform-08jun13b.box
md5sum: 633ca08e4f3834516c7113aa484b68c1
b、vargrant初始化:vagrant init mitxvm mitxvm-edx-platform-08jun13b.box
vagrant init mitxvm mitxvm-edx-platform-08jun13b.box
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant
c、啟動環境:vagrant up
這個需要一段時間,差點以為出問題了:
Bringing machine ‘default’ up with ‘virtualbox’ provider…
[default] Box ‘mitxvm’ was not found. Fetching box from specified URL for
the provider ‘virtualbox’. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box…
Extracting box…te: 18.4M/s, Estimated time remaining: 0:00:01)
Successfully added box ‘mitxvm’ with provider ‘virtualbox’!
[default] Importing base box ‘mitxvm’…
[default] Matching MAC address for NAT networking…
[default] Setting the name of the VM…
[default] Clearing any previously set forwarded ports…
[default] Creating shared folders metadata…
[default] Clearing any previously set network interfaces…
[default] Preparing network interfaces based on configuration…
[default] Forwarding ports…
[default] — 22 => 2222 (adapter 1)
[default] — 80 => 8080 (adapter 1)
[default] — 81 => 8081 (adapter 1)
[default] Running ‘pre-boot’ VM customizations…
[default] Booting VM…
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces…
[default] Mounting shared folders…
[default] — /vagrant
5、在上述工作完成後,就可以在本地區域網路下訪問相應的網站了:
http://192.168.42.2 — LMS(學習管理系統,也就是學生用的系統,我們在edX公開課平台上看到的就是,這個本地網站目前只有edx4edx範例課程)
http://192.168.42.3 — CMS (Studio)(內容管理系統,也就是開課老師用的系統,你可以在這個裡面嘗試編輯和建立課程)
http://192.168.42.4 — Preview (Studio)
http://192.168.42.5 — Edge (Studio)
這個時候你就可以在本地機器上玩edX平台了,如果你想登陸的話,使用者名稱和密碼如下:
You may login to the system using a pre-created user: (email “xadmin@mitxvm.local”, password “xadmin”); if you create your own user, to active the user use the “xmanage” command (see below).
後半句的意思是指這個虛擬鏡像提供了一個xmanage的管理工具,你可以通過如下vagrant命令查看相關的命令和帳號資訊:
vagrant ssh — xmanage help
Welcome to the MITx / edX instance management tool
Commands available:
restart-lms – restart the LMS (for vagrant boxes, running at http://192.168.42.2)
This will force re-loading of course data
restart-cms – restart the CMS (aka the Studio system)
restart-edge – restart the Edge server (part of the Studio system)
restart-preview – restart the Preview server (part of the Studio system)
restart-xqueue – restart the xqueue main system
restart-consumer – restart the xqueue consumer
restart-xserver – restart the xserver (python code grader)
logs – view last 100 lines of log file for
appname should be one of lms, cms, edge, preview, xserver, xqueue
activate – activate user specified by username
setstaff – make user (specified by username ) into staff
update-mitx – update mitx system code (use with care!)
update – update this management script (from central repo)
help – print out this message, as well as local NOTES.txt file
—————————————-
Notes file:
=============================================================================
Welcome to the ODL MITx Vagrant Box
=============================================================================
The following services are available:
http://192.168.42.2 – MITx LMS
http://192.168.42.3 – MITx Studio System
http://192.168.42.4 – MITx Edge System
http://192.168.42.5 – MITx Preview System
pre-defined users:
edx user=xadmin, email=xadmin@mitxvm.local, pw=xadmin
edx user=guest, email=guest@guest.local, pw=guest
最後edX提供了兩個主要方法來建立和管理課程,感興趣的同學可以看一下:
There are two main workflows you can use to develop courseware:
LMS (+github) — edit XML files of courses in the data directory, then click on “Reload course from XML files” in the Instructor Dashboard (under the Admin tab). The course files may be stored in github, and a webhook configured to make the LMS automatically update upon checkins (“gitreload”). See edX documentation of XML formats.
Studio — Create course using the web-based interface, and view on the Preview (“draft”) and Edge (“live”) sites. Beware that the Studio system is really meant for single-author work; it loses all history, and there is no visibility for what changes are being made by authors. But Studio is wysiwyg and gives fast feedback, so it can be a good way to start.
註:原創文章,轉載請註明出處“課程圖譜部落格”:blog.coursegraph.com
本文連結地址:http://blog.coursegraph.com/安裝開源線上教育平台edX的一個簡單方法