在Ubuntu12.04下手动安装edx-fullstack及遇到的错误

本文详细介绍了在Ubuntu 12.04 LTS环境下,使用VMware Workstation 10进行OpenEdx Fullstack的手动安装过程。包括更新数据源、安装Python依赖、克隆配置文件、安装Ansible依赖等步骤,以及遇到的常见问题及其解决方案。
摘要由CSDN通过智能技术生成

一、安装环境
在win7下安装的vmware workstation 10,然后在vmware下安装的ubuntu12.04 LTS.
二、手动安装
1、更新数据源

sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot

2、安装python相关的依赖

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 libmysqlclient-dev
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv

3、克隆github上的配置文件

cd /var/tmp
git clone https://github.com/edx/configuration

4、安装ansible依赖

cd /var/tmp/configuration
sudo pip install -r requirements.txt

5、最终的安装

cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"

6、安装完成

成功安装open edx fullstack后就会出现如下界面。

三、遇到的问题

手动安装过程中,问题基本上都是出在最后一步,其中最大的问题就是网络问题!!!好多文件下载不下来,当然,如果人品爆发也是可以在一两天时间内就全都下好并安装好的。对于这个问题,我是用的付费VPN,速度还不错,以及重复执行该条命令。此外,还有如下三个问题。

1、Java版本问题,报的错如下:

Exception in thread \"main\" java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.minor version 51.0

解决方法:自带的Java1.6,版本太低了,安装Java1.8。

2、没有安装Ruby,报的错如下:

Could not find a version that satisfies the requirement ruby

解决办法:安装好Ruby,再执行该条命令。

3、在TASK [forum : initialize elasticsearch]处报错,报错如下:

fatal: [localhost]: FAILED! =>
{"changed": true, 
 "cmd": ["/edx/app/forum/cs_comments_service/bin/rake", "search:initialize"], 
 "delta": "0:00:05.483063", 
 "end": "2017-03-08 14:49:50.409433", 
 "failed": true, 
 "rc": 1, 
 "start": "2017-03-08 14:49:44.926370", 
 "stderr": "/edx/app/forum/cs_comments_service/lib/tasks/flags.rake:6: 
 warning: already initialized constant ROOT\n
 /edx/app/forum/cs_comments_service/lib/tasks/deep_search.rake:7: 
 warning: already initialized constant ROOT\n
 /edx/app/forum/cs_comments_service/models/constants.rb:2: 
 warning: already initialized constant COURSE_ID\n
 rake aborted!\n
 Mongo::Error::OperationFailure: not authorized for query on cs_comments_service_development.blocked_hash (13)\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/operation/result.rb:226:in `validate!'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/operation/executable.rb:36:in `block in execute'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/server/connection_pool.rb:111:in `with_connection'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/server/context.rb:63:in `with_connection'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/operation/executable.rb:34:in `execute'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/collection/view.rb:164:in `send_initial_query'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/collection/view/iterable.rb:41:in `block in each'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/retryable.rb:46:in `call'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/retryable.rb:46:in `read_with_retry'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongo-2.1.1/lib/mongo/collection/view/iterable.rb:39:in `each'\n
 /edx/app/forum/.gem/ruby/1.9.1/gems/mongoid-5.0.0/lib/mongoid/query_cache.rb:207:in `each'\n
 /edx/app/forum/cs_comments_service/app.rb:157:in `map'\n
 /edx/app/forum/cs_comments_service/app.rb:157:in `<top (required)>'\n
 /edx/app/forum/cs_comments_service/Rakefile:24:in `require'\n
 /edx/app/forum/cs_comments_service/Rakefile:24:in `block in <top (required)>'\n
 Tasks: TOP => search:initialize => environment\n(See full trace by running task with --trace)", 
 "stdout": "W, [2017-03-08T14:49:50.109481 #23183]  
 WARN -- : Overwriting existing field _id in class User.", 
 "stdout_lines": ["W, [2017-03-08T14:49:50.109481 #23183]  
 WARN -- : Overwriting existing field _id in class User."], 
 "warnings": []}

对于这个错,我认为是MongoDB权限有问题,分析了半天,不知道该咋办,最后同学建议我在root用户再执行一下

ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"

试试。试了一下,居然真的过了,不过我也还不太理解为什么这样是可以的。

转载于:https://my.oschina.net/u/3041591/blog/857227

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值