【问题标题】:automating nginx/passenger installation自动安装 nginx/passenger
【发布时间】:2014-03-03 16:46:58
【问题描述】:

我正在尝试通过运行以下命令来自动化 nginx/passenger 安装程序:

passenger-install-nginx-module --auto --auto-download --extra-configure-flags=none --languages ruby

我正在使用 Ansible 配置我的服务器,因此有一个运行该命令的任务。任务运行但永远不会完成。我看不到安装程序是否正在等待任何答案,但我猜可能是,但我不知道是什么?

我使用--help 运行命令,它给了我一个要传递给命令的标志列表,这些标志都已设置,但没有区别。

关于它可能在等待什么的任何想法?

Ansible 任务如下:

- name: Passenger and Nginx
  shell: bash -lc "passenger-install-nginx-module --auto --auto-download --extra-configure-flags=none --languages ruby"

【问题讨论】:

  • 可能只是编译时间长?
  • 如果那是正确的,那么它仍然是从我发布消息时开始的。
  • 我格式化了我的服务器并重新启动并运行我的 Ansible 脚本并启动了乘客/nginx 交互式安装程序,我给出的答案被自动执行但我没有安装机架。我在我的剧本中将 install rack 任务移到了乘客/nginx 任务之前并重新运行了它,但现在它只是停止而没有显示安装程序。我猜这是因为它已部分安装。我怎样才能让它重新完成它而不必诉诸于格式化服务器并重新开始?
  • 您是否尝试过将passenger-install-nginx-module 命令复制粘贴到您的SSH 终端shell 中并观察会发生什么?
  • 啊,刚试过,它卡在Where do you want to install Nginx to? 它似乎没有像它应该的那样自动继续。有什么想法吗?

标签: ubuntu nginx passenger ansible


【解决方案1】:

卡在你想把 Nginx 安装到哪里?它似乎没有像它应该的那样自动继续。有什么想法吗?

作为帮助,passenger-install-nginx-module 似乎需要--prefix= 以交互方式询问它

> passenger-install-nginx-module --help
Usage: passenger-install-nginx-module [options]

Options:
    --auto                       Automatically confirm 'Press ENTER to
                                 continue' prompts.
    --prefix=DIR                 Use the given Nginx install prefix instead
                                 of asking for it interactively.
    --auto-download              Download and install Nginx automatically,
                                 instead of asking interactively whether to
                                 download+install or to use an existing
                                 Nginx source directory.
    --extra-configure-flags=STRING
                                 Pass these extra flags to Nginx's
                                 'configure' script, instead of asking for
                                 it interactively. Specify 'none' if you
                                 do not want to pass additional flags but do
                                 not want this installer to ask
                                 interactively either.
    --languages NAMES            Comma-separated list of interested
                                 languages (e.g.
                                 'ruby,python,nodejs,meteor')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-29
    • 2020-02-03
    • 1970-01-01
    • 1970-01-01
    • 2015-02-18
    • 2013-05-06
    • 2011-11-28
    • 1970-01-01
    相关资源
    最近更新 更多