Elasticsearch6.5.4版本集群安装设置密码

ELK - X-Pack设置用户密码 之前记录过怎样使用Nginx代理为Kibana添加登录验证功能,但其实Elastic本身也提供了基本的访问控制功能。 虽然相关功能在X-Pack里,但还是可以免费使用的。 参考官网subscriptions,可以看到在Basic License下的Security项目中包含了Role-based access control。 Enable X-Pack Security Elasticsearc... 阅读详情

1.ES安装配置文件

1.1主节点配置文件

# ======================== Elasticsearch Configuration =========================

# ---------------------------------- Cluster -----------------------------------
cluster.name: GzEsCluster
# ------------------------------------ Node ------------------------------------
node.name: master
node.master: true
node.data: false
node.ingest: true
#node.attr.rack: r1
# ----------------------------------- Paths ------------------------------------
#path.data: /path/to/data
path.data: /home/hadoop/es/data/data/
#path.logs: /path/to/logs
path.logs: /home/hadoop/es/data/logs/
# ----------------------------------- Memory -----------------------------------
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
# ---------------------------------- Network -----------------------------------
network.host: 192.168.206.152
http.port: 9200
transport.tcp.port: 9310
# --------------------------------- Discovery ----------------------------------
#discovery.zen.ping.multicast.enabled: true
discovery.zen.ping.unicast.hosts: [ "192.168.206.152:9310", "192.168.206.152:9310", "192.168.206.152:9310" ]
discovery.zen.minimum_master_nodes: 1 
# ---------------------------------- Gateway -----------------------------------
#gateway.recover_after_nodes: 3
# ---------------------------------- Various -----------------------------------
#action.destructive_requires_name: true

### 20180913 set
cluster.routing.allocation.same_shard.host: true
#index.number_of_replicas: 3
#index.number_of_shards: 27
#临时文件保存目录
#path.work: /es01/work
#插件安装路径
#path.plugins: /es01/plugins

#内存配置
#bootstrap.mlockall: true

# 设置是否压缩tcp传输时的数据,默认为false,不压缩
transport.tcp.compress: true

# 设置插件作为启动条件,如果一下插件没有安装,则该节点服务不会启动 
#plugin.mandatory: mapper-attachments,lang-groovy

####sed 20180929
thread_pool.index.queue_size: 1000
thread_pool.bulk.queue_size: 1000
thread_pool.get.size: 32
thread_pool.write.queue_size: 1000

#### sed 20181022
#thread_pool.index.size: 32
#thread_pool.write.size: 32 
#thread_pool.bulk.size: 32
#indices.memory.index_buffer_size: 30%
#indices.memory.min_index_buffer_size: 5120mb
#http.max_content_length: 200mb

#header访问
http.cors.enabled: true
http.cors.allow-origin: "*"

#添加密码相关
xpack.security.enabled: true 
xpack.ml.enabled: true 
xpack.license.self_generated.type: trial
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type


#index.cache.field.max_size: 10000
#Indices.store.throttle.type: merge
#Index.store.throttl.max_bytes_per_sec: 200mb
#index.translog.durability=async
#index.translog.disable_flush=true

1.2从节点配置文件

# ======================== Elasticsearch Configuration =========================

# ---------------------------------- Cluster -----------------------------------
cluster.name: GzEsCluster
# ------------------------------------ Node ------------------------------------
node.name: node-1
node.master: false
node.data: true
node.ingest: true
#node.attr.rack: r1
# ----------------------------------- Paths ------------------------------------
#path.data: /path/to/data
path.data: /home/hadoop/es/data/data/
#path.logs: /path/to/logs
path.logs: /home/hadoop/es/data/logs/
# ----------------------------------- Memory -----------------------------------
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
# ---------------------------------- Network -----------------------------------
network.host: 192.168.206.153
http.port: 9200
transport.tcp.port: 9310
# --------------------------------- Discovery ----------------------------------
#discovery.zen.ping.multicast.enabled: true
discovery.zen.ping.unicast.hosts: [ "192.168.206.152:9310", "192.168.206.152:9310", "192.168.206.152:9310" ]
discovery.zen.minimum_master_nodes: 1
# ---------------------------------- Gateway -----------------------------------
#gateway.recover_after_nodes: 3
# ---------------------------------- Various -----------------------------------
#action.destructive_requires_name: true

### 20180913 set
cluster.routing.allocation.same_shard.host: true
#index.number_of_replicas: 3
#index.number_of_shards: 27
#临时文件保存目录
#path.work: /es01/work
#插件安装路径
#path.plugins: /es01/plugins

#内存配置
#bootstrap.mlockall: true

# 设置是否压缩tcp传输时的数据,默认为false,不压缩
transport.tcp.compress: true

# 设置插件作为启动条件,如果一下插件没有安装,则该节点服务不会启动 
#plugin.mandatory: mapper-attachments,lang-groovy

####sed 20180929
#thread_pool.index.queue_size: 1000
#thread_pool.bulk.queue_size: 1000
#thread_pool.get.size: 32
#thread_pool.write.queue_size: 1000

#### sed 20181022
#thread_pool.index.size: 40
#thread_pool.write.size: 40 
#thread_pool.bulk.size: 40
#indices.memory.index_buffer_size: 30%
#indices.memory.min_index_buffer_size: 5120mb
#http.max_content_length: 200mb
##index.cache.field.max_size: 10000
##Indices.store.throttle.type: merge
#Index.store.throttl.max_bytes_per_sec: 200mb
#index.translog.durability=async
#index.translog.disable_flush=true

#es加密相关
xpack.security.enabled: true
xpack.ml.enabled: true
xpack.license.self_generated.type: trial
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

1.3启动脚本

[hadoop@host153 elasticsearch-6.5.4]$ cat start.sh 
nohup ./bin/elasticsearch > elasticsearch.log 2>&1 &
tail -f elasticsearch.log

2.安装常见报错

2.1进程文件数限制

[2021-02-02T21:37:13,463][INFO ][o.e.b.BootstrapChecks    ] [master] bound or publishing to a non-loopback address, enforcing bootstrap checks

ERROR: [2] bootstrap checks failed

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

[2021-02-02T21:37:13,498][INFO ][o.e.n.Node               ] [master] stopping ...

[2021-02-02T21:37:13,591][INFO ][o.e.n.Node               ] [master] stopped

[2021-02-02T21:37:13,591][INFO ][o.e.n.Node               ] [master] closing ...

[2021-02-02T21:37:13,612][INFO ][o.e.n.Node               ] [master] closed

每个进程最大同时打开文件数太小,可通过下面2个命令查看当前数量

[hadoop@host152 elasticsearch-6.5.4]$ ulimit -Hn

4096

[hadoop@host152 elasticsearch-6.5.4]$ ulimit -Sn

1024

修改 /etc/security/limits.conf文件,增加配置

*               soft    nofile          65536

*               hard    nofile          65536

2.2用户进程数限制

max number of threads [3818] for user [hadoop] is too low, increase to at least [4096]

查看用户进程数

[hadoop@host152 elasticsearch-6.5.4]$ ulimit -Hu

1024

[hadoop@host152 elasticsearch-6.5.4]$ ulimit -Su

1024

修改/etc/security/limits.conf,增加配置

*               soft    nproc           4096

*               hard    nproc           4096

2.3虚拟内存区域数量限制

[2021-02-02T21:59:15,424][INFO ][o.e.b.BootstrapChecks    ] [master] bound or publishing to a non-loopback address, enforcing bootstrap checks

ERROR: [1] bootstrap checks failed

[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

[2021-02-02T21:59:15,437][INFO ][o.e.n.Node               ] [master] stopping ...

[2021-02-02T21:59:15,477][INFO ][o.e.n.Node               ] [master] stopped

[2021-02-02T21:59:15,477][INFO ][o.e.n.Node               ] [master] closing ...

[2021-02-02T21:59:15,493][INFO ][o.e.n.Node               ] [master] closed

修改/etc/sysctl.conf文件,增加系统配置

vm.max_map_count=262144

生效系统参数

[root@host152 ~]# sysctl -p

vm.max_map_count = 262144

2.4关闭防火墙No route to host

启动节点报错

[2021-02-03T00:07:37,053][INFO ][o.e.d.z.ZenDiscovery     ] [hode-2] failed to send join request to master [{master}{1u6DUu14SwmPsTIWLOsoHQ}{jcAfT7QATMK5N8WTOAeGKg}{192.168.206.152}{192.168.206.152:9310}{ml.machine_memory=1912107008, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}], reason [RemoteTransportException[[master][192.168.206.152:9310][internal:discovery/zen/join]]; nested: ConnectTransportException[[hode-2][192.168.206.154:9310] connect_exception]; nested: IOException[No route to host: 192.168.206.154/192.168.206.154:9310]; nested: IOException[No route to host]; ]

禁止开机启动,永久关闭防火墙

[root@host154 ~]# sudo systemctl disable firewalld.service

[root@host154 ~]# sudo systemctl stop firewalld.service

2.5访问集群信息地址

http://192.168.206.152:9200/

3.安装header

3.1安装head需要node支持

[root@host152 ~]# curl -sL https://rpm.nodesource.com/setup_8.x | bash -

[root@host152 ~]# yum install -y nodejs

查看安装node和rpm

[root@host152 ~]# node -v

v8.17.0

[root@host152 ~]# npm -v

6.13.4

3.2安装grunt

由于head 插件的执行文件是有grunt 命令来执行的,所以这个命令必须安装,切换到head目录下,npm install需要package.json

[root@host152 ~]# npm install

若长时间卡死

[ .................] / fetchMetadata: sill pacote version manifest for engine.io-parser@1.2.4 fetched in 53249ms

可以修改yum源为淘宝源再重新安装

[root@host152 elasticsearch-head-master]# npm config set registry https://registry.npm.taobao.org

[root@host152 elasticsearch-head-master]# npm config get registry

https://registry.npm.taobao.org/

3.3修改Gruntfile.js,增加hostname:'*'属性

 

3.4修改app.js

 

3.5启动header访问

[hadoop@host152 elasticsearch-6.5.4]$grunt server &

访问header

http://192.168.206.152:9100/

4.安装kibana

4.1解压修改配置文件kibana.yml

4.2启动kibana

[hadoop@host152 kibana-6.5.4-linux-x86_64]$ ./bin/kibana &

访问地址

http://192.168.206.152:5601/

5.ES集群设置密码

5.1访问es的_xpack的安全项security

地址:

http://192.168.206.152:9200/_xpack

返回:

{

"build": {

"hash": "d2ef93d",

"date": "2018-12-17T21:20:45.656445Z"

},

"license": {

"uid": "92423e2b-551b-4b2f-b916-43d9dca4f124",

"type": "basic",

"mode": "basic",

"status": "active"

},

"features": {

"graph": {

"description": "Graph Data Exploration for the Elastic Stack",

"available": false,

"enabled": true

},

"logstash": {

"description": "Logstash management component for X-Pack",

"available": false,

"enabled": true

},

"ml": {

"description": "Machine Learning for the Elastic Stack",

"available": false,

"enabled": true,

"native_code_info": {

"version": "6.5.4",

"build_hash": "b616085ef32393"

}

},

"monitoring": {

"description": "Monitoring for the Elastic Stack",

"available": true,

"enabled": true

},

"rollup": {

"description": "Time series pre-aggregation and rollup",

"available": true,

"enabled": true

},

"security": {

"description": "Security for the Elastic Stack",

"available": false,

"enabled": true

},

"watcher": {

"description": "Alerting, Notification and Automation for the Elastic Stack",

"available": false,

"enabled": true

}

},

"tagline": "You know, for X"

}

5.2修改es的elasticsearch.yml配置文件

xpack.security.enabled: true 

xpack.ml.enabled: true 

xpack.license.self_generated.type: trial

http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

5.3任意主节点执行设置密码命令

[hadoop@host154 elasticsearch-6.5.4]$ ./bin/elasticsearch-setup-passwords interactive

报错如下:

Unexpected response code [403] from calling GET http://192.168.206.152:9200/_xpack/security/_authenticate?pretty

It doesn't look like the X-Pack security feature is available on this Elasticsearch node.

Please check if you have installed a license that allows access to X-Pack Security feature.

 

ERROR: X-Pack Security is not available

原因:

       在es6.x中使用安全功能,需要在kibana中升级license。购买一个icense或申请一个30天的试用,在 Kibana 中访问 Management -> Elasticsearch -> License Management。选择试用。7.x版本中,es的安全核心功能免费使用。es7.x版本以默认安装好x-pack,修改配置激活即可。

       从ES6.8&ES7.0开始,Security纳入x-pack的Basic版本中,免费使用一些基本的功能,X-Pack中的认证服务称为 Realms, Realms 有两种类型:

内置 Realms(免费)

File/Native 用户名密码保存在 ElasticSearch

外置 Realms (收费)

连接 LDAP / Active Directroy / PKI / SAML / Kerberos 进行统一认证

5.4使用kibana获取license

访问地址

http://192.168.206.152:5601/

在 Kibana 中访问 Management -> Elasticsearch -> License Management,点击右侧的升级 License 按钮,可以免费试用 30 天的高级 License。

升级完成之后kibana页面会显示如下:

 

5.5获取license后重新设置密码

[hadoop@host152 elasticsearch-6.5.4]$ ./bin/elasticsearch-setup-passwords interactive

Unexpected response code [500] from calling GET http://192.168.206.152:9200/_xpack/security/_authenticate?pretty

It doesn't look like the X-Pack security feature is enabled on this Elasticsearch node.

Please check if you have enabled X-Pack security in your elasticsearch.yml configuration file.

ERROR: X-Pack Security is disabled by configuration.

原因:修改配置文件必须重启生效,重启es,再设置密码

[hadoop@host152 elasticsearch-6.5.4]$ ./bin/elasticsearch-setup-passwords interactive

Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.

You will be prompted to enter passwords as the process progresses.

Please confirm that you would like to continue [y/N]y

6.设置密码后的访问

6.1集群信息访问

http://192.168.206.152:9200/

6.2header访问

6.3kibana访问

修改配置文件 kibana.yml,设置用户名密码

elasticsearch.username: "elastic"

elasticsearch.password: "123456"

重启kibana

[hadoop@host152 kibana-6.5.4-linux-x86_64]$ netstat -apn|grep 5601

(Not all processes could be identified, non-owned process info

 will not be shown, you would have to be root to see it all.)

tcp        0      0 192.168.206.152:5601    0.0.0.0:*               LISTEN      5900/./bin/../node/

[hadoop@host152 kibana-6.5.4-linux-x86_64]$ kill -9 5900

[hadoop@host152 kibana-6.5.4-linux-x86_64]$ ./bin/kibana &

启动完成后访问

http://192.168.206.152:5601/

Ok,全剧终!!!

 

 

Elasticsearch-5.6版本安装,添加登录验证,修改密码 本文详细介绍了elasticsearch6.3以下版本的安装,用户授权登录配置以及修改密码操作。 阅读详情

相关推荐

SearchGuard控制ElasticSearch集群访问权限——ElasticSearch-6.5.4

众所周知,ElasticSearch设计之初就定位在纯私网环境而不做权限和安全控制呢。ElasticSearch如果设置不当,则存在较为严重的安全风险!有两种访问ElasticSearch的方式:使用默认端口为9300的TCP模式和使用默认端口为9200的HTTP模式。然而在同ElasticSearch服务器进行通信的过程中,通信流量是明文形式的,没有加密;更为严重的是,如果不做任何防护措施地将ElasticSearch暴露在公网上,那么对它的访问将没有任何安全认证,任何连接到服务器端口上的人,都可以调用相

Jinghua_Guo的博客 1907

Elasticsearch 配置用户名和密码

启动 Elasticsearch 程序 [elastic@console bin]$ ./elasticsearch -d future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_181/jre] does not meet this requirem...

weixin_43315211的博客 6万+

ElasticSearch5.6.3的安装部署以及集群部署、ElasticSearch-head的安装

一、ElasticSearch5.6.3下载安装步骤 说明:ElasticSearch的运行不能用root执行,自己用useradd命令新建一个用户如下所示:sueradd chen passwd chen 然后根据提示输入密码即可下载地址:https://www.elastic.co/downloads/elasticsearch 下载最新的安装包并解压、然后执行、命令如下:wget http

chen 1万+

Elasticsearch7.7设置账号密码时的逻辑矛盾问题

网上找了一些资料,包括google,但也都没有解决:比如 https://stackoverflow.com/questions/61884976/apply-security-on-elk-cluster-authentication-issue 这里说把所有的节点都加上上面的X-pack配置重启,然后使用auto进行密码设置。你去看看你们公司的REDIS服务器,看看有多少设置了密码,至少我公司不相关的部门的业务,他们的REDIS我都能远程登录(因对接关系我知道了redis服务器IP)。

专注基础架构领域 4011

Elasticsearch7.10.0添加访问密码

1. 添加配置 elasticsearch.yml 配置 xpack.security.enabled: true xpack.license.self_generated.type: basic xpack.security.transport.ssl.enabled: true /usr/local/elasticsearch-7.10.0/bin/elasticsearch-setup-passwords interactive 设置密码 一路y 重启elasticsear...

冰恋云的专栏 3404

Elasticsearch设置密码报错:ERROR: X-Pack Security is disabled by configuration.

X-Pack 安全功能在你的 Elasticsearch 配置中被禁用了。你需要在 elasticsearch.yml 文件中启用 X-Pack 安全功能,然后重启 Elasticsearch 以使更改生效。打开 elasticsearch.yml 文件,通常位于 Elasticsearch 安装目录的 config 文件夹中。保存并关闭 elasticsearch.yml 文件。然后重启Elasticsearch。

猿小白的博客 1563

SearchGuard配置

elk安全插件searchguard安装 在es下安装 (es版本6.5.4) 下载插件 <ES directory>/bin/elasticsearch-plugin install -b com.floragunn:search-guard-6:<guard version> 进入到searchguard安装目录 cd <ES directory>/...

cjx__的博客 549

STM32F1的USB接口-自定义HID

设置USB VID:1155 PID :22352。

chilian12321的博客 841

【Docker系列】在 Docker 中部署 Elasticsearch

在 docker 中部署 Elasticsearch

weixin_54707168的博客 1012

【科技前沿】用深度强化学习优化电网,让电力调度更聪明!

Hey小伙伴们,今天我要跟大家分享一个超级酷炫的技术应用——深度强化学习在电网优化中的典型案例!如果你对机器学习感兴趣,或是正寻找如何用AI技术解决实际问题的方法,这篇分享绝对不容错过!👩‍💻✨

Jacklx888的博客 3257

修复ASUS in WinRE教程

暑假入手了天选三,发现是win11家庭版,本来想着家庭版将就一下无所谓,结果在使用的过程中发现相较于专业版真的是不能比,于是自己就重装了系统,发现ASUS in WinRE入口不见了,折腾半天最后成功修复。

weixin_46202629的博客 1万+

Elasticsearch-6.7.0系列(六)ES设置集群密码

转载来源 :Elasticsearch-6.7.0系列(六)ES设置集群密码 https://www.cnblogs.com/zhuwenjoyce/p/10991024.html 前提准备 安装kibana-6.7.0: 《Elasticsearch-6.7.0系列(三)5601端口 kibana——ES的UI界面》 升级前ES的license 升级之前访问:http://192.168.10....

qq_40907977的博客 4540

VirtualBox增强功能安装全指南:从下载到配置复制粘贴功能

本文详细介绍了VirtualBox增强功能的完整安装与配置流程,重点解决了虚拟机与主机间复制粘贴、文件拖放等核心协作难题。通过分步指南和故障排查,帮助用户在不同操作系统(如Windows、Linux)中实现无缝集成,提升虚拟化工作效率与体验。

weixin_29206669的博客 429

Elasticsearch开启认证|为ES设置账号密码|ES账号密码设置|ES单机开启认证|ES集群开启认证

ES安装完成并运行,默认情况下是允许任何用户访问的,这样并不安全,可以为ES开启认证,设置账号密码。下面介绍ES单节点开启认证以及ES集群开启认证的操作过程。注意:Elasticsearch 8.11.4 不需要手动开启认证,安装时候会自动引导开启,下面介绍的是 Elasticsearch 7.17.3版本开启认证

浣花御劍 1万+

【定位模块项目实战】正态分布变换(NDT)定位及建图(依赖高精度点云地图和三维激光雷达的定位方案)

系列文章目录 提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加 TODO:写完再整理 文章目录系列文章目录前言一、正态分布变换(NDT)定位解决的主要问题二、正态分布变换(NDT)定位的核心思想三、NDT算法流程1.多元正态分布概念2.网格化并计算正态分布参数3.变换参数和最大似然四、使用C++实现NDT配准参考资料 前言 认知有限,望大家多多包涵,有什么问题也希望能够与大家多交流,共同成长! 本文先对依赖高精度地图和激光雷达的定位技术–正态分布变换(NDT)定位做个简单的介绍,具体

qq_35635374的博客 4413

电子硬件仿真:设计一个频率范围为10k—50k的带通滤波器

带通滤波器是一种常用的滤波器类型,具有选择特定频率范围内信号的能力,并在该范围内提供一定的增益。它允许通过一定范围内的频率信号,并在该范围内提供一定的增益,同时在该范围之外的频率上提供较高的衰减。这意味着在通带内(10kHz至50kHz),滤波器的增益应为10dB,而在每个十倍频的频率点上,滤波器的增益应降低40dB。设计滤波器:使用滤波器设计工具(如MATLAB、Python的scipy库、Tina软件等),根据选定的滤波器类型(例如巴特沃斯滤波器),中心频率和通带宽度,设计一个4阶带通滤波器。

走向CTO的路上... 586

es集群搭建与集群密码设置

es集群搭建与集群密码设置

weixin_55018839的博客 1618

基于SpringBoot+SpringCloud+Vue前后端分离项目实战 --开篇

如何高效学习Java? 毕业设计项目应该怎么做?入门实战项目应该怎么做? 做Java开发都应该学习哪些框架技术? 我想来跟你聊聊为什么要学习此专栏?我们经常说,看一个事儿千万不要直接陷入细节里,你应该先鸟瞰其全貌,这样能够帮助你从高维度理解问题。同样,当你迷茫想努力没有方向时,最事半功倍的方法是:找人带你! 因为过来人,更懂得如何学、如何做、如何少走弯路! 那今天就给大家带来一门专栏课程,由 天罡gg 和 经海路大白狗 两位实力大牛合力打造的一款专栏,可以让你从0到1快速拥有企业级规范的项目实战经验!

天罡gg的专栏 2万+

ElasticSearch8集群的安装部署

ElasticSearch8集群的搭建与简单使用

weixin_44418421的博客 1万+

harbor x509: certificate signed by unknown authority【20251222】

本教程通过「合并证书链(服务器端)+ 预置根 CA(客户端)」彻底解决了自签名证书的 x509 错误,同时集成了 Trivy 漏洞扫描,实现了 Harbor 从搭建到实用的全流程。证书链合并是服务器端的关键,确保客户端获取完整信任路径;客户端需同时配置「系统信任库 + Docker 信任目录」,避免 Docker 独立信任机制导致的问题;所有 IP 需保持一致(Harbor 配置、证书绑定、客户端访问),是避免错误的基础。

老韩的Linux云计算架构师进阶之路 687

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

Linux环境快速搭建elasticsearch6.5.4集群和Head插件

今天来一起实战Linux环境下搭建elasticsearch6.5.4集群和Head插件; 环境信息 操作系统:Ubuntu 16.04.5 LTS JDK:1.8.0_191 elasticsearch:6.5.4 nodejs:v10.15.0 本次实战准备了两台机器,它们的基本情况如下所示: IP地址 hostname 备注 192.168.119.152 node-0 节点...

程序员欣宸的博客 6676

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

一、Elasticsearch基础概念及ES8集群安装

简记Elasticsearch基础概念及ES8集群构建

工作随记 866

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

ElasticSearch之ES8新特性及集群安装

ElasticSearch之ES8新特性及集群安装

scorpio的博客 1万+

4、docker中设置elasticsearch、kibana用户名密码、修改密码

这里写目录标题前言一、elasticsearch设置密码二、kibana配置elasticsearch密码三、elasticsearch-head配置密码 前言 之前在docker中安装过elasticsearch和elasticsearchhead以及kibana都没有配置密码,在此记录下设置过程。 一、elasticsearch设置密码 参考 官方 二、kibana配置elasticsearch密码 三、elasticsearch-head配置密码 ...

_紫陌纤尘的博客 1万+

elasticSearch5.6.4添加SSL认证searchGuard5

注:本教程elasticsearch安装采用解压版,安装路径为/usr/local/elasticsearch-5.6.4 参考blog:https://blog.csdn.net/m0_37895851/article/details/81205277 1、离线安装plugins:searchGuard5 查找下载对应版本离线安装包:https://mvnrepository.com/artif...

BigBear的专栏 2813
上一篇: elasticsearch-hive外部表插入数据到elasticsearch
下一篇: elasticsearch安装
SimpleSimpleSimples
博客等级 码龄10年 6452粉丝 115原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址