分布式搜索引擎es

分布式搜索elasticsearch的安装步骤

Elasticsearch是一个基于Apache Lucene的开源搜索引擎,它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口,Elasticsearch是用Java开发的,并作为Apache许可条款下的开源发布,是当前流行的企业级搜索引擎,设计用于云计算中,能够达到实时搜索,稳定可靠,快速,安装使用方便。

分布式搜索引擎es

以下是在Linux环境下安装Elasticsearch的步骤:

1、下载Elasticsearch

我们需要从Elasticsearch的官方网站下载最新版本的Elasticsearch,在Linux环境下,我们可以使用wget命令来下载,如果我们想要下载7.10.1版本的Elasticsearch,我们可以运行以下命令:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.1-linux-x86_64.tar.gz

2、解压文件

下载完成后,我们需要解压这个文件,我们可以使用tar命令来解压这个文件:

分布式搜索引擎es

tar -xzf elasticsearch-7.10.1-linux-x86_64.tar.gz

3、移动到/usr/local目录

解压后,我们需要将Elasticsearch移动到/usr/local目录下:

sudo mv elasticsearch-7.10.1 /usr/local/elasticsearch

4、修改权限

为了确保Elasticsearch可以正常运行,我们需要修改其权限:

sudo chown -R elasticsearch:elasticsearch /usr/local/elasticsearch

5、修改环境变量

分布式搜索引擎es

我们需要将Elasticsearch的bin目录添加到PATH环境变量中,这样我们就可以在任何位置运行Elasticsearch了:

echo 'export PATH=$PATH:/usr/local/elasticsearch/bin' >> ~/.bashrc
source ~/.bashrc

6、启动Elasticsearch

我们可以启动Elasticsearch了:

cd /usr/local/elasticsearch/bin
./elasticsearch

如果Elasticsearch成功启动,你会看到类似以下的输出:

[2022-02-22T14:23:34,985][INFO ][o.e.n.Node               ] [node-1] initialized
[2022-02-22T14:23:34,986][INFO ][o.e.n.Node               ] [node-1] starting ...
[2022-02-22T14:23:35,055][INFO ][o.e.t.TransportService   ] [node-1] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2022-02-22T14:23:35,065][INFO ][o.e.b.Elasticsearch     ] [node-1] [127.0.0.1:9300][inet[/127.0.0.1:9300]] {data=false}, nodeID=node-1, cluster=default, routingtable={data=false}, cluster_name=[node-1][inet[/127.0.0.1:9300]] {data=false}} {nodes={node-1=[inet[/127.0.0.1:9300]]}} {cluster_name=default}{nodes={node-1=[inet[/127.0.0.1:9300]]}} initializing ...
{metadata={name=Node-1}&transport{host=127.0.0.1 port=9300}&http{publish_address=127.0.0.1:9200 protocol=HTTP}{max_http_connections=20}&logger{level=info}}[2022-02-22T14:23:35,486][INFO ][o.e.x.env                ] [node-1] using configuration file '/usr/local/elasticsearch/config/elasticsearch.yml' (org.elasticsearch.common.settings.Settings)
[2022-02-22T14:23:36,586][INFO ][o.e.m.jvm                  ] [node-1] using jdk version 9.0.4+11; vendor is Oracle Corporation Inc.; distribution is "Oracle JDK" with runtime version "9+181" from "/usr/lib/jvm/java-9-openjdk" loaded with a classpath including all the jars in the elasticsearch directory as well as the jars in the lib directory of the elasticsearch distribution

原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/185173.html

(0)
K-seoK-seoSEO优化员
上一篇 2023年12月31日 09:37
下一篇 2023年12月31日 09:39

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

免备案 高防CDN 无视CC/DDOS攻击 限时秒杀,10元即可体验  (专业解决各类攻击)>>点击进入