手动安装步骤
1.更新源
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
2.安装pip及虚拟化
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
3.克隆
cd /var/tmp
git clone https://github.com/edx/configuration
4.安装依赖
cd /var/tmp
git clone https://github.com/edx/configuration
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.断点续装命令
cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"
cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," --start-at-task="edxapp | install python base-requirements"
常见错误整理
错误一
sh: mysql_config: not found
Traceback (most recent call last):
File"setup.py", line 15, in <module>
metadata, options = get_config()
File"/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 43,in get_config
libs= mysql_config("libs_r")
File"/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 24,in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
只要原因是没有安装:libmysqlclient-dev sudo apt-get install libmysqlclient-dev 找到mysql_config文件的路径
|
错误二:
ERROR: /var/tmp/configuration/playbooks/roles/common/defaults/main.ymlmust be stored as dictionary/hash: <type 'str'>
删除 |
错误三:
TASK: [aws | update the ssh motd on Ubuntu] ***************************
changed: [localhost] =>(item=/etc/update-motd.d/10-help-text)
changed: [localhost] =>(item=/usr/share/landscape/landscape-sysinfo.wrapper)
failed: [localhost] =>(item=/etc/update-motd.d/51-cloudguest) => {“failed”: true, “item”:“/etc/update-motd.d/51-cloudguest”, “path”: “/etc/update-motd.d/51-cloudguest”,“state”: “absent”}
msg: file (/etc/update-motd.d/51-cloudguest)is absent, cannot continue
changed: [localhost] =>(item=/etc/update-motd.d/91-release-upgrade
|
错误三:
TASK:[aws | update the ssh motd onUbuntu] I've got error fatal: [localhost] => error whileevaluating conditional: vagrant_home_dir.stat.exists == false
|