feather mac 问题小结
feater 依赖php及jdk
1、自带的php没有cgi ,索性直接装个新的
修改环境变量,并使其生效,验证方式是 打印版本信息:
php -v
PHP 7.1.13 (cli) (built: Feb 1 2018 13:38:42) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
php-cgi -v
PHP 7.1.13 (cgi-fcgi) (built: Feb 1 2018 13:38:53)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
2、java 要用jdk8 (低的版本好像也可以 没有试)
不要用java se
java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
否则会报错
feather server start --timeout 30
checking java support : v10.0.1
checking php-cgi support : v7.1.13
starting fis-server .......... fail
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/webapp/WebAppContext
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:374)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.webapp.WebAppContext
[ERROR] fis-server fails to start at port [8080], error: org.eclipse.jetty.webapp.WebAppContext
要用jdk8 版本显示:
java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
这时就会运行ok:
feather server start
checking java support : v1.8.0
checking php-cgi support : v7.1.13
starting fis-server ... at port [8080]
[NOTIC] browse http://127.0.0.1:8080/