<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Mac OS X 平臺下 OpenResty 安裝 #### 源碼包準備 我們首先要在[官網](http://openresty.org/)下載`OpenResty`的源碼包。官網上會提供很多的版本,各個版本有什么不同也會有說明,我們可以按需選擇下載。筆者選擇下載的源碼包 [ngx_openresty-1.7.10.1.tar.gz](https://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz)。 #### 相關庫的安裝 將這些相關的庫 PCRE 安裝在系統中。按照以下步驟: 1. 用你喜歡的方式打開命令終端(例如筆者喜歡的[iTerm2](http://www.iterm2.com))。 1. 推薦如 Homebrew 這類包管理方式完成包管理。 1. 輸入以下命令`brew install pcre`,完成 PCRE 包。 #### OpenResty的安裝 1. 在命令行中切換到源碼包所在目錄。 1. 輸入命令`tar xzvf ngx_openresty-1.7.10.1.tar.gz`,按回車鍵解壓源碼包。若你下載的源碼包版本不一樣,將相應的版本號改為你所下載的即可,或者直接拷貝源碼包的名字到命令中。此時當前目錄下會出現一個`ngx_openresty-1.7.10.1`文件夾。 1. 在命令行中切換工作目錄到`ngx_openresty-1.7.10.1`。輸入命令`cd ngx_openresty-1.7.10.1`。 1. 配置安裝目錄及需要激活的組件。使用選項 --prefix=install_path ,指定其安裝目錄(默認為/usr/local/openresty)。使用選項 --with-Components 激活組件, --without則是禁止組件,你可以根據自己實際需要選擇 with 及 without 。輸入如下命令,OpenResty將配置安裝在/opt/openresty目錄下(注意使用root用戶),并激活 LuaJIT、HTTP_iconv_module 并禁止 http_redis2_module 組件。 ~~~ ./configure --prefix=/opt/openresty\ --with-cc-opt="-I/usr/local/include"\ --with-luajit\ --without-http_redis2_module \ --with-ld-opt="-L/usr/local/lib" ~~~ 1. 在上一步中,最后沒有什么error的提示就是最好的。若有錯誤,最后會顯示error字樣,具體原因可以看源碼包目錄下的build/nginx-VERSION/objs/autoconf.err文件查看。若沒有錯誤,則會出現如下信息,提示下一步操作: ~~~ Type the following commands to build and install: gmake gmake install ~~~ 1. 編譯。根據上一步命令提示,輸入`gmake`。 1. 安裝。輸入`gmake install`,這里可能需要輸入你的管理員密碼。 1. 上面的步驟順利完成之后,安裝已經完成。可以在你指定的安裝目錄下看到一些相關目錄及文件。 #### 設置環境變量 為了后面啟動`OpenResty`的命令簡單一些,不用在`OpenResty`的安裝目錄下進行啟動,我們通過設置環境變量來簡化操作。將`OpenResty`目錄下的 nginx/sbin 目錄添加到 PATH 中。 接下來,我們就可以進入到后面的章節[Hello World](#)學習。
                  <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>

                              哎呀哎呀视频在线观看