编程语言
首页 > 编程语言> > 安装php7.4.3+php-fpm7.4.3

安装php7.4.3+php-fpm7.4.3

作者:互联网

Centos7源码安装PHP7.4.3

step1:下载PHP安装包   wget https://www.php.net//distributions/php-7.4.3.tar.gz step2:安装依赖包
yum install -y libxml2-devel  libcurl-devel  sqlite-devel
yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-5.9.5-3.el7.x86_64.rpm
yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-devel-5.9.5-3.el7.x86_64.rpm
 
step3:解压安装包,并进入解压路径  tar -zxvf php-7.4.3.tar.gz   cd php-7.4.3
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --enable-mbstring --enable-mysqlnd
make
make install

step4:查看php版本,,并做软链接
php -v
ln -s /usr/local/php/bin/php /usr/sbin/php

step5:把解压路径里的php.ini-production拷贝到/usr/local/php/etc/php.ini
cp /opt/php-7.4.3/php.ini-production
/usr/local/php/etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default  /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default  /usr/local/php/etc/php-fpm.d/www.conf

step6:将php-fpm作为系统服务
cd /usr/local/php/sbin
cp php-fpm /etc/init.d/php-fpm

启动服务:/etc/init.d/php-fpm

 

标签:fpm,php7.4,etc,64,usr,fpm7.4,php,local
来源: https://www.cnblogs.com/krystal-LA-zx/p/12971780.html