Some important options maybe useful when compile php from source code

As we know install php 7 in ubuntu can't use apt-get install php directly,Because official source haven't updated until now(2016/8/21),but we can compile it from source code ,here I provide some useful options that maybe helpful for your to use php 7,

./configure  '--prefix=/usr/' '--with-config-file-path=/etc/php' '--enable-fpm' '--with-fpm-user=joy' '--with-fpm-group=joy' '--enable-mysqlnd' '--with-mysqli' '--with-pdo-mysql' '--with-iconv-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--enable-intl' '--with-mcrypt' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--enable-soap' '--with-gettext' '--disable-fileinfo' '--enable-opcache' '--with-xsl'

Please remember instead DIR with the directory where software are install ed ,If you don't know where is the path that software installed.you can use which command,Just like below

joy@ubuntu:~/php-7.0.4$ which mysql
/usr/bin/mysql
joy@ubuntu:~/php-7.0.4$ which curl
/usr/bin/curl
joy@ubuntu:~/php-7.0.4$ which openssl
/usr/bin/openssl

If you still can't compile php 7 because specified error path for configure.then you can leave DIR alone,Just like this

./configure  --with-openssl --with-curl --with-pdo-mysql --with-mysqli= --enable-mbstring

./configure will find default path for you

good luck to you!

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值