open edx 常用维护命令
来源:互联网 发布:云计算实训 编辑:程序博客网 时间:2024/04/30 01:42
edX Managing the Production Stack
NOTE: This is only for the production stack configuration, not for devstack.
Managing the server
manage.py commands
login to the server and change to the /edx/app/edxapp/edx-platform
directory to use manage.py
- list all manage.py commands -
sudo -u www-data /edx/app/edxapp/venvs/edxapp/bin/python ./manage.py lms --settings aws help
- create a new user -
sudo -u www-data /edx/app/edxapp/venvs/edxapp/bin/python ./manage.py lms --settings aws create_user -e user@example.com
- launch the django shell -
sudo -u www-data /edx/app/edxapp/venvs/edxapp/bin/python ./manage.py lms --settings aws shell -e user@example.com
- run migrations -
sudo -u www-data /edx/app/edxapp/venvs/edxapp/bin/python ./manage.py lms syncdb --migrate --settings aws
See help
and help <cmd>
for more information!
See what services are running
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf status
you should see something like the following:
certs RUNNING pid 19862, uptime 0:00:04discern RUNNING pid 19926, uptime 0:00:02discern_celery RUNNING pid 19857, uptime 0:00:04edxapp:cms RUNNING pid 19884, uptime 0:00:03edxapp:lms RUNNING pid 19879, uptime 0:00:03edxapp_worker:cms_default_4 RUNNING pid 19915, uptime 0:00:03edxapp_worker:cms_high_1 RUNNING pid 19901, uptime 0:00:03edxapp_worker:cms_low_3 RUNNING pid 19890, uptime 0:00:03edxapp_worker:lms_default_3 RUNNING pid 19897, uptime 0:00:03edxapp_worker:lms_high_4 RUNNING pid 19922, uptime 0:00:03edxapp_worker:lms_high_mem_2 RUNNING pid 19894, uptime 0:00:03edxapp_worker:lms_low_1 RUNNING pid 19908, uptime 0:00:03forum RUNNING pid 19855, uptime 0:00:04ora RUNNING pid 19875, uptime 0:00:04ora_celery RUNNING pid 19866, uptime 0:00:04xqueue RUNNING pid 19853, uptime 0:00:04xqueue_consumer RUNNING pid 19860, uptime 0:00:04xserver RUNNING pid 19854, uptime 0:00:04
Restarting Services
- LMS/CMS -
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
- Workers -
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker:
(Note: the colon character :
at the end of the line is mandatory!)
Updating Versions using edX repos
Use the /edx/bin/update
to update repo versions on the server.
Allowed repo
names [cs_comments_service,ease,discern,xqueue,xserver,edx-platform,configuration,edx-ora]
Examples:
sudo /edx/bin/update edx-platform master
- change edx-platform to use the latest on the master branchsudo /edx/bin/update cs_comments_service master
- change the forums service to use the latest on the master branch
Using an edx-platform fork
sudo rm -rf /edx/app/edxapp/edx-platform
- change the remote you need to remove the existing edx-platform checkout- Add the following line to
/edx/etc/server-vars.yml
-edx_platform_repo: "https://github.com/<user>/edx-platform.git"
sudo /edx/bin/update edx-platform master
- update edx-platform using the forked repo
Compile assets manually
To compile javascript and css outside of the update script run the following commands:
sudo -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
rake lms:gather_assets:aws
rake cms:gather_assets:aws
Troubleshooting
Unable to connect to the LMS
Check to see if nginx is running:
sudo service nginx status
sudo service nginx start
NGINX logs are located in /edx/var/log/nginx
NGINX configurations are located in/edx/app/nginx/sites-enabled
Check to see if the lms/cms is running
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf status edxapp:
If you are still unable to connect to the LMS run the following commands:
sudo service nginx stop
sudo service supervisor stop
sudo service supervisor.devpi stop
sudo pkill -u www-data
sudo service nginx start
sudo service supervisor start
sudo service supervisor.devpi start
- stop everything except the LMS and CMS
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf stop discern discern_celery \ forum ora ora_celery xqueue xqueue_consumer xserver edxapp_worker:
sudo tail -f /edx/var/log/{lms,cms,nginx}/*log
While tailing the log files try to connect your browser to the LMS or Studio
Log files
- The production stack sends all application logs to rsyslog which writes config files to the
/edx/var/log
directory. - Supervisor logs stderr and stdout, its logs are located in
/edx/var/log/supervisor
- open edx 常用维护命令
- 搭建Open edX经验总结
- Open edX 简单查错
- Open edX安装Xblock
- Open edX安装Devstack
- open edx 邮件激活
- Open edX架构
- 常用网络维护命令
- Oracle常用维护命令
- postgreSQL常用维护命令
- Linux常用维护命令
- MySQL 常用维护命令
- gitlab常用维护命令
- Open edX修改自定义主题
- Open edX数据结构Mysql edxapp
- Windows 8安装Open edX
- open edx更改时区设置
- open edx创建超级用户
- Java 内部类(成员内部类、局部内部类、静态内部类和匿名内部类)
- HDU-1466 计算直线的交点数 DP
- DDMS启动出现“Failed to initialize Monitor Thread: Unable to establish loopback connection”错误的解决方法
- I/O端口和I/O内存
- C:socket相关的sendto()函数简介
- open edx 常用维护命令
- shell调出历史命令
- DB 存储过程(一)
- go wrong
- MFC控件之CControlBar
- DB2 存储过程(二)
- 基于COCOS2D-X的lua版打怪减血特效
- CF 392C Yet Another Number Sequence(矩阵乘法)
- 斗地主随机发算法 控制台实现代码