centos8 + php7.4 + nginx + mariadb
1.php7.4安装
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-8.rpm yum install php74-php php74-php-fpm php74-php-phpiredis php74-php-pdo php74-php-json php74-php-mysql php74-php-devel php74-php-mbstring -y
反手一个composer
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" php composer-setup.php
2.安装nginx
yum install nginx -y
3.安装mariadb
yum install mariadb mariadb-server -y systemctl start mariadb systemctl enable mariadb /usr/bin/mysqladmin -u root password 'xxxxx'
3.新增 php nginx运行账号 admin
groupadd admin adduser admin -g admin passwd admin
4.修改nginx运行用户为admin
vim /etc/nginx/nginx.conf user admin;
5.修改php-fpm运行用户为admin
vim /etc/opt/remi/php74/php-fpm.d/www.conf user = admin group = admin
6.启动php nginx
systemctl start php74-php-fpm.service systemctl start nginx.service
参考 php74安装: https://www.cnblogs.com/alliancehacker/p/12255445.html