1、安装mysql
>>>yum -y install mariadb mariadb-server
给root用户设置密码
>>>mysqladmin -uroot password "pwd123"
>>>grant all privileges on *.* to 'root'@'localhost' identified by 'pwd123' with grant option;#高版本可能出现问题
>>>grant all privileges on *.* to "root"@"localhost" identified by "pwd123";


2、安装php
>>>yum -y install php php-fpm php-mysql php-gd
centos7.2不需要设置php.ini和php-fpm.conf

3、安装nginx
>>>yum -y install nginx
或者源码安装
>>>yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
>>>./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module


4、配置
nginx
location ~ \.php$ {
  root html/aaaa;
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_index index.php;
  include fastcgi.conf;
}

相关文章:

  • 2021-12-26
  • 2021-07-29
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2021-06-21
  • 2021-06-17
猜你喜欢
  • 2021-09-21
  • 2021-08-09
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
相关资源
相似解决方案