install php8.3 on rocky9.4

2024-08-05

wordpress6.6.1/nginx1.26.1/mariadb10.11/php8.3

1、dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf module reset php
dnf module enable php:remi-8.3

yum -y install php php-mysqlnd php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-zip php-redis
dnf install -y php-fpm php-mbstring php-xml php-curl php-mysqlnd php-zip php-cli php-imagick ImageMagick php-intl php-gd

systemctl enable php-fpm.service
systemctl start php-fpm.service

2、grep pid /etc/php-fpm.conf
pid = /run/php-fpm/php-fpm.pid

grep sock /etc/php-fpm.d/www.conf
listen = /run/php-fpm/www.sock

3、nginx 配置:
location ~ \.php$ {
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

4、隐藏版本
打开php.ini
expose_php = Off;

5、echo "" >>info.php

分类:Linux | 标签: |

相关日志

评论被关闭!