1. 添加软件源
见参考1。
2. 安装Nginx
yum install nginx
service nginx start
systemctl enable nginx.service
修改/etc/nginx/nginx.conf
3. 安装PHP
yum install php81 php81-php-fpm php81-php-pdo php81-php-mysqlnd php81-php-xml php81-php-gd php81-php-mbstring php81-php-pecl-zip
service php81-php-fpm start
systemctl enable php81-php-fpm.service
配置/etc/nginx/nginx.conf
location ~ \.php[?]* {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_read_timeout 3600;
}
location ~ ^/v4/ {
try_files $uri $uri/ /v4/index.php?$query_string;
}
4. 安装MariaDb Server
yum install mariadb104-server
service mariadb start
systemctl enable mariadb.service
参考:
评论