linux - 以根用户身份运行 celery

标签 linux django celery

出于访问原因,我需要以 root 身份运行我的 Django 和 Celery。它说我需要设置 C_FORCE_ROOT 环境变量。如何/在哪里设置环境变量?

最佳答案

您可以像这样将其设置为 true:

# export C_FORCE_ROOT="true"

然后确保它被设置为一个环境。变量

# echo $C_FORCE_ROOT
true

但是一定要让它永久化,因为这会在下次重启时消失

玩得开心 :) !!

关于linux - 以根用户身份运行 celery ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20346851/

相关文章:

django - 如何在 Django-rest 的媒体字段中获取完整的媒体链接?

celery - 关于 celery 可扩展性的查询

linux - 如何配置 jenkins master slave,其中 master 在 linux 上,slave 在 windows 机器上

linux - 为 bash 编写脚本时遇到问题

django - 使用 django-extensions 插件在 jupyter 笔记本中打印 sql 查询

python - Elasticsearch dsl删除错误

python - 带有redis的 celery 中的任务优先级

python - 在 Celery 3.1.11 中使用 Django 进行单元测试?

linux - 为什么 'find' 命令失败没有错误?

linux - 我无法让我的期望脚本以 "expected"运行远程 bash 脚本