Linux下安装ElasticSearch

数据量大了,mysql真的招架不住,千万行数据,已经卡成渣渣了。

安装java环境
【jdk-8u311-linux-x64.tar.gz网盘地址】
链接:https://pan.baidu.com/s/117i1SCAOfMia7achrW6Q0w
提取码:zmq1
–来自百度网盘超级会员V5的分享

###下载jdk b版本  本次下载 1.8.0.311
mkdir /usr/local/java/
tar -zxvf jdk-8u311-linux-x64.tar.gz -C /usr/local/java/
vim /etc/profile
### 在最后添加如下
export JAVA_HOME=/usr/local/java/jdk1.8.0_311
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
###添加完成后  刷新配置
source /etc/profile
ln -s /usr/local/java/jdk1.8.0_311/bin/java /usr/bin/java

### 检查版本
java -version

在这里插入图片描述

安装ElasticSearch

cd ~
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.tar.gz
tar -zxvf elasticsearch-6.6.0.tar.gz 
mv elasticsearch-6.6.0 /usr/local/ES01
## 运行 ES
cd /usr/local/ES01/
adduser elasticsearch
passwd elasticsearch
chown -R elasticsearch:elasticsearch /usr/local/ES01/
su elasticsearch
./bin/elasticsearch -d
curl 127.0.0.1:9200

启动效果

[root@iZm5eejq1i5n8h97elgv2tZ ~]# curl 127.0.0.1:9200
{
  "name" : "GlcwmNe",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "r8IJ8ER9RRmPszL2u7JvLQ",
  "version" : {
    "number" : "6.6.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "a9861f4",
    "build_date" : "2019-01-24T11:27:09.439740Z",
    "build_snapshot" : false,
    "lucene_version" : "7.6.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

你可能感兴趣的:(数据库,个人笔记,elasticsearch,linux,java)