您好,登錄后才能下訂單哦!
一.安裝Java
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install openjdk-8-jre-headless
驗證
java -version
安裝JDK
sudo apt-get install openjdk-8-jdk-headless
驗證
javac
JAVA HOME /usr/lib/jvm/java-8-oracle
JAVA CLASSPATH /usr/share/java
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export CLASSPATH=/usr/share/java
source /etc/profile
二.安裝ES
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update
sudo apt-get install elasticsearch
ps -p 1
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
//sudo systemctl stop elasticsearch.service
//sudo systemctl status elasticsearch.service
驗證
curl localhost:9200
三.安裝ik
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.4.1/elasticsearch-analysis-ik-7.4.1.zip
重啟
sudo systemctl stop elasticsearch.service
sudo systemctl start elasticsearch.service
驗證
curl 'http://127.0.0.1:9200/_analyze?pretty=true' -H 'Content-Type: application/json' -d '{ "analyzer":"ik_max_word", "text":"士大夫敢死隊風格MN"}'
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。