4. ES单机搭建
1.安装JDK,Java JDK1.8.0 以上的版本
2. 导入GPG-KEY-elasticsearch
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
3. 配置清华源
vim /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://mirror.tuna.tsinghua.edu.cn/elasticstack/7.x/yum/
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
4. 安装
yum makecache && yum install -y elasticsearch
5. 配置ES,一般是修改堆内存大小
6.修改elasticsearch.yml
cd /etc/elasticsearch #如果没有vim 就yum install -y vim vim elasticsearch.yml
7.校验
curl http://127.0.0.1:9200