在magento官方网站下载的Full Release with Sample Data最新版本,本以为放到本地就能跑了,结果页面直接空白

查看nginx的错误记录,出现了如下报错:[error] 26023#26023: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ReflectionException: Class Magento\Framework\App\ResourceConnection\Proxy does

再次刷新页面,能跳转到setup的,但却卡死至浏览器无法工作,再次查看nginx错误日志(正常),查看一下access.log日志,发现以下非常多的/setup/index.php/navigation HTTP/1.1" 302 5提示,很明显一直在强制跳转导致浏览器卡死,再次google,找到了一个解决方案,细看了一下,也就是根目录的nginx.conf.sample要改配置代码

操作如下:
1、修改根目录下的nginx.conf.sample,setup相应内容调整为
location /setup {
root $MAGE_ROOT;
location ~ ^/setup/index.php {
fastcgi_split_path_info ^(.+?.php)(/.*)$;
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/setup/(?!pub/). {
deny all;
}
location ~ ^/setup/pub/ {
add_header X-Frame-Options "SAMEORIGIN";
}
}

2、修改/etc/nginx/site-enable/magento配置文件

原配置

;server {
; listen 80;
; listen [::]:80;
; server_name my.m233.com;
; root /var/www/html/magento233;
; index index.php index.html;
; try_files $uri $uri/ /index.php;
; #location ~* .(gif|jpg|jpeg|png|css|js|ico)$ {
; # root /var/www/html/trunk;
; #}
; location / {
; #try_files $uri $uri/ =404;
; try_files $uri $uri/ @rewrite;
; }
; location @rewrite {
; rewrite / /index.php;
; }
; location ~ .php$ {
; fastcgi_pass 127.0.0.1:9111;
; fastcgi_index index.php;
; fastcgi_param SCRIPT_FILENAME /var/www/html/magento233/$fastcgi_script_name;
; include fastcgi_params;
; }
;}

以下为magento新配置,复制于nginx.conf.sample头部内容并调整对应目录

upstream fastcgi_backend {
server 127.0.0.1:9111;#本机php7.1-fpm指定了9111端口
#server unix:/var/run/php/php7.0-fpm.sock;
}
server {
listen 80;
server_name my.m233.com;
set $MAGE_ROOT /var/www/html/magento233;
set $MAGE_DEBUG_SHOW_ARGS 1;
include /var/www/html/magento233/nginx.conf.sample;
}

重启nginx后,再次刷新页面,终于出现了安装界面

注意:
1、mysql要先创建所需要的数据库
2、增加以下3个权限,保证安装过程能正常写入文件
sudo chmod 777 -R /var/www/html/magento233/pub/media
sudo chmod 777 -R /var/www/html/magento233/pub/static
sudo chmod 777 -R /var/www/html/magento233/generated