Home > Backend Development > PHP Tutorial > Configure phpredis extension under Mac, macphpredis extension_PHP tutorial

Configure phpredis extension under Mac, macphpredis extension_PHP tutorial

WBOY
Release: 2016-07-13 09:45:36
Original
877 people have browsed it

Configure phpredis extension under Mac, macphpredis extension

Recently, the development environment has been transferred from Windows to Mac, and all environments have to be reconfigured. Since Mac is based on a Unix system and I am not familiar with it, I encountered a lot of problems.

Install phpredis extension:

First of all, everyone first downloads the expansion package of phpredis, the address is as follows:

 https://nodeload.github.com/nicolasff/phpredis/zip/master (it is recommended that you download it manually and then copy it).

Then everyone uses the command to enter the folder

<span> 1</span> cd phpredis-master/  
<span> 2</span> <span>phpize命令(命令可能会出问题,解决方法请见文章尾部)
</span><span> 3</span> ./configure --with-php-config=/usr/bin/php-<span>config
</span><span> 4</span> <span>make</span>
<span> 5</span> <span>sudo</span> <span>make</span> <span>install</span><span> (依次执行上面的命令)
</span><span> 6</span> <span># 这时候会提示一个路径
</span><span> 7</span> # /usr/lib/php/extensions/no-debug-non-zts-<span>20100525</span>/
<span> 8</span> <span># 表示已经将扩展放置在该位置
</span><span> 9</span> vim /etc/<span>php.ini
</span><span>10</span> <span>#增加如下内容
</span><span>11</span> extension=<span>redis.so
</span><span>12</span> <span>#重启apache
</span><span>13</span> <span>sudo</span><span> apachectl restart
</span><span>14</span> <span>#查看扩展安装情况
</span><span>15</span> php -m |<span>grep</span><span> redis
</span><span>16</span> #出现 redis 表示安装成功
Copy after login

Please note that there may be errors when executing the phpize command. Please refer to: http://www.cnblogs.com/tianshuowang/p/4686156.html

Reference: http://my.oschina.net/Twitter/blog/287544

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1040160.htmlTechArticleConfiguring the phpredis extension under Mac. The macphpredis extension recently changed the development environment from windows to Mac. All environments must Configure again. Since Mac is based on unix system and I am not familiar with it, so...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template