如何升级到PHP8.3?
用的是LNMP2.0.似乎是不支持升级php8.3.2.请问有什么方法可以单独升级php版本?lnmp2.0不支持,要不就是改脚本或用2.1 改如下脚本后,用upgrade.sh升级安装,显示还是8.1.19,升级到8.2.16没问题。
9:37 2024/2/25
修改lnmp 的php安装版本,需要修改的文件包含(lnmp目录下):
1. conf子目录 增加8.3配置
cp enable-php8.2.conf enable-php8.3.conf
修改其中的8.2为8.3
fastcgi_passunix:/tmp/php-cgi8.3.sock;
2.在include/php.sh 中增加一个函数:Install_PHP_83(),暂时复制Install_PHP_82()
3.在include/upgrade_php.sh 增加一个函数:Upgrade_PHP_83(),暂时复制Upgrade_PHP_82()
4. 在include/version.sh 中的php后面增加一段:
elif [ "${PHPSelect}" = "14" ]; then
Php_Ver='php-8.2.16'
elif [ "${PHPSelect}" = "15" ]; then
Php_Ver='php-8.3.3'
5. 在install.sh中的Install_PHP()函数中增加一段:
elif [ "${PHPSelect}" = "14" ]; then
Install_PHP_82
elif [ "${PHPSelect}" = "15" ]; then
Install_PHP_83
6.在include/main.sh中的PHP_Info数组中增加 'PHP 8.2.16' 'PHP 8.3.3',
在PHP_Selection()函数增加并修改:
echo "14: Install ${PHP_Info}"
echo "15: Install ${PHP_Info}"
read -p "Enter your choice (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15): " PHPSelect
最后增加:
14)
echo "You will install ${PHP_Info}"
;;
15)
echo "You will install ${PHP_Info}"
;;
7. 可能还需要修改include/multiplephp.sh
https://soft.lnmp.com/服务器上目前只有php8.3.0文件,所以暂时把上面的8.3.3改为8.3.0(改后升级出错) licess 发表于 2024-2-19 08:56
lnmp2.0不支持,要不就是改脚本或用2.1
利用lnmp2.1 升级到php8.3,也不行 卸载,再单独用lnmp2.1beta版本安装(lnmpa),也出错不成功:
系统:CentOS Linux release 8.4.2105
Linux 4.18.0-305.19.1.el8_4.x86_64 #1 SMP Wed Sep 15 15:39:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
结果:
Nginx: OK
MySQL: OK
Error: PHP install failed.
Error: Apache install failed.
Sorry, Failed to install LNMP!
Please visit https://bbs.vpser.net/forum-25-1.html feedback errors and logs.
You can download /root/lnmp-install.log from your server,and upload lnmp-install.log to LNMP Forum. challey 发表于 2024-2-25 16:52
卸载,再单独用lnmp2.1beta版本安装(lnmpa),也出错不成功:
系统:CentOS Linux release 8.4.2105
Linux ...
https://blog.csdn.net/tomjk/article/details/134073569
根据上面的方法:
执行:
sudo dnf -y install centos-release-stream
sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
解决remi库安装失败问题
执行下面命令查询可安装的php版本
dnf module list php
可以安装php8.3
但用lnmp2.1beta 安装php8.3还是失败
页:
[1]