mac 下安装php7全过程介绍

时间:2021-05-26

更新系统库

yum -y install gcc gcc-c++ automake autoconf libtool make lrzsz expect asciidoc xmlto expat-devel.x86_64 texinfoyum -y install gcc gcc-c++ glibc libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel

安装pcre 正则表达式库

cd /usr/local/src//wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gzwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gztar -zxvf pcre-8.40.tar.gzcd pcre-8.40./configuremake && make install

安装Zlib库

cd /usr/local/src//wget http://zlib.net/zlib-1.2.8.tar.gzwget http://zlib.net/zlib-1.2.11.tar.gztar -zxvf zlib-1.2.11.tar.gzcd zlib-1.2.11./configuremake && make install

安装SSL库

cd /usr/local/src//wget https:///phpredis/phpredis/zip/php7 unzip phpredis-php7.zip cd phpredis-php7 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make && make install vim /usr/local/php/lib/php.ini extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/yaf.so extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/redis.so extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/yaf.so extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/redis.so

安装redis

cd /usr/local/src/ //wget http://download.redis.io/releases/redis-3.2.80.tar.gz wget http://download.redis.io/redis-stable.tar.gz //tar xzf redis-3.2.8.tar.gz tar xzf redis-stable.tar.gz cd redis-3.2.8 cd redis-stable make cp src/redis-server /etc/init.d/redis cp redis.conf /etc/redis.conf chmod +x /etc/init.d/redis service redis /etc/redis.conf &

以上这篇mac 下安装php7全过程介绍就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章