【问题标题】:Starting apache web server at every reboot cloud-init [closed]每次重启 cloud-init 时启动 apache web 服务器 [关闭]
【发布时间】:2018-05-09 22:33:02
【问题描述】:

我是 cloud-init 的新手。我得到了 VM,一切都已设置并运行,我设计了 VM 中的重启机制,以便在安装更新后 VM 需要重启时使用。因此,当我重新启动 VM 时,Apache 在重新启动后无法自行工作,直到我运行 start 命令。有没有办法让 Apache 在每次重启后启动?

【问题讨论】:

  • 用cloudinit设置systemd之类的怎么样?
  • 所以我开始看这里但你的意思是this

标签: linux apache cloud-init


【解决方案1】:

问题解决了,看了这两个网站

我添加了这一行:

cloud_config['runcmd'].append(['update-rc.d', 'apache2', 'enable'])

【讨论】:

    猜你喜欢
    • 2017-05-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多