标签:开始 style Requires uid guid setup tin 环境 acl
oracle java11.rpm es7.2.rpm kibana.rpm 下载个: https://github.com/lmenezes/cerebro 后面配置要简单的多 chrome 下载个 header插件,
echo " " >> /etc/security/limits.conf echo "#elasticsearch bootstrap lock" >> /etc/security/limits.conf echo "elasticsearch soft memlock unlimited" >> /etc/security/limits.conf echo "elasticsearch hard memlock unlimited" >> /etc/security/limits.conf echo "#下面这个可以替代下面2个" >> /etc/security/limits.conf echo "elasticsearch - memlock unlimited" >> /etc/security/limits.conf echo "#elasticsearch limit file" >> /etc/security/limits.conf echo "* soft nofile 65536" >> /etc/security/limits.conf echo "* hard nofile 65536" >> /etc/security/limits.conf
echo "#elasticsearch counts" >> /etc/sysctl.conf echo "vm.max_map_count = 262144" >> /etc/sysctl.conf
cd /etc/security/limits.d
ls
echo "#elasticsearch thread limit" echo "elasticsearch - nproc 2048" >> /etc/security/limits.d/20-nproc.conf #生效
sysctl -p
[Service]
LimitMEMLOCK=infinity
sudo systemctl daemon-reload
mkdir /opt/hdisk/es72/data mkdir /opt/hdisk/es72/logs chown -R elasticsearch:elasticsearch /opt/hdisk/es72
rpm -ivh java11.rpm
cd /usr/java .
ll -s
一般default 会已经指向你新安装的java11了
vi /etc/profile ##最后追加环境 export JAVA_HOME=/usr/java/default export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib export PATH=:$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
rpm -ivh es72.rpm ##自动启动 sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service
rpm -ivh kibana.rpm ##自动启动 sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable kibana.service
vi /etc/elasticsearch/elasticsearch.conf # # ---------------------------------- Cluster ----------------------------------- # cluster.name: es72clt # # ------------------------------------ Node ------------------------------------ # node.name: node237 #主节点, node.master: true #主节点,就不要存数据了 node.data: false #node.attr.rack: r1 # # ----------------------------------- Paths ------------------------------------ # path.data: /opt/hdisk/es72/data path.logs: /opt/hdisk/es72/logs # # ----------------------------------- Memory ----------------------------------- # bootstrap.memory_lock: true # # # ---------------------------------- Network ----------------------------------- # network.host: 0.0.0.0 #http.port: 9200 # # --------------------------------- Discovery ---------------------------------- # # The default list of hosts is ["127.0.0.1", "[::1]"] # #主节点才有这行 cluster.initial_master_nodes: ["192.168.1.237:9300"] #7.2,是数据节点自己去主节点上注册,和以前不一样 discovery.seed_hosts: ["192.168.1.237:9300"] # # # ---------------------------------- Gateway ----------------------------------- # # #gateway.recover_after_nodes: 3 # # # ---------------------------------- Various ----------------------------------- # #action.destructive_requires_name: true # ---------------------------------- xpack ----------------------------------- # xpack.security.enabled: true xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.keystore.path: elastic-certificates.p12 xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
# # ---------------------------------- Cluster ----------------------------------- # cluster.name: es72clt # # ------------------------------------ Node ------------------------------------ # node.name: node238 #主节点, node.master: false #主节点,就不要存数据了 node.data: true #node.attr.rack: r1 # # ----------------------------------- Paths ------------------------------------ # path.data: /opt/hdisk/es72/data path.logs: /opt/hdisk/es72/logs # # ----------------------------------- Memory ----------------------------------- # bootstrap.memory_lock: true # # # ---------------------------------- Network ----------------------------------- # network.host: 0.0.0.0 #http.port: 9200 # # --------------------------------- Discovery ---------------------------------- # # The default list of hosts is ["127.0.0.1", "[::1]"] # #主节点才有这行 #cluster.initial_master_nodes: ["192.168.1.237:9300"] #7.2,是数据节点自己去主节点上注册,和以前不一样 discovery.seed_hosts: ["192.168.1.237:9300"] # # # ---------------------------------- Gateway ----------------------------------- # # #gateway.recover_after_nodes: 3 # # # ---------------------------------- Various ----------------------------------- # #action.destructive_requires_name: true # ---------------------------------- xpack ----------------------------------- # xpack.security.enabled: true xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.keystore.path: elastic-certificates.p12 xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
###找到master (node237) ####执行 /usr/share/elasticsearch/bin/elasticsearch-certutil -out /etc/elasticsearch/elastic-certificates.p12 -pass "" ####拷贝认证到其他机器上 scp 192.168.1.237:/etc/elasticsearch/elastic-certificates.p12 /etc/elasticsearch/ ####所有机器上改权限 chown -R /etc/elasticsearch/elastic-certificates.p12
vi /etc/elasticsearch/jvm.opitons ##设置成为机器内存的一半,这个我一般怎么干,es7的版本不知道了 -Xms16g -Xmx16g
#sudo systemctl start elasticsearch.service
service elasticsearch start
如果运气一般么,自己google
tail -100 /opt/hdisk/es72/logs/es72ctl.log
###到主机上,生成密码 ####!!一旦主节点开始运行,便可以为集群设置密码了 /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto #### !!拷贝下来
vi /etc/kibana/ikbana.conf
##找到用户名密码哪里,把上面的生成的kibana密码输入到里面
#sudo systemctl start kibana.service
service kibana start
###登陆 http://192.168.1.237:5601 ##输入 用户:elastic 密码: 生成的密码里面找 .
##进去以后就可以管理用户了
标签:开始 style Requires uid guid setup tin 环境 acl
原文地址:https://www.cnblogs.com/loswing/p/11249076.html