3.安装以及配置文件修改 3.1 elasticsearch安装与配置 tar -zxvf lasticsearch-7.13.2-linux-x86_64.tar.gz -C /opt/elk(/opt/elk是我的安装目录,可自行更改)
解压完之后进入/config,编辑elasticsearch.yml
# ---------------------------------- Network ----------------------------------- # # By default Elasticsearch is only accessible on localhost. Set a different # address here to expose this node on the network: # #network.host: 192.168.0.1 # # By default Elasticsearch listens for HTTP traffic on the first free port it # finds starting at 9200. Set a specific HTTP port here: # #http.port: 9200 # # For more information, consult the network module documentation. #
另外,elasticsearch默认是不让root用户启动的,所以我们需要新建一个用户来专门启动elasticsearch,我这里举例创建一个es用户: 创建es用户组:groupadd es 在es用户组下创建es用户:useradd es -g es -p elasticsearch 切换到elk目录:cd /opt/elk 赋予es用户elasticsearch权限:chown -R es:es elasticsearch-7.13.2 chown es asticsearch-7.13.2 -R
# Kibana is served by a back end server. This setting specifies the port to use. #server.port: 5601 # Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. # The default is 'localhost', which usually means remote machines will not be able to connect. # To allow connections from remote users, set this parameter to a non-loopback address. server.host: "0.0.0.0" # Specifies locale to be used for all localizable strings, dates and number formats. # Supported languages are the following: English - en , by default , Chinese - zh-CN . i18n.locale: "zh-CN"