Deep Learning Specialization on Coursera

开放式在线教育平台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的一个简单方法

作者 CourseEye

《安装开源在线教育平台edX的一个简单方法》有2条评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注