重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

Ubuntu16.04的ElasticSearch的实践

一.安装Java
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install openjdk-8-jre-headless

库伦网站制作公司哪家好,找创新互联!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设等网站项目制作,到程序开发,运营维护。创新互联于2013年创立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联

验证
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"}'


网站名称:Ubuntu16.04的ElasticSearch的实践
当前路径:http://cqcxhl.com/article/jpccgg.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP