当前位置: 首页 > wzjs >正文

汕头站扩建有连接华东线吗seo的方式有哪些

汕头站扩建有连接华东线吗,seo的方式有哪些,WordPress注册免发邮件,快手短视频小程序Elasticsearch 是一个分布式的搜索和分析引擎,能够以近乎实时的速度存储、搜索和分析大量数据。它被广泛应用于日志分析、全文搜索、应用程序监控等场景。 本文将带你一步步在 Linux 系统上安装 Elasticsearch 7.17.23 版本,并完成基本的配置&#xff0…

       Elasticsearch 是一个分布式的搜索和分析引擎,能够以近乎实时的速度存储、搜索和分析大量数据。它被广泛应用于日志分析、全文搜索、应用程序监控等场景。

本文将带你一步步在 Linux 系统上安装 Elasticsearch 7.17.23 版本,并完成基本的配置,为后续的使用打下基础。

你将学到:

  • 如何在 Linux 系统上下载和安装 Elasticsearch 7.17.23

  • 如何配置 Elasticsearch 的基本参数

  • 如何启动和停止 Elasticsearch 服务

  • 如何验证 Elasticsearch 是否安装成功

准备工作:

  • 一台运行 Linux 系统的服务器

  • 确保服务器上已经安装了 Java 8 或更高版本

  • 以 root 用户或具有 sudo 权限的用户身份登录

接下来,我们将按照以下步骤进行安装:

  1. 下载 Elasticsearch 7.17.23 安装包

  2. 解压安装包并配置环境变量

  3. 修改 Elasticsearch 配置文件

  4. 启动 Elasticsearch 服务

  5. 验证 Elasticsearch 是否安装成功

1. 下载 Elasticsearch 7.17.23 安装包

Elasticsearch 7.17.23 | Elastic

直接在官方下载对应安装包。

2. 解压安装包并配置环境变量

把安装包上传到服务器后,拷贝到/usr/local目录下,执行解压命令:

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

由于ES不允许用root账号启动,这里需要创建用户,例如:elastic

创建过程如下:

sudo useradd -m -d /home/elastic -s /bin/bash elastic
sudo passwd elastic  # 设置密码
sudo chown -R elastic:elastic /usr/local/elasticsearch-7.17.23

切换elastic账号

su - elastic

3.修改 Elasticsearch 配置文件

进入Elasticsearch目录:

cd /usr/local/elasticsearch/config

例如:

开始修改配置文件elasticsearch.yml:

 

记得自己创建好对应路径的文件夹分配好权限!!!!

sudo chown -R elastic:elastic /usr/local/elasticsearch/
sudo chmod -R 755 /usr/local/elasticsearch/

 修改配置文件jvm.options:

4.启动 Elasticsearch 服务

执行以下命令。如果不报错,则跳转到第五点看结果。

/usr/local/elasticsearch-7.17.23/bin/elasticsearch -d

5.如何验证 Elasticsearch 是否安装成功

一切正常的情况下,配置完成后,运行curl -X GET "localhost:9200",出现如下图,则表示安装完成!

但是,肯定不会有正常情况

我们来说一下常见的错误:

(1)如果系统配置的是jdk8,启动会出现jdk版本不匹配等错误,如下:

warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/java/jdk1.8.0_144/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/java/jdk1.8.0_144/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.

解决办法就是,修改jdk指向路径,默认使用es自带的JDK,找到文件

 /usr/local/elasticsearch-7.17.23/bin下的:elasticsearch-env编辑,

vim elasticsearch-env

注释掉一部分配置,如下图: 

这样就解决jdk问题了。这个是常见问题。。另外还有几个不常见的:

(1) 两项系统限制值过低,需要调整 max file descriptorsvm.max_map_count

错误信息如下:

ERROR: [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch.
bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/local/elasticsearch/logs/my-cluster.log

直接切换root账号调整:

sudo vi /etc/security/limits.conf

在文件末尾添加以下两行:

elastic soft nofile 65535
elastic hard nofile 65535

退出保存!解决

(2)vm.max_map_count 的值太低,错误信息如下:

ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/local/elasticsearch/logs/my-cluster.log

切换root,编辑sysctl.conf

 vi /etc/sysctl.conf

添加:vm.max_map_count=262144

保存退出!解决!!

最后,我们得给es配置个密码吧,有密码才像那么一回事!

设置密码方式有三种,我们选择最稳妥的通过 elasticsearch-setup-passwords 工具设置密码

修改配置文件

sudo vi /usr/local/elasticsearch-7.17.23/config/elasticsearch.yml

新增一下内容:

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

如图: 

 运行命令:

/usr/local/elasticsearch-7.17.23/bin/elasticsearch-setup-passwords interactive

提示是否设置密码。如图: 

会让设置很多账号的密码:

依次输入密码。建议同一个密码!

修改完成后,重启es服务!大功告成。。 

http://www.dtcms.com/wzjs/492606.html

相关文章:

  • 做网站首页文字排版技巧绍兴seo
  • wordpress淘宝组件插件镇江关键字优化品牌
  • 代理加盟微信网站建设什么是seo关键词优化
  • 学做网站培训上海网站建设方案内容
  • b站大全收费2023入口在哪手机注册网站
  • 做sm网站违法吗如何在网上做销售推广
  • html手机网页制作山东seo百度推广
  • 做营销网站灵感关键词生成器
  • 平台网站建设ppt模板下载网站排名优化培训电话
  • 学校网站建设解决方案手机百度收录提交入口
  • 做外销网站搜索引擎营销分析
  • 武汉招聘信息最新招聘seo优化关键词是什么意思
  • 对网站建设的意见建议自媒体视频剪辑培训班
  • 南澳网站建设收录优美的图片app
  • 网站制作价格报表百度竞价排名事件分析
  • 佛山从事网站建设北京网站优化价格
  • 手机兼职有哪些搜索引擎优化期末考试答案
  • 怀柔区企业网站设计机构提供湘潭网站建设
  • 笔记本做网站服务器app推广员好做吗
  • 黑龙省建设厅网站首页怎么做一个网站
  • 人和动物做的电影网站关键词排名查询软件
  • 个人网站备案做淘宝客外贸网站推广平台有哪些
  • 河北燕郊网站制作百度中心
  • 延边网站建设公司链接
  • 建设官方网站企业网站如何制作一个网页网站
  • 做百度推广网站被攻击seo整站优化解决方案
  • 企业网站提交ping站长工具
  • 青岛做网站的公司排名有没有免费的推广网站
  • 汽车网站怎么做怎么免费创建自己的网站
  • 优秀企业网站的优缺点seo是啥