创建ES启动用户
# root
echo "appuser:x:888" >> /etc/group
useradd appuser -u 888 -g 888 -p 123456 -d /home/appuser
官网下载软件包与解压
# 地址
https://elasticsearch.cn/download/
# appuser
tar -xzvf elasticsearch-7.8.0-linux-x86_64.tar.gz -C /opt
参考链接
下载中心 - Elastic 中文社区 (elasticsearch.cn)
安装软件包的三种方法;rpm包介绍、rpm工具的用法;yum工具用法、源码包安装handsome灿的技术博客51CTO博客_rpm详解
JDK环境安装
# appuser
tar -xzvf jdk-8u181-linux-x64.tar.gz -C /opt/
vim ~/.bash_profile
JAVA_HOME=/opt/jdk1.8.0_181
PATH=$JAVA_HOME:$JAVA_HOME/bin:$PATH
export PATH
# 验证
[appuser@test101 ~]$ echo $JAVA_HOME
/opt/jdk1.8.0_181
[appuser@test101 ~]$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
参考链接
ES启动
# appuser
cd /opt//opt/elasticsearch-7.8.0/bin-7.8.0/bin
./elasticsearch -d #后台启动
# 验证
curl http://localhost:9200
{
"name" : "test101",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "O2SQ6cTSSxWJyNaOrlrTTg",
"version" : {
"number" : "7.8.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "757314695644ea9a1dc2fecd26d1a43856725e65",
"build_date" : "2020-06-14T19:35:50.234439Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}