Linux centos7下php安装cphalcon扩展的方法

来源:深圳沃龙软件开发公司     2020-09-25

说明:

操作系统:CentOS7

php安装目录:/usr/local/php

php.ini配置文件路径:/usr/local/php/etc/php.ini

运行环境:LNMP ,PHP7

 

1、安装cphalcon cd /usr/local/src

yum install git#git clone git://github.com/phalcon/cphalcon.git #需要安装安装git软件包(源太慢)

git clone https://gitee.com/mirrors/cphalcon.gitcd /usr/local/src/cphalcon/build/php7/64bits #选择相应的php版本目录/usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install

[root@app01 64bits]# make install

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20190902/

Installing header files:          /usr/local/php/include/php/

[root@app01 64bits]# vim /usr/local/php/etc/php.ini

[root@app01 64bits]# service php-fpm restart

Gracefully shutting down php-fpm . done

Starting php-fpm [11-Jun-2020 22:52:53] NOTICE: PHP message: PHP Warning:  Cannot load module 'phalcon' because required module 'psr' is not loaded in Unknown on line 0

done

安装psr

git clone https://github.com/jbboehr/php-psr.git

cd php-psr

find / -name phpize

/usr/local/php/bin/phpize

./configure --with-php-config=/opt/lampp/bin/php-config

make

sudo make install

2、配置php支持cphalcon vi /usr/local/php/etc/php.ini #编辑配置文件,在最后一行添加以下内容 添加

extension=psr.so extension=phalcon.so :wq! #保存退出3、重启php-fpm service php-fpm restart 在phpinfo页面可以看到关于cphalcon的选项,说明安装成功。

或使用

php -m | grep phalcon

phalcon #加载成功 至此,Linux下php安装phalcon扩展教程完成。


本内容皆为 深圳沃龙软件开发公司 原创
如需转载,请注明文章出处和来源网址:http://www.wooolong.com/blog/20.html

全部评论

Georgetta | 2022-11-23

Why Nobody is Talking About House Builders Aberdeen And What You should Do Today

Reply

Alfonso | 2022-11-27

Guess the exchange rate, bitcoin and get money. Start with $10 and you can earn up to $1000 in a day, see how Here

Reply

Luke | 2022-12-01

Woah! I'm really loving the template/theme of this site. It's simple, yet effective. A lot of times it's hard to get that "perfect balance" between usability and visual appearance. I must say that you've done a superb job with this. Also, the blog loads super fast for me on Firefox. Superb Blog!

Reply

Christie | 2022-12-15

Amman Arab college circles is a Jordanian intellectual institute of forward-looking education, located upon Jordan Street, Mubis-Amman. Amman Arab university (AAU) was founded in 1997 under the innovative Education Council No. (1476) upon 24/11/1997 as a non-profit private academic circles specialized in graduate studies below the name Amman Arab university circles for Graduate Studies, and thereby became the first university in Jordan that offers graduate programs leading to Master's

Reply

Dakota | 2022-12-22

Amman Arab university is a Jordanian assistant professor institute of forward-looking education, located on Jordan Street, Mubis-Amman. Amman Arab academic circles (AAU) was founded in 1997 under the well ahead Education Council No. (1476) on 24/11/1997 as a non-profit private academic world specialized in graduate studies under the publicize Amman Arab university circles for Graduate Studies, and thereby became the first college circles in Jordan that offers graduate programs leading

Reply

Kirsten | 2022-12-25

Amman Arab university is a Jordanian instructor institute of highly developed education, located upon Jordan Street, Mubis-Amman. Amman Arab university circles (AAU) was founded in 1997 under the cutting edge Education Council No. (1476) on 24/11/1997 as a non-profit private the academy specialized in graduate studies below the name Amman Arab academe for Graduate Studies, and thereby became the first academic circles in Jordan that offers graduate programs leading to Master's Degrees,

Reply

Shari | 2023-01-24

My brother suggested I might like this blog. He was totally right. This post actually made my day. You cann't imagine simply how much time I had spent for this info! Thanks!

Reply

Major | 2023-01-25

Everyone at this office is outstanding and truly cares about your recovery. If you're looking for help with an opiate addiction you couldn't ask for more. They understand and care.

Reply

Major | 2023-01-25

Everyone at this office is outstanding and truly cares about your recovery. If you're looking for help with an opiate addiction you couldn't ask for more. They understand and care.

Reply

Corey | 2023-01-27

My spouse and I stumbled over here by a different website and thought I might check things out. I like what I see so now i'm following you. Look forward to looking over your web page for a second time.

Reply

发表评论