mac 下安装php7全过程介绍

2018-09-07 12:22

阅读:471

  更新系统库

   yum -y install gcc gcc-c++ automake autoconf libtool make lrzsz expect asciidoc xmlto expat-devel.x86_64 texinfo 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 正则表达式库

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

  安装Zlib库

   cd /usr/local/src //wget

  安装SSL库

   cd /usr/local/src //wget

  安装nginx

   cd /usr/local/src wget

  出现报错,要重新安装mcrypt

  error: mcrypt.h not found. Please reinstall libmcrypt.

   wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz tar -zxvf libmcrypt-2.5.7.tar.gz cd libmcrypt-2.5.7 ./configure make && make install

  安装库

  安装php7

   cd /usr/local/src wget

  修改php用户

   cd /usr/local/php/ cp etc/php-fpm.conf.default etc/php-fpm.conf cp etc/php-fpm.d/修改配置中的user和group改为www vim /usr/local/nginx/nginx.conf

  修改nginx配置

   cd /usr/local/nginx/ vim nginx.conf include conf.d/*.conf; mkdir conf.d vim conf.d/

  安装mysql5.6

  下载mysql5.6

   cd /usr/local/src/ wget

  安装cmake

   cd /usr/local/src/ wget

  安装mysql

  修改授权

   mysql -uroot -p use mysql select host,user,password from user; delete from user where user = ; update user set password = PASSWORD(1234qwer) where user = root; //update user set host = % where user = root; flush privileges;

  安装git

   yum -y install lrzsz yum -y install openjade texinfo perl perl-XML-SAX.noarch rpm -ivh

  安装php的yaf、redis扩展

   cd /usr/local/src wget

  安装redis

   cd /usr/local/src/ //wget

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


评论


亲,登录后才可以留言!