Mac電腦上MAMP開發環境安裝memcache

2021-07-14 09:06:22 字數 844 閱讀 4563

一、先給mac安裝memcached伺服器端

我這裡是利用homebrew來安裝的,主要2個命令:brew install memcachedbrew install libmemcached

相關可以檢視這篇文章:

./configure
*如果報錯,說明系統沒有 autoconf,需要裝一下,裝完後重新執行 phpize :

cannot find autoconf. please check your autoconf installation and the

$php_autoconf environment variable. then, rerun this script.

安裝 autoconf 並安裝:

curl -o

tar -xvf autoconf-2.68.tar.bz2

cd autoconf-2.68

./configure && make

sudo make install*

2、安裝php的memcache擴充套件

可直接使用:pecl install memcache

3、然後修改一下php.ini

新增:extension=memcache.so

重啟mamp, 就可以phpinfo()檢視已經成功。

另外如果我們在程式中連線memcahe失敗,可能是沒有啟動。

which memcached 檢視路徑,然後啟動:/usr/local/bin/memcached -d

Mac 手動部署MAMP環境

背景 由於mac自帶apache環境,以及php,之前一直使用一鍵安裝的xampp,相當於重新安裝了一套環境。強迫症忍不了有相同的軟體在系統裡,決定解除安裝xampp,手動配置乙個mamp的環境。m mac pro 2014,系統為目前最新的 osx el capitan 10.11 檢視這個檔案可...

mac電腦開發環境配置

iterm2 配置標題欄顯示當前路徑 put this in your bash profile if iterm session id then export prompt command echo ne 033 007 prompt command fi右鍵方式,安裝easy new file ...

MAC上搭建lua開發環境

然後解壓 2.執行 終端 進入到該資料夾下 主要是cd 資料夾名 或者使用go2shell 3.在 終端 輸入 make macosx 回車 4.在 終端 輸入 make test 回車 正常情況下會出現 src lua v 5.然後再輸入 sudo make install 命令,會要求輸入pas...