3 创建一个用户
groupadd es# 创建一个组useradd es -g es # 用户属于es组passwd es# 密码# R(递归)分配目录下所有文件/目录的拥有者chown -R es:es /opt/elastic/elasticsearch-7.8.1# 授权存储数据权限chmod -R 777 /opt/elastic/es
文章插图
4 再次启动es
/opt/elastic/elasticsearch-7.8.1/bin/elasticsearch
文章插图
[1] 说你的系统太low了 , 给爷增加点增加虚拟内存 , 至少262144
vim /etc/sysctl.confvm.max_map_count=655360# 使设置的虚拟内存生效[root@ecs-65685 config]# sysctl -pvm.swappiness = 0net.core.somaxconn = 1024net.ipv4.tcp_max_tw_buckets = 5000net.ipv4.tcp_max_syn_backlog = 1024vm.max_map_count = 655360
文章插图
[2] 解决:在elasticsearch的config目录下 , 修改 elasticsearch.yml配置文件
# 取消注释 , 并保留一个节点# skipping cluster bootstrapping as local node does not match bootstrap requirements: [node-1]cluster.initial_master_nodes: ["node-1"]
文章插图
5 再次启动es
/opt/elastic/elasticsearch-7.8.1/bin/elasticsearch/opt/elastic/elasticsearch-7.8.1/bin/elasticsearch -d
6 访问curl 192.168.0.98:9200
公网地址:114.116...:9200
文章插图
注意:放行9200
五、Kibana安装1 下载
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.8.1-linux-x86_64.tar.gz
2 解压tar -zxvf /opt/software/elastic/kibana-7.8.1-linux-x86_64.tar.gz -C /opt/elastic/
3 配置 kibana.yml
vim /opt/elastic/kibana-7.8.1-linux-x86_64/config/kibana.yml# 端口server.port: 5601# 开放外网访问server.host: "0.0.0.0"# es的服务器elasticsearch.hosts: ["http://192.168.0...:9200"]
文章插图
4 启动
查看代码
# 如果是要用root用户启动 就在后面加 --allow-root , 要么就切换用户执行[root@ecs-65685 bin]# /opt/elastic/kibana-7.8.1-linux-x86_64/bin/kibanaKibana should not be run as root.Use --allow-root to continue.[root@ecs-65685 bin]# /opt/elastic/kibana-7.8.1-linux-x86_64/bin/kibana --allow-rootlog[17:31:37.776] [warning][plugins-discovery] Expect plugin "id" in camelCase, but found: apm_osslog[17:31:37.787] [warning][plugins-discovery] Expect plugin "id" in camelCase, but found: triggers_actions_uilog[17:32:03.147] [info][plugins-service] Plugin "visTypeXy" is disabled.log[17:32:03.148] [info][plugins-service] Plugin "endpoint" is disabled.log[17:32:03.148] [info][plugins-service] Plugin "ingestManager" is disabled.log[17:32:03.149] [info][plugins-service] Plugin "lists" is disabled.log[17:32:05.837] [warning][config][deprecation] Config key [monitoring.cluster_alerts.email_notifications.email_address] will be required for email notifications to work in 8.0."log[17:32:05.904] [info][plugins-system] Setting up [94] plugins: [taskManager,licensing,observability,eventLog,encryptedSavedObjects,code,usageCollection,ossTelemetry,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaLegacy,devTools,translations,uiActions,statusPage,share,newsfeed,mapsLegacy,mapsLegacyLicensing,kibanaUtils,kibanaReact,inspector,embeddable,advancedUiActions,embeddableEnhanced,drilldowns,indexPatternManagement,esUiShared,discover,charts,bfetch,expressions,data,home,cloud,console,consoleExtensions,apm_oss,searchprofiler,painlessLab,grokdebugger,management,upgradeAssistant,reporting,licenseManagement,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,watcher,advancedSettings,telemetryManagementSection,fileUpload,dataEnhanced,visualizations,visTypeVislib,visTypeVega,visTypeTimeseries,rollup,visTypeTimelion,features,security,snapshotRestore,transform,ingestPipelines,canvas,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeMarkdown,inputControlVis,savedObjects,navigation,lens,graph,maps,visualize,dashboard,dashboardEnhanced,savedObjectsManagement,spaces,actions,case,alerting,alertingBuiltins,triggers_actions_ui,infra,monitoring,logstash,uptime,ml,siem,apm]log[17:32:05.914] [warning][config][encryptedSavedObjects][plugins] Generating a random key for xpack.encryptedSavedObjects.encryptionKey. To be able to decrypt encrypted saved objects attributes after restart, please set xpack.encryptedSavedObjects.encryptionKey in kibana.ymllog[17:32:06.058] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.ymllog[17:32:06.059] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.log[17:32:06.109] [warning][actions][actions][plugins] APIs are disabled due to the Encrypted Saved Objects plugin using an ephemeral encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml.log[17:32:06.122] [warning][alerting][alerting][plugins][plugins] APIs are disabled due to the Encrypted Saved Objects plugin using an ephemeral encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml.log[17:32:06.149] [info][monitoring][monitoring][plugins] config sourced from: production clusterlog[17:32:06.150] [warning][monitoring][monitoring][plugins] X-Pack Monitoring Cluster Alerts will not be available: undefinedlog[17:32:06.188] [info][crossClusterReplication][plugins] Your basic license does not support crossClusterReplication. Please upgrade your license.log[17:32:06.189] [info][plugins][watcher] Your basic license does not support watcher. Please upgrade your license.log[17:32:06.196] [info][kibana-monitoring][monitoring][monitoring][plugins] Starting monitoring stats collectionlog[17:32:06.393] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...log[17:32:06.412] [info][savedobjects-service] Starting saved objects migrationslog[17:32:06.447] [info][savedobjects-service] Creating index .kibana_task_manager_1.log[17:32:06.450] [info][savedobjects-service] Creating index .kibana_1.log[17:32:06.899] [info][savedobjects-service] Pointing alias .kibana_task_manager to .kibana_task_manager_1.log[17:32:06.947] [info][savedobjects-service] Pointing alias .kibana to .kibana_1.log[17:32:06.999] [info][savedobjects-service] Finished in 552ms.log[17:32:07.022] [info][savedobjects-service] Finished in 577ms.log[17:32:07.025] [info][plugins-system] Starting [72] plugins: [taskManager,licensing,observability,eventLog,encryptedSavedObjects,code,usageCollection,ossTelemetry,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaLegacy,translations,share,discover,bfetch,expressions,data,home,cloud,console,consoleExtensions,apm_oss,searchprofiler,painlessLab,grokdebugger,management,upgradeAssistant,reporting,licenseManagement,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,watcher,advancedSettings,fileUpload,dataEnhanced,visualizations,visTypeVislib,visTypeVega,visTypeTimeseries,rollup,visTypeTimelion,features,security,snapshotRestore,transform,ingestPipelines,canvas,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeMarkdown,inputControlVis,lens,graph,visualize,dashboard,savedObjectsManagement,spaces,actions,case,alerting,alertingBuiltins,infra,monitoring,logstash,uptime,ml,siem,apm]log[17:32:09.117] [info][status][plugin:kibana@7.8.1] Status changed from uninitialized to green - Readylog[17:32:09.121] [info][status][plugin:elasticsearch@7.8.1] Status changed from uninitialized to yellow - Waiting for Elasticsearchlog[17:32:09.121] [info][status][plugin:elasticsearch@7.8.1] Status changed from yellow to green - Readylog[17:32:09.123] [info][status][plugin:xpack_main@7.8.1] Status changed from uninitialized to green - Readylog[17:32:09.133] [info][status][plugin:monitoring@7.8.1] Status changed from uninitialized to green - Readylog[17:32:09.136] [warning][plugins][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in kibana.ymllog[17:32:09.138] [warning][plugins][reporting] Chromium sandbox provides an additional layer of protection, but is not supported for Linux Centos 7.9.2009 OS. Automatically setting 'xpack.reporting.capture.browser.chromium.disableSandbox: true'.log[17:32:09.139] [warning][reporting] Enabling the Chromium sandbox provides an additional layer of protection.log[17:32:10.356] [info][status][plugin:reporting@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.383] [info][status][plugin:spaces@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.385] [info][status][plugin:security@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.391] [info][status][plugin:dashboard_mode@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.393] [info][status][plugin:beats_management@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.438] [info][status][plugin:maps@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.446] [info][plugins][taskManager][taskManager] TaskManager is identified by the Kibana UUID: 66a6ab9a-0339-47c1-9fa8-ef059a59152elog[17:32:10.449] [info][status][plugin:task_manager@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.451] [info][status][plugin:encryptedSavedObjects@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.454] [info][status][plugin:apm_oss@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.456] [info][status][plugin:console_legacy@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.459] [info][status][plugin:region_map@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.464] [info][status][plugin:ui_metric@7.8.1] Status changed from uninitialized to green - Readylog[17:32:10.470] [info][listening] Server running at http://192.168.0...:5601log[17:32:10.901] [info][server][Kibana][http] http server running at http://192.168.0...:5601
经验总结扩展阅读
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2023年10月16日安装房门行吗 2023年10月16日是安装房门吉日吗
- 2023年10月16日安装柱子行吗 2023年10月16日是安装柱子的黄道吉日吗
- Docker | 数据持久化与数据共享
- 2023年农历九月初二安装门户吉日 2023年农历九月初二宜安装门户吗
- 2023年10月16日是安装门框的黄道吉日吗 2023年10月16日是安装门框吉日吗
- 2023年10月16日安装家电好不好 2023年10月16日安装家电吉日一览表
- 2023年10月16日安装窗帘吉日一览表 2023年10月16日安装窗帘黄道吉日
- 2023年10月16日安装机器行吗 2023年10月16日是安装机器吉日吗
- 出租屋顶安装光伏发电对房屋有害吗
- 2023年10月17日安装房门吉日一览表 2023年10月17日安装房门行吗