mac部署PHP RabbitMQ環境

來源:互聯網
上載者:User

標籤:

一、安裝rabbitmq

brew install rabbitmq

二、安裝rabbitmq-c

git clone git://github.com/alanxz/rabbitmq-c.git

cd rabbitmq-c
mkdir build && cd build 
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. 
cmake --build . --target install

出現錯誤:

-- Could NOT find POPT (missing:  POPT_INCLUDE_DIR POPT_LIBRARY)-- Could NOT find XMLTO (missing:  XMLTO_EXECUTABLE)-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)CMake Error at /usr/local/Cellar/cmake/3.6.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR) (Required  is at least version "0.9.8")Call Stack (most recent call first): /usr/local/Cellar/cmake/3.6.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.6.1/share/cmake/Modules/FindOpenSSL.cmake:380 (find_package_handle_standard_args) CMakeLists.txt:273 (find_package)

brew install popt xmlto doxygen openssl

cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include  ..

上面增加的變數要在前面加-D,含義是設定常量

輸出:

-- Found OpenSSL: /usr/lib/libssl.dylib;/usr/lib/libcrypto.dylib (found suitable version "1.0.2h", minimum required is "0.9.8")-- Building rabbitmq as a shared library - yes-- Building rabbitmq as a static library - yes-- Configuring done-- Generating done-- Build files have been written to: /Users/baidu/Public/study/amq/rabbitmq-c/build
 三、安裝php amqp擴充

通過brew search amqp來搜尋當前php版本對應的amqp擴充,我是php 5.5,所以通過

brew install homebrew/php/php55-amqp 

安裝

 

mac部署PHP RabbitMQ環境

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.