主要是參考 官方教程
本地環境:
ubuntu12.04 64位
更新系統
sudo
apt
-
get
update
-
y
sudo
apt
-
get
upgrade
-
y
sudo
reboot
使用vpn,保證網絡能暢通連接到國外,你懂的.
我使用的是sshuttle,可參考 我的博客
獲取vagrant.sh腳本
wget
https
:
//raw.github.com/edx/configuration/master/util/install/vagrant.sh -O - | bash
遇到問題
執行vagrant.sh簡本如果在nltk出錯,按以下方法解決.
手動下載nltk
主要參考了這個
博客
.
感謝竹軒同學的分享.
nltk有近700M,手動下載,避免時間太久網絡斷開
注:最新的代碼, 位置 有變.
cd
/
var
/
tmp
wget
http
:
//edx-static.s3.amazonaws.com/nltk/nltk-data-20131113.tar.gz
chmod
o
+
rw
nltk
-
data
-
20131113.
tar
.
gz
修改
/var/tmp/configuration/playbooks/edx-east/roles/ora/tasks/ease.yml
?中的
download and install nltk
任務內容為:
-
name
:
download
and
install
nltk
shell:
|
set
-
e
cp
/
var
/
tmp
/
nltk
-
data
-
20131113.
tar
.
gz
{{
ora_nltk_tmp_file
}}
tar
zxf
{{
ora_nltk_tmp_file
}}
rm
-
f
{{
ora_nltk_tmp_file
}}
touch
{{
ora_nltk_download_url
|
basename
}}
-
installed
creates
=
{{
ora_data_dir
}}
/
{{
ora_nltk_download_url
|
basename
}}
-
installed
chdir
=
{{
ora_data_dir
}}
sudo_user:
"{{ common_web_user }}"
notify:
-
restart
ora
-
restart
ora_celery
修改
/var/tmp/configuration/playbooks/edx-east/roles/discern/tasks/deploy.yml
?中的
download and install nltk
任務內容為
-
name
:
download
and
install
nltk
shell:
|
set
-
e
cp
/
var
/
tmp
/
nltk
-
data
-
20131113.
tar
.
gz
{{
discern_nltk_tmp_file
}}
tar
zxf
{{
discern_nltk_tmp_file
}}
rm
-
f
{{
discern_nltk_tmp_file
}}
touch
{{
discern_nltk_download_url
|
basename
}}
-
installed
creates
=
{{
discern_data_dir
}}
/
{{
discern_nltk_download_url
|
basename
}}
-
installed
chdir
=
{{
discern_data_dir
}}
sudo_user:
"{{ discern_user }}"
notify:
-
restart
discern
手動下載django1.4.3
期間出現出現無法找到安裝包的錯誤
按照提示手動安裝1.4.3?
sudo /edx/app/venvs/ora/bin/pip install django==1.4.3
順便將
/edx/app/ora/ora/requirements.txt
里出錯的
django==1.4.3
注釋掉
此外期間會遇到的基本都是網絡問題.
如果出現錯誤,重新連接sshuttle后,執行以下命令
cd
/
var
/
tmp
/
configuration
/
playbooks
&&
sudo
ansible
-
playbook
-
c
local
.
/
edx_sandbox
.
yml
-
i
"localhost,"
安裝完的東西會跳過.
如果網絡順暢,基本就可以直接部署好了.
安裝完畢后,默認開機自動啟動
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
