Centos7 Elastic search 安装
作者:
冰冰大象 | 来源:发表于
2016-10-21 16:32 被阅读148次
- 先安装JavaSDK
yum install java-1.7.0-openjdk
- 去官网下载最新 Elastic search包
wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/rpm/elasticsearch/2.4.1/elasticsearch-2.4.1.rpm
-
cd
进入下载好的文件夹进行本地安装
yum localinstall elasticsearch-2.4.1.rpm
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
按照提示执行即可
- 查看配置文件
rpm -qc elasticsearch
/etc/elasticsearch/elasticsearch.yml
/etc/elasticsearch/logging.yml
/etc/init.d/elasticsearch
/etc/sysconfig/elasticsearch
/usr/lib/sysctl.d/elasticsearch.conf
/usr/lib/systemd/system/elasticsearch.service
/usr/lib/tmpfiles.d/elasticsearch.conf
- 查看端口使用情况
netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 20308/mysqld
tcp 0 0 127.0.0.1:9200 0.0.0.0:* LISTEN 5956/java
tcp 0 0 127.0.0.1:9300 0.0.0.0:* LISTEN 5956/java
其中9200和9300就是 Elastic search 服务的端口号
- 如果需要远程访问请配置防火墙即可
- Node安装
npm install elasticsearch
- 创建数据库
curl -XPUT http://localhost:9200/index
本文标题:Centos7 Elastic search 安装
本文链接:https://www.haomeiwen.com/subject/nhkcuttx.html
网友评论