<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ### 管理 Apache 服務 Apache 是一款流行的 web 服務器,然而對于其配置者來說并不輕松。 Puppet 可以在一定程度上緩解配置者因管理 Apache 服務器所帶來的痛苦。 #### 操作步驟 1. 如果 Apache 模塊還不存在就創建它: ``` # mkdir /etc/puppet/modules/apache # mkdir /etc/puppet/modules/apache/templates # mkdir /etc/puppet/modules/apache/manifests ``` 2. 使用如下內容創建 /etc/puppet/modules/apache/manifests/init.pp 文件: ``` class apache { package { "apache2-mpm-prefork": ensure =&gt; installed } service { "apache2": enable =&gt; true, ensure =&gt; running, require =&gt; Package["apache2-mpm-prefork"], } file { "/etc/apache2/logs": ensure =&gt; directory, require =&gt; Package["apache2-mpm-prefork"], } file { "/etc/apache2/conf.d/name-based-vhosts.conf": content =&gt; "NameVirtualHost *:80", require =&gt; Package["apache2-mpm-prefork"], notify =&gt; Service["apache2"], } } ``` 3. 在一個節點中添加如下代碼: ``` include apache ``` 4. 運行 Puppet: ``` # puppet agent --test info: Retrieving plugin info: Caching catalog for cookbook.bitfieldconsulting.com info: Applying configuration version '1309189590' notice: /Stage[main]/Apache/Package[apache2-mpm-prefork]/ensure: ensure changed 'purged' to 'present' notice: /Stage[main]/Apache/File[/etc/apache2/logs]/ensure: created notice: /Stage[main]/Apache/File[/etc/apache2/conf.d/name-basedvhosts. conf]/ensure: defined content as '{md5}78465aacbd01eb537b94 1b21ae0af8b8' info: /Stage[main]/Apache/File[/etc/apache2/conf.d/name-basedvhosts. conf]: Scheduling refresh of Service[apache2] notice: Finished catalog run in 39.45 seconds ``` #### 更多用法 在下一節中,我們將看到如何為 Apache 定義虛擬主機的內容。 然而你可能會發現,你需要為整個 Apache 服務器(包括虛擬主機)提供特殊的配置選項。 你可以使用 Puppet 通過部署 apache2.conf 來配置這些選項, 但是將配置片段放在 /etc/apache2/conf.d 目錄中會更加整潔清晰。 例如,你可以在 init.pp 中添加如下代碼: ``` define snippet() { file { "/etc/apache2/conf.d/${name}": source => "puppet:///modules/apache/${name}", notify => Service["apache2"], } } ``` 并在節點上包含如下的代碼片段: ``` apache::snippet { "site-specific.conf": } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看