在ubuntu 12.04 上部署 edx - WBowam/wbowam.github.com GitHub Wiki
export OPENEDX_RELEASE=named-release/cypress
wget https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/sandbox.sh -O - | bash
上述脚本执行过程中,会断(因为很多数据在国外,访问失败)
失败时,配好梯子
继续跑上述脚本....
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
sudo apt-get install -y build-essential software-properties-common python-software-properties curl git-core libxml2-dev libxslt1-dev libfreetype6-dev python-pip python-apt python-dev libxmlsec1-dev swig
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
cd /var/tmp
git clone https://github.com/edx/configuration
cd /var/tmp/configuration
git checkout named-release/cypress
sed -i "/COMMON_SSH_PASSWORD_AUTH/c COMMON_SSH_PASSWORD_AUTH: \"yes\"" playbooks/roles/common/defaults/main.yml
sudo pip install -r requirements.txt
cd /var/tmp/configuration/playbooks
sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," -e 'edx_platform_version=named-release/cypress certs_version=named-release/cypress forum_version=named-release/cypress xqueue_version=named-release/cypress'
将lms.env.json
和cms.env.json
中的SITE_NAME
配置成你自己的域名
重启服务
/edx/bin/supervisorctl restart edxapp:
将lms.env.json
和cms.env.json
中的SITE_NAME
配置成你自己的域名
重启服务
/edx/bin/supervisorctl restart edxapp:
## 重启所有的服务
sudo /edx/bin/supervisorctl restart all
## 重启 edx 系统
/edx/bin/supervisorctl restart edxapp:
## 删除课程
sudo -u www-data /edx/bin/python.edxapp ./manage.py cms --settings=aws delete_course course-v1:Organization+CourseNumber+CourseRun commit
### 如果上述命令删除不了课程,用devstack模式
sudo -u www-data /edx/bin/python.edxapp ./manage.py cms --settings=devstack delete_course course-v1:Organization+CourseNumber+CourseRun commit
### 删除用户
sudo -u www-data /edx/bin/python.edxapp ./manage.py cms --settings=devstack shell
from django.contrib.auth.models import User
u = User.objects.get(email="[email protected]")
[obj.delete() for obj in u.preferences.all()]
u.delete()
## see what services is running
sudo /edx/bin/supervisorctl status
## create a new user
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws create_user -e [email protected]
cd /edx/app/edxapp/edx-platform
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws shell
from django.contrib.auth.models import User
u = User.objects.get(username="mtax")
u.is_superuser = True
u.save()
- sudo su edxapp -s /bin/bash
- cd ~
- source edxapp_env
- pip install git+https://github.com/wwj718/youkuXBlock.git
- 在/edx/app/edxapp/cms.envs.json 添加
"ALLOW_ALL_ADVANCED_COMPONENTS": true,
到FEATURES - sudo /edx/bin/supervisorctl restart edxapp:
进入到"Settings" ⇒ "Advanced Settings",将"youku"添加到Advanced Module List
参考文章:在edx中使用优酷视频服务
cd /edx/app/edxapp/edx-platform
更改 edx-platform/cms/envs/common.py 在FEATURES里添加'ENABLE_CREATOR_GROUP': True
cd /edx/app/edxapp/edx-platform
# 更新数据库
sudo -u www-data /edx/bin/python.edxapp ./manage.py cms syncdb --migrate --settings aws --migrate –noinput
# 重启edxapp, birch版本有些不同,改为:sudo /edx/bin/supervisorctl restart edxapp:
如果将ENABLE_CREATOR_GROUP设置为true,一个新的Studio用户的工作流是这样的:
用户创建新账号,他们在admin table中的状态是“未请求”. 当用户进入到Studio面板中,他们将看到一条关于如何成为课程创建者的消息 用户可以发送创建课程的请求,如此一来他们的状态变成"待决定"。 如果他们的请求被通过,他们将收到一封通知邮件 如果请求没通过,他们也将收到一封通知邮件 课程创建者管理 对应的管理地址是/admin/course_creators/coursecreator/
如否你做了以上设置,那么一般注册用户默认就没法创建课程,而他又确实想创建,他怎么请求你把他标记为is_staff? cd /edx/app/edxapp/edx-platform 更改 edx-platform/cms/envs/common.py 在FEATURES里添加'STUDIO_REQUEST_EMAIL':YOUR_EMAIL_ADDRESS,这个邮箱将收到用户的请求
如果你希望给既有课程创建者授权,可通过这条指令./manage.py cms populate_creators(嗯,你首先当然得在edx-platform目录下)
<p><object data="/static/同意书.pdf" type="application/pdf" width="100%" height="500" internalinstanceid="819">
<p>It appears you don't have a PDF plugin for this browser.
You can <a href="/static/同意书.pdf">click here to
download the PDF file.</a></p>
</object></p>