设为首页 收藏本站
查看: 445|回复: 0

[经验分享] mac10.9.5 php5.4.45安装composer 简记

[复制链接]

尚未签到

发表于 2018-12-16 12:43:21 | 显示全部楼层 |阅读模式
  由于一直没升级系统版本,php也一直用的是系统默认的,导致新的一些东西用起来会有问题,
  比如 composer ...  之前一直 没去理会,这次有个资源在github上没找到,想了想还必须弄弄这个东西了,废话不多说了,流水账如下:
  系统版本: os x 10.9.5   php5.4.45   php配置简记
'/private/var/tmp/apache_mod_php/apache_mod_php-87.10~1/php/configure'
'--prefix=/usr'
'--mandir=/usr/share/man'
'--infodir=/usr/share/info'
'--disable-dependency-tracking'
'--sysconfdir=/private/etc'
'--with-apxs2=/usr/sbin/apxs'
'--enable-cli'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/Library/Server/Web/Config/php'
'--with-libxml-dir=/usr'
'--with-openssl=/usr'
'--with-kerberos=/usr'
'--with-zlib=/usr'
'--enable-bcmath'
'--with-bz2=/usr'
'--enable-calendar'
'--disable-cgi'
'--with-curl=/usr'
'--enable-dba'
'--enable-ndbm=/usr'
'--enable-exif'
'--enable-fpm'
'--enable-ftp'
'--with-gd'
'--with-freetype-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.10~1/Root/usr/local'
'--with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.10~1/Root/usr/local'
'--with-png-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.10~1/Root/usr/local'
'--enable-gd-native-ttf'
'--with-icu-dir=/usr'
'--with-ldap=/usr'
'--with-ldap-sasl=/usr'
'--with-libedit=/usr'
'--enable-mbstring'
'--enable-mbregex'
'--with-mysql=mysqlnd'
'--with-mysqli=mysqlnd'
'--without-pear'
'--with-pdo-mysql=mysqlnd'
'--with-mysql-sock=/var/mysql/mysql.sock'
'--with-readline=/usr'
'--enable-shmop'
'--with-snmp=/usr'
'--enable-soap'
'--enable-sockets'
'--enable-sqlite-utf8'
'--enable-sysvmsg'
'--enable-sysvsem'
'--enable-sysvshm'
'--with-tidy'
'--enable-wddx'
'--with-xmlrpc'
'--with-iconv-dir=/usr'
'--with-xsl=/usr'
'--enable-zend-multibyte'
'--enable-zip'
'--with-pcre-regex=/usr'  -------------Start
  创建并进入安装目录
  https://getcomposer.org/download/
  根据官网提示  进行安装
$php composer-setup.php
Downloading 1.1.2...
Composer successfully installed to: /data/codes/study/php/composer/composer.phar
Use it: php composer.phar
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:
The OpenSSL library (0.9.8zd) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.  完成后 提示 openssl 版本过低
  brew update
  ...
  brew upgrade openssl
$brew upgrade openssl
==> Upgrading 1 outdated package, with result:
openssl 1.0.2h_1
==> Upgrading openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2h_1.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2h_1.mavericks.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs
and run
  /usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include
==> Summary
  /usr/local/Cellar/openssl/1.0.2h_1: 1,691 files, 12.3M  升级完系统的openssl 之后
  重新编译安装php  openssl 扩展
  修改php.ini
  重启php-fpm
  然后发现openssl扩展加载 冲突
  原来编译的时候  已经默认开启了, 移除 /usr/bin/openssl  重新建立软链
  sudo ln -s /usr/local/opt/openssl/bin/openssl  /usr/bin/openssl
  重启php-fpm   依然载入的不是新的openssl
  

  

  看来只能重新编译安装php了,  先备份删除系统默认的php
  去php官网下载对应的源码包,移除系统默认配置中 apache 相关的配置项
  修改
--with-openssl=/usr/local/opt/openssl  配置后  sudo  make ...  sudo make install ...
  然后移除刚刚配置的多余扩展  openssl.so
  启动php-fpm     查看phpinfo

  更新成功:)
  

  

  





运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-652007-1-1.html 上篇帖子: php多进程实验笔记 下篇帖子: php中for循环与foreach循环效率比较
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表