ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**1. 修改配置文件limits.conf** ~~~ sudo vim /etc/security/limits.conf elasticsearch - nofile 65536 # elasticsearch是打算用哪个用户启动,就写哪个用户 ~~~ **2. 下载rpm** ``` wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.2-x86_64.rpm ``` **3. 安装** ``` rpm -ivh elasticsearch-7.15.2-x86_64.rpm ``` **4. 配置** ``` vim /etc/elasticsearch/elasticsearch.yml ``` ``` node.name: node-1 #节点名称 path.data: /var/lib/elasticsearch #数据目录,可以自行修改 path.logs: /var/log/elasticsearch #日志目录,可以自行修改 network.host: 192.168.56.10 #主机地址 http.port: 9200 #端口号 cluster.initial_master_nodes: ["node-1"] ``` **5. 启动** ``` systemctl start elasticsearch ``` **6. 测试** ``` [root@admin-pk8mnf1yl ~]# curl -XGET http://192.168.56.10:9200/_cluster/health?pretty=true { "cluster_name" : "elasticsearch", "status" : "green", "timed_out" : false, "number_of_nodes" : 1, "number_of_data_nodes" : 1, "active_primary_shards" : 0, "active_shards" : 0, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 0, "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 100.0 } ```