Centos6.9安裝Node.js+npm+ES-Head

Node.js+npm安裝
http://www.javashuo.com/article/p-fuktffnf-ed.htmlhtml

 

es-head安裝:
https://github.com/mobz/elasticsearch-headnode

 

下載好elasticsearch-head後修改配置文件Gruntfile.js添加hostnamegit

connect: {
                        server: {
                                options: {
                                        hostname: 'xupan003',
                                        port: 9100,
                                        base: '.',
                                        keepalive: true
                                }
                        }
                }github

 

vim config/elasticsearch.yml 在最後兩行添加以下
http.cors.enabled: true
http.cors.allow-origin: "*"npm

 

 

 

 npm install報錯:
2787 error code ELIFECYCLE
2788 error errno 1
2789 error phantomjs-prebuilt@2.1.16 install: `node install.js`
2789 error Exit status 1
2790 error Failed at the phantomjs-prebuilt@2.1.16 install script.
2790 error This is probably not a problem with npm. There is likely additional logging output above.
2791 verbose exit [ 1, true ]
解決方法:
npm install phantomjs-prebuilt@2.1.13 --ignore-scriptsvim

 

 http://localhost:9100/cors

相關文章
相關標籤/搜索