国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

linux centos7安裝部署安裝Elasticsearch并后臺啟動

這篇具有很好參考價值的文章主要介紹了linux centos7安裝部署安裝Elasticsearch并后臺啟動。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

centos7安裝部署安裝Elasticsearch


前言

為什么要使用“Elastic Stack”   
 它到底是什么?它是一組快速且高度可擴(kuò)展的組件(Elasticsearch、Kibana、Beats、Logstash 等),
 它們共同使您能夠安全地從任何來源以任何格式獲取數(shù)據(jù),
 然后對其進(jìn)行搜索、分析和可視化。
	官網(wǎng)地址:
	https://www.elastic.co/cn/
	tar包地址
	https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-17-3

一、安裝環(huán)境?

jdk1.8、elasticsearch-7.17.3-linux-x86_64

二、安裝及啟動步驟

1、解壓 elasticsearch-7.17.3-linux-x86_64.tar

1:切換到/opt/software 目錄
	cd /opt/software
2:創(chuàng)建es目錄
	mkdir es
3:將elasticsearch-7.17.3-linux-x86_64.tar上傳至 /opt/software/es
4:解壓縮es安裝包
	tar -zxvf elasticsearch-7.17.3-linux-x86_64.tar	
5、修改配置文件
	cd /opt/software/es/elasticsearch-7.17.3 /config
	vim elasticsearch.yml                                --編輯es配置文件
	單機(jī)如下圖配置所示  									--##EDIT下為修改部分
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#集群名稱
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#節(jié)點信息
# Use a descriptive name for the node:
##EDIT
node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#關(guān)閉自檢程序
##EDIT
bootstrap.memory_lock: false
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#網(wǎng)絡(luò)配置
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
##EDIT
network.host: 本機(jī)ip
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
##EDIT
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#自發(fā)現(xiàn)配置新節(jié)點向集群報到的主機(jī)名
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
##EDIT
cluster.initial_master_nodes: ["node-1"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
#
# ---------------------------------- Security ----------------------------------
#
#                                 *** WARNING ***
#
# Elasticsearch security features are not enabled by default.
# These features are free, but require configuration changes to enable them.
# This means that users don’t have to provide credentials and can get full access
# to the cluster. Network connections are also not encrypted.
#
# To protect your data, we strongly encourage you to enable the Elasticsearch security features. 
# Refer to the following documentation for instructions.
#
# https://www.elastic.co/guide/en/elasticsearch/reference/7.16/configuring-stack-security.html
#增加跨域配置
##EDIT
http.cors.enabled: true
http.cors.allow-origin: "*"

6、修改jvm.options配置文件

################################################################
##
## JVM configuration
##
################################################################
##
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
## JVM options in this file, or set any additional options, you
## should create one or more files in the jvm.options.d
## directory containing your adjustments.
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/jvm-options.html
## for more information.
##
################################################################



################################################################
## IMPORTANT: JVM heap size
################################################################
##
## The heap size is automatically configured by Elasticsearch
## based on the available memory in your system and the roles
## each node is configured to fulfill. If specifying heap is
## required, it should be done through a file in jvm.options.d,
## and the min and max should be set to the same value. For
## example, to set the heap to 4 GB, create a new file in the
## jvm.options.d directory containing these lines:
##EDIT
-Xms512m
-Xmx512m
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/heap-size.html
## for more information
##
################################################################


################################################################
## Expert settings
################################################################
##
## All settings below here are considered expert settings. Do
## not adjust them unless you understand what you are doing. Do
## not edit them in this file; instead, create a new file in the
## jvm.options.d directory containing your adjustments.
##
################################################################

## GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly

## G1GC Configuration
# NOTE: G1 GC is only supported on JDK version 10 or later
# to use G1GC, uncomment the next two lines and update the version on the
# following three lines to your version of the JDK
# 10-13:-XX:-UseConcMarkSweepGC
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
14-:-XX:+UseG1GC

## JVM temporary directory
-Djava.io.tmpdir=${ES_TMPDIR}

## heap dumps

# generate a heap dump when an allocation from the Java heap fails; heap dumps
# are created in the working directory of the JVM unless an alternative path is
# specified
-XX:+HeapDumpOnOutOfMemoryError

# exit right after heap dump on out of memory error. Recommended to also use
# on java 8 for supported versions (8u92+).
9-:-XX:+ExitOnOutOfMemoryError

# specify an alternative path for heap dumps; ensure the directory exists and
# has sufficient space
-XX:HeapDumpPath=data

# specify an alternative path for JVM fatal error logs
-XX:ErrorFile=logs/hs_err_pid%p.log

## JDK 8 GC logging
8:-XX:+PrintGCDetails
8:-XX:+PrintGCDateStamps
8:-XX:+PrintTenuringDistribution
8:-XX:+PrintGCApplicationStoppedTime
8:-Xloggc:logs/gc.log
8:-XX:+UseGCLogFileRotation
8:-XX:NumberOfGCLogFiles=32
8:-XX:GCLogFileSize=64m

# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m

7、創(chuàng)建用戶并賦予權(quán)限,不能再root用戶下啟動
useradd 用戶名
passwd 用戶名 隨后會提示輸入密碼
賦予權(quán)限
cd /opt/software/es
chown -R 用戶名:用戶名 ./ —chown將指定文件的擁有者改為指定的用戶或組,
usermod -g root 用戶 —將當(dāng)前用戶添加至root組
8、elasticsearch 啟動的時候要求當(dāng)前用戶最大線程數(shù)至少為 4096 個線程,修改當(dāng)前用戶最大線程數(shù)
如下所示
顯示 當(dāng)前用戶擁有線程數(shù) ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 3834                  -----此處為當(dāng)前用戶線程數(shù)
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 3834
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

修改線程數(shù)
vim /etc/security/limits.conf
文件末尾加入 如下三行

用戶名 soft nofile 65536
用戶名 hard nofile 65536
用戶名  -  nproc  65535

2、 前臺啟動elasticsearch

cd /opt/software/es/elasticsearch-7.17.3/bin
./elasticsearch                                            --前臺啟動es
http://ip:9200											   --訪問es網(wǎng)址
如下
{
  "name" : "node-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "933ymxObQnKVmo3j6jXp0g",
  "version" : {
    "number" : "7.17.3",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "5ad023604c8d7416c9eb6c0eadb62b14e766caff",
    "build_date" : "2022-04-19T08:11:19.070913226Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
前臺啟動成功

3、 后臺啟動elasticsearch

后臺啟動文章來源地址http://www.zghlxwxcb.cn/news/detail-604677.html

./bin/elasticsearch -d                                    

到了這里,關(guān)于linux centos7安裝部署安裝Elasticsearch并后臺啟動的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • centos7設(shè)置elasticsearch開機(jī)自啟動

    centos7設(shè)置elasticsearch開機(jī)自啟動

    1、編輯elasticsearch.service文件 編寫服務(wù): 2、啟動服務(wù)、設(shè)置開機(jī)自啟動 啟動服務(wù): 如果啟動失敗先嘗試殺死原有的elasticsearch進(jìn)程 設(shè)置開機(jī)自啟動: 查看服務(wù)狀態(tài):

    2024年02月11日
    瀏覽(32)
  • 最新Elasticsearch8.4.3 + Kibana8.4.3在云服務(wù)器Centos7.9安裝部署(參考官方文檔)

    最新Elasticsearch8.4.3 + Kibana8.4.3在云服務(wù)器Centos7.9安裝部署(參考官方文檔)

    ??最近筆者學(xué)習(xí)Elasticsearch,官方最新穩(wěn)定版為 Elasticsearch-8.4.3,想在云服務(wù)器上Centos7.9搭建。搭建之路坑多路少?。ㄖ妇W(wǎng)上的博文教程五花八門,基本都是ES7版本居多,ES8有少數(shù),各種配置參數(shù)一頭霧水,細(xì)節(jié)不多說,照搬了踩坑跌得頭破血流),對小菜的我來說,簡直要

    2024年02月02日
    瀏覽(34)
  • linux centos7系統(tǒng)離線部署mysql-8.0.35免安裝版本

    linux centos7系統(tǒng)離線部署mysql-8.0.35免安裝版本

    在CentOS中默認(rèn)安裝有MariaDB,是MySQL的一個分支,主要由開源社區(qū)維護(hù)。 CentOS 7及以上版本已經(jīng)不再使用MySQL數(shù)據(jù)庫,而是使用MariaDB數(shù)據(jù)庫。 如果直接安裝MySQL,會和MariaDB的文件沖突。 因此,需要先卸載自帶的MariaDB,再安裝MySQL。 查看版本: 卸載 檢查是否卸載干凈: 注意:

    2024年01月18日
    瀏覽(30)
  • Centos7單機(jī)部署ElasticSearch

    Centos7單機(jī)部署ElasticSearch

    Elasticsearch是一種廣泛使用的開源搜索引擎,專門為分布式環(huán)境設(shè)計,但也可以在單機(jī)上運行。它使存儲、搜索和分析大量數(shù)據(jù)變得更加容易和高效。此教程將引導(dǎo)你通過在Centos7上單機(jī)部署Elasticsearch,涵蓋了從系統(tǒng)準(zhǔn)備到服務(wù)啟動的每一個細(xì)節(jié)。 Elasticsearch概覽 Elasticsearch基于

    2024年02月13日
    瀏覽(51)
  • Elasticsearch 8.3集群部署(centos7)實戰(zhàn)

    Elasticsearch 8.3集群部署(centos7)實戰(zhàn)

    【提示】elasticsearch7以上的版本壓縮包內(nèi)自帶JDK 本地安裝 下載elasticsearch 的rpm包,然后 使用 rpm -ivh elasticsearch #這個命令安裝,名字不全# systemctl daemon-reload # 重新加載某個服務(wù)的配置文件,如果新安裝了一個服務(wù),歸屬于 systemctl 管理,要是新服務(wù)的服務(wù)程序配置文件生效,

    2023年04月15日
    瀏覽(28)
  • (Linux)Centos7.*版本安裝配置Java環(huán)境、Tomcat、Nginx并打包部署SSM框架web系統(tǒng)

    (Linux)Centos7.*版本安裝配置Java環(huán)境、Tomcat、Nginx并打包部署SSM框架web系統(tǒng)

    目錄 一、準(zhǔn)備軟件與安裝包 (一)、必須的軟件 1、點擊下載Xshell 2、點擊下載FileZilla (二)、準(zhǔn)備安裝包 1、點擊下載JDK1.8Linux版本 2、點擊下載Nginx 3、點擊下載Tomcat?? 二、關(guān)于FileZilla軟件的使用說明 (一)、FileZilla軟件的打開和說明 (二)、配置服務(wù)器地址去連接服務(wù)器? 三、X

    2023年04月25日
    瀏覽(30)
  • 【centos7安裝ElasticSearch】

    【centos7安裝ElasticSearch】

    最近工作中有用到ES ,當(dāng)然少不了自己裝一個服務(wù)器搗鼓。本文的ElasticSearch 的版本: 7.17.3 點此下載 下載完成后上傳至 Linux 服務(wù)器,本文演示放在: /root/ 下,進(jìn)行解壓: ES比較耗內(nèi)存,建議虛擬機(jī)4G或以上內(nèi)存,jvm1g以上的內(nèi)存分配。運行Elasticsearch,需安裝并配置JDK。 各

    2024年02月08日
    瀏覽(27)
  • centos7.6部署ELK集群(一)之elasticsearch7.7.0集群部署

    centos7.6部署ELK集群(一)之elasticsearch7.7.0集群部署

    32.3. 部署es7.7.0 32.3.1. 下載es(各節(jié)點都做) wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.0-linux-x86_64.tar.gz 32.3.2. 解壓至安裝目錄(各節(jié)點都做) tar -xvf elasticsearch-7.7.0-linux-x86_64.tar.gz -C /vmdata/ 32.3.3. 創(chuàng)建es用戶并設(shè)置密碼(各節(jié)點都做) ES 7.x 開始不再允許以任何方

    2023年04月17日
    瀏覽(22)
  • CentOS系統(tǒng)環(huán)境搭建(十二)——CentOS7安裝Elasticsearch

    CentOS系統(tǒng)環(huán)境搭建(十二)——CentOS7安裝Elasticsearch

    centos系統(tǒng)環(huán)境搭建專欄??點擊跳轉(zhuǎn) ??https://www.elastic.co/downloads/past-releases/elasticsearch-7-17-6 若你是centos64位服務(wù)器,下載LINUX X86_64,下載后上傳到linux服務(wù)器。 上傳至/usr/local/ 進(jìn)入/usr/local/ 執(zhí)行解壓 若你電腦性能強(qiáng)勁,這個應(yīng)該可以不改。 修改為1g內(nèi)存占用。 在當(dāng)前版本,已

    2024年02月12日
    瀏覽(28)
  • 39.Linux系統(tǒng)啟動原理及故障排除(centos7)

    目錄 1.centos7 系統(tǒng)啟動過程 2.登陸系統(tǒng)圖解 3.管理系統(tǒng)服務(wù)? 4.運行級別? 例 1:默認(rèn)系統(tǒng)啟動使用 3 級別字符界面? 例 2:默認(rèn)系統(tǒng)啟動使用 5 級別圖形界面? 例 3: centos7 修改內(nèi)核啟動順序? 1.centos7 系統(tǒng)啟動過程 加載 BIOS/UEFI 信息,進(jìn)行硬件檢測。按照 BIOS 設(shè)定找到第一個

    2023年04月08日
    瀏覽(19)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包