創(chuàng)建ES啟動用戶
# root
echo "appuser:x:888" >> /etc/group
useradd appuser -u 888 -g 888 -p 123456 -d /home/appuser
官網(wǎng)下載軟件包與解壓
# 地址
https://elasticsearch.cn/download/
# appuser
tar -xzvf elasticsearch-7.8.0-linux-x86_64.tar.gz -C /opt
參考鏈接
下載中心 - Elastic 中文社區(qū) (elasticsearch.cn)
安裝軟件包的三種方法瘪吏;rpm包介紹蜗巧、rpm工具的用法;yum工具用法惧蛹、源碼包安裝handsome燦的技術(shù)博客51CTO博客_rpm詳解
JDK環(huán)境安裝
# 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"
}