freemanzk2022-07-23 13:25:44
发布到技术

nginx+php7.2

yum install nginx -y


yum install epel-release

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum install yum-utils

yum-config-manager --enable remi-php72

yum update



yum install php72


php72 -v

yum install php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache



systemctl enable php72-php-fpm.service

systemctl start php72-php-fpm.service


systemctl status php72-php-fpm.service



--------------

systemctl start nginx.service              #启动nginx服务
systemctl enable nginx.service             #设置开机自启动
systemctl disable nginx.service            #停止开机自启动
systemctl status nginx.service             #查看服务当前状态
systemctl restart nginx.service           #重新启动服务
systemctl list-units --type=service        #查看所有已启动的服


-------------------------


sudo yum install php php-fpm php-mysql php-mbstring php-mcrypt php-sockets php-curl php-common php-xml php-soap