php源码安装

编程知识 更新时间:2023-04-05 18:26:05

php源码安装

下载php的rpm包并解压
在解压之后的目录中,查看是否有configure,如果有此文件,使用./configure--->make---->make install方式进行源码安装

[root@server1 ~]# yum install -y bzip2
[root@server1 ~]# tar jxf php-7.4.12.tar.bz2
[root@server1 ~]# ls
[root@server1 ~]# cd php-7.4.12/
[root@server1 php-7.4.12]# ls
[root@server1 php-7.4.12]# ./configure | less
[root@server1 php-7.4.12]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx  --with-curl --with-iconv --with-mhash --with-zlib --with-openssl --enable-mysqlnd --with-mysqli --with-pdo-mysql --disable-debug --enable-sockets --enable-soap --enable-inline-optimization --enable-xml --enable-ftp --enable-gd --enable-exif --enable-mbstring  --enable-bcmath --with-fpm-systemd
[root@server1 php-7.4.12]# yum install -y systemd-devel libxml2-devel sqlite-devel libcurl-devel libpng-devel
[root@server1 ~]# yum install -y oniguruma-6.8.2-1.el7.x86_64.rpm
[root@server1 ~]# yum install -y oniguruma-devel-6.8.2-1.el7.x86_64.rpm
 
[root@server1 php-7.4.12]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx  --with-curl --with-iconv --with-mhash --with-zlib --with-openssl --enable-mysqlnd --with-mysqli --with-pdo-mysql --disable-debug --enable-sockets --enable-soap --enable-inline-optimization --enable-xml --enable-ftp --enable-gd --enable-exif --enable-mbstring  --enable-bcmath --with-fpm-systemd
[root@server1 php-7.4.12]# make

 

memcache-4.0.5.2.tgz  ##解压 

对memcache进行源码编译
make
make install
cd /usr/local/php/etc/
vim php.ini
systemctl reload php-fpm.service
php -m | grep memcache 

 安装成功

 

 

更多推荐

php源码安装

本文发布于:2023-04-05 18:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/441b1f5b99f1625cde118ea569824aa0.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:源码   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 47138文章数
  • 14阅读数
  • 0评论数