在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
前言 CentOS7下升级PHP到最新版本以及编译安装phalcon框架,看相关文档无数遍,自己尝试编译安装之后才理解的更深,编译步骤以及碰到的问题做个简单的记录
php-7.0.11编译安装 1.下载php-7.0.11源码 http://php.net/downloads.php#v7.0.11 2.依赖开发包 yum install gcc gcc-c++ libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel curl curl-devel openssl openssl-devel 3.编译安装 $YOUR_PHP_SRC_DIR/configure --prefix=/usr/local/php-7.0.11 --with-config-file-path=/usr/local/php-7.0.11/etc --enable-fpm --with-pdo-mysql=mysqlnd --enable-mysqlnd --with-mysqli=mysqlnd --with-openssl --with-mcrypt --with-gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --enable-exif --enable-mbstring --enable-pcntl --with-curl --enable-sockets --enable-soap --enable-ftp --with-zlib --enable-zip --with-bz2 4.生产环境常用php编译配置
phalcon编译安装 1.下载最新phalcon源码 git clone git://github.com/phalcon/cphalcon.git 2.编译安装 cd cphalcon/build 3.加上配置(php.ini) extension=phalcon.so 4.重启php-fpm service php-fpm restart
问题 1.GCC编译器报错(内存不够用) cc: internal compiler error: Killed (program cc1)
后记 1.使用phalcon文档里高级编译方法,编译之后的文件会很大,将近20几兆 8.解决phalcon高级编译可执行文件很大的问题 export CC="gcc" 9.使用php自带的gd库时,需要带上--with-bz2,可能依赖这个库
参考资料 【1】phalcon仓库 |
2022-08-15
2022-08-30
2022-08-17
2022-11-06
2022-08-18
请发表评论