<code>curl -O https://nodeload cd<code>phpredis-master /<code><strong></strong>phpize<code>
.<code>/configure <code>--with-php-c/code>/usr/bin/php-config
<code>make<code>
sudo<code> make
install<code><code># At this time, a path will be prompted <code><code>
# /usr/lib/php/extensions/no-debug-non-zts-20100525/<code>
# indicating that the extension has been placed at that location<code><code>vim <code>/etc/php
.ini<code>
#Add the following content<code>
extension=redis.so<code>
#Restart apache<code> <code>sudo <code>apachectl restart
<code>#Check the extension installation status
<code>php -m |
grep<code>redis
<code>#The appearance of redis means the installation is successful<code>
PS: If an error occurs when executing phpize, handle it in the following way<code>
Question 1:<code>Execute phpize and get an error: <code><code>
<code>1
23
45
6
7
grep : /usr/include/php/main/php .h: No such file or directory | grep
: <code>/usr/include/php/Zend/zend_modules<code>.h: No such <code>file <code>or directory<code><code>grep :<code>/usr/include/php/Zend/zend_extensions<code>.h: No such <code>file<code>or directory <code><code>Configuring for<code>:<code><code>PHP Api Version:<code><code>Zend Module Api No:<code> Zend Extension Api No:<code><code><code> <code>Solution: <code> <code> 1 |
-s
/
Application
.9.sdk/usr/include | /usr/include
<code><code><code><code><strong>PS: Tested and works with Yosemite (10.10) Xcode 6.0.1 (6A317)</strong> Question 2 :<code>If you execute phpize, the following error is prompted:<code><code><code><code>1<code>2<code> |
Solution:First install Homebrew: |
<code><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">ruby -e <span>"</span><span>$(curl -fsSL https://raw.<strong>github</strong>usercontent.com/Homebrew/install/master/install)</span></pre><div class="contentsignin">Copy after login</div></div><code><code>Then install autoconf: <code> |
brew install
autoconf