Centos7(Liunx)安裝PHP7.4版本(remi)


Centos7(Liunx)安裝PHP7.4版本(remi)

安裝源

yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

安裝php74

yum --enablerepo=remi install php74-php

安裝所需擴展

yum --enablerepo=remi install php74-php php74-php-gd php74-php-xml php74-php-sockets php74-php-session php74-php-snmp php74-php-mysql

 

查看安裝情況

復制代碼
#運行並查看版本
php74 -v
#重啟命令php-fpm
systemctl restart php74-php-fpm
#添加自動啟動
systemctl enable php74-php-fpm
#查看php7.4的安裝路徑
whereis php
#鏈接php文件
ln -s /opt/remi/php74/root/usr/bin/php /usr/bin/php
復制代碼

 

其他配置、fpm配置

復制代碼
# The current PHP memory limit is below the recommended value of 512MB.
vi /etc/opt/remi/php74/php.ini
memory_limit = 512M

#如果你運行的是nginx而不是apache,修改
vi /etc/opt/remi/php74/php-fpm.d/www.conf
user = apache
group = apache
# Replace the values with
user = nginx
group = nginx
復制代碼

注意user、group

需要與nginx所用相同

 

參照:https://mefj.com.cn/lur2727.html

 

配置gate

 

 注意兩者高亮部分(user、group)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM