一、安装环境
在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,"
试试。试了一下,居然真的过了,不过我也还不太理解为什么这样是可以的。