下面小编就为大家介绍一下mac 下安装php7全过程。具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
更新系统库
yum -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 正则表达式库
安装Zlib库
安装SSL库
安装Nginx
出现报错,要重新安装mcrypt
error: mcrypt.h not found. Please reinstall libmcrypt.
安装库
/etc/ld.so.conf.d/local.conf
ldconfig -v
安装PHP7
修改PHP用户
修改Nginx配置
安装MysqL5.6
下载MysqL5.6
安装cmake
安装MysqL
vi /etc/profile
PATH=/usr/local/MysqL/bin:$PATH
export PATH
source /etc/profile
cp support-files/MysqL.server /etc/init.d/MysqL
chmod +x /etc/init.d/MysqL
chkconfig MysqL on
service MysqL start
修改授权
安装git
安装PHP的yaf、redis扩展
cd /usr/local/src
wget https://codeload.github.com/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
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全过程介绍就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程之家。