Elasticsearch & Full Text Search Systems · 课时

搭建您的第一个集群

逐步了解安装 Elasticsearch 并搭建基础单节点集群的过程,开启您的学习之旅。

第 3 / 4 课12 个步骤

搭建您的第一个集群 是 CoddyKit 上的免费 Elasticsearch & Full Text Search Systems 课时。 这是第 3 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Elasticsearch & Full Text Search Systems 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Elasticsearch & Full Text Search Systems 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

Your First Elasticsearch Node

Let's get a single-node Elasticsearch cluster running locally — your launchpad for experimenting with indexing and search.

Prerequisite: Java Runtime

Elasticsearch runs on Java, so you'll need a JRE — recent versions want Java 11 or later. The command below checks your version.

java -version

Download Elasticsearch

Grab Elasticsearch from the official Elastic site: a .zip for Windows, a .tar.gz for Linux or macOS. Pick the latest stable release.

Unpack the Archive

Extract the archive to create the Elasticsearch directory. On Linux or macOS the tar command does it — just swap in your version number.

tar -xzf elasticsearch-x.y.z-linux-x86_64.tar.gz

Explore the Directories

Inside the unpacked folder, the key directories are bin/ (executables), config/ (settings), data/ (your index), and logs/.

Basic Configuration

For a single node, defaults are usually fine. The main config file is config/elasticsearch.yml, where cluster.name and node.name live.

Start Elasticsearch

Time to start the node: cd into the directory and run the startup script. Elasticsearch runs in the foreground, so keep this terminal open.

cd elasticsearch-x.y.z
bin/elasticsearch

Verify Startup

Verify it's up by hitting its default port, 9200, from a new terminal with the curl command below.

curl -X GET "localhost:9200/?pretty"

Interpreting the Output

A healthy node returns JSON with cluster_name, node_name, the version, and the tagline You Know, for Search — proof your node is live.

Stopping Elasticsearch

To shut down gracefully, go back to the terminal running Elasticsearch and press Ctrl+C. Closing the window may leave it running in the background.

Quick Check

You've just learned how to set up and verify a basic Elasticsearch node. Let's test your understanding.

Recap & Next Steps

Done! You installed, started, verified, and stopped your first single-node cluster. Next, we'll index and search real documents.

免费开始

用 AI 导师学习 Elasticsearch & Full Text Search Systems — 免费

在浏览器中编写并运行真实代码,获得全天候 AI 导师的即时帮助,并在网页或应用中继续学习。

课程
12
课程
48

常见问题解答

「搭建您的第一个集群」课时是免费的吗?

是的 — 「搭建您的第一个集群」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Elasticsearch & Full Text Search Systems 课程的其余内容,请升级到 CoddyKit PRO。 Elasticsearch & Full Text Search Systems 课程共包含 4 节课。

「搭建您的第一个集群」这节课中我会学到什么?

逐步了解安装 Elasticsearch 并搭建基础单节点集群的过程,开启您的学习之旅。 你通过在浏览器中直接运行的动手代码来练习 Elasticsearch & Full Text Search Systems,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Elasticsearch & Full Text Search Systems 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Elasticsearch & Full Text Search Systems 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 3 节课,共 4 节。

「搭建您的第一个集群」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Elasticsearch & Full Text Search Systems 课中编写并运行代码吗?

能。每节 Elasticsearch & Full Text Search Systems 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. 什么是全文搜索
  2. Elasticsearch 核心概念
  3. 搭建您的第一个集群
  4. 分析器、分词器与倒排索引
← 返回 Elasticsearch & Full Text Search Systems