elasticsearch 1.5 + mysql安装配置与简单使用
来源:互联网 发布:windows 多线程 编辑:程序博客网 时间:2024/06/04 18:45
1.下载es:
https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.deb
2.安装:
dpkg -i elasticsearch-1.5.1.deb
3.启动es
/etc/init.d/elasticsearch start
4.mysql导入插件:
./bin/plugin -url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-river-jdbc/1.5.0.2/elasticsearch-river-jdbc-1.5.0.2-plugin.zip-install river-jdbc
5.创建jdbc driver:
curl -xput 'http://localhost:9200/_river/my_jdbc_river/_meta' -d '
{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://localhost:3306/xxx",
"user" : "root",
"password" : "xxx",
"sql" : "select id,timestamp from xxxx",
"index":"table",
"type":"db"
}
}'
6.删除:
curl -xdelete 'http://182.92.181.250:9200/db/table'
7.其他配置
可以通过schedule参数来配置es的定时更新。
8.客户端
当然也可以使用es的java客户端来操作增删改查
例如:
Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("182.92.181.250", 9300));GetResponse response = client.prepareGet().setIndex("_river").setType("table").execute().actionGet();
maven地址:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId> <version>1.5.1</version>
</dependency>
</pre>参考链接:<p></p><pre>
http://www.elasticsearch.cn/guide/
https://www.elastic.co/downloads
https://github.com/jprante/elasticsearch-jdbc#time-based-selecting
https://github.com/elastic/elasticsearch
- elasticsearch 1.5 + mysql安装配置与简单使用
- 安装mysql与简单配置
- elasticsearch安装与使用
- mysql安装与简单使用
- ubuntu安装elasticsearch&简单使用
- Elasticsearch简单使用系列--安装
- elasticsearch 安装过程,简单使用
- Elasticsearch 安装与集群配置
- Elasticsearch Cluster 安装与配置
- centos elasticsearch安装与配置
- ElasticSearch-2.0.0集群安装配置与API使用实践
- Mac上安装MySql与简单配置
- 001 MySQL的简单安装与配置
- Elasticsearch集群安装与使用
- elasticsearch集群安装与使用
- Elasticsearch的安装与使用
- elasticsearch 简单安装配置(一)
- 【数据库】MySQL的安装与简单使用
- windows平台使用Qt5进行ffmpeg开发 - ffmpeg库的导入相关问题
- Linux操作系统基本命令
- Reverse Bits
- 美式治愈系厨房
- 人人都会OSGI--实例讲解OSGI开发
- elasticsearch 1.5 + mysql安装配置与简单使用
- 腾讯网无障碍说明
- typedef 和 define的区别 和 陷阱
- iOS 启动页
- Linux--进程间通信(信号量,共享内存)
- android lichee编译脚本解析
- 前端CSS规范整理
- PHP 中dirname(_file_)讲解
- 基于改进的协同过滤算法的用户评分预测模型