mac下elasticsearch安装日记,macelasticsearch
1,安装java运行环境2,下载elasticsearch https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.6.0.tar.gz
3,启动elas
./bin/elasticsearch -d
4,laravel 下安装扩展包,安装elasticsearch-php,添加php api扩展 composer安装报错 [Composer\Downloader\TransportException] Content-Length mismatch
是因为默认请求的是国外的数据源,解决,在composer.json中添加composer扩展包中国镜像, "repositories": { "packagist": { "type": "composer", "url": "https://packagist.phpcomposer.com" } } 然后再更新 php composer.phar require "elasticsearch/elasticsearch:~2.0"
使用 use Elasticsearch; use Elasticsearch\ClientBuilder;
$client = Elasticsearch\ClientBuilder::create()->build();
$params = [ 'index' => 'twitter', 'type' => 'tweet', 'id' => '1' ];
$response = $client->get($params); 5,安装marvel监控 进入elastic目录, cd /Users/xxx/Downloads/elasticsearch/bin/ ./plugin -i elasticsearch/marvel/latest
查看监控 http://localhost:9200/_plugin/marvel/kibana/index.html#/dashboard/file/marvel.overview.json
开发者控制台 http://localhost:9200/_plugin/marvel/sense/
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。