Edx on real machine - WBowam/wbowam.github.com GitHub Wiki
Date: 2014-04-08 Title: 在真机上部署Edx(在中国) Tags: Edx Category: IT
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
(ubuntu下)首先安装它:
sudo apt-get install sshuttle
sshuttle -r [email protected]:22411 0.0.0.0/0 -vv
搞定 , 就这么简单 注意[email protected]:22411是我的ssh,你可以用你自己的,格式为username@sshserver,
我把sshserver理解为跳板机,在我的需求中,需要有一个国外的ssh账号,你有国外的vps的话就好办了,没有也没关系,感谢云平台的的兴起,我们只要注册(nitrous)[https://www.nitrous.io],就能有一个免费的ssh账号.
如果你使用(nitrous)[https://www.nitrous.io]记得每次使用时登录后把它打开.
wget https://raw.github.com/edx/configuration/master/util/install/vagrant.sh -O - | bash
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
sudo /edx/app/venvs/ora/bin/pip install django==1.4.3
将/edx/app/ora/ora/requirements.txt
里的django==1.4.3
注释掉
cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"