php7 安装phalcon,centos7下php7.0.x安装phalcon框架

1.切换到 /usr/local/src 目录下,使用下载phalcon扩展

```

cd /usr/local/src

git clone --depth=1 git://github.com/phalcon/cphalcon.git

```

2.进入下载好的cphalcon下,编译安装phalcon框

```

cd /usr/local/src/cphalcon/build/php7/64bits/

/usr/local/php/bin/phpize

```

![image](https://upload-images.jianshu.io/upload_images/6954572-5fe7ca1cbba71704.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

3.编译

```

./configure --with-php-config=/usr/local/php/bin/php-config

```

![image](https://upload-images.jianshu.io/upload_images/6954572-2acb159aa678c495.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

5.最后执行安装命令

```

make && make install

```

安装完成后会在/usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/生成phalcon.so文件

![image](https://upload-images.jianshu.io/upload_images/6954572-89498faabe2b3a3f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

6.配置php.ini文件,在新的一行添加:extension=phalcon.so即可

![image](https://upload-images.jianshu.io/upload_images/6954572-b0efa315125a1c31.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

7.重启php-fpm

```

service php-fpm restart

```

查看phpinfo()出现如下:

![image](https://upload-images.jianshu.io/upload_images/6954572-12a68c2742da0f2f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值