You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.7 KiB
66 lines
1.7 KiB
##优化
|
|
vi /etc/sysctl.conf
|
|
vm.max_map_count=262145
|
|
|
|
vi /etc/security/limits.conf
|
|
* soft nproc 65536
|
|
* hard nproc 65536
|
|
* soft nofile 65536
|
|
* hard nofile 65536
|
|
|
|
##解压
|
|
tar zxvf elasticsearch-8.10.4-linux-x86_64.tar.gz
|
|
|
|
##改名
|
|
mv elasticsearch-8.10.4 elasticsearch
|
|
|
|
##增加用户
|
|
adduser elasticsearch
|
|
echo Dsideal4r5t6y7u | passwd --stdin elasticsearch
|
|
chown -R elasticsearch /usr/local/elasticsearch
|
|
|
|
##修改配置(主要配置)
|
|
vi /usr/local/elasticsearch/config/elasticsearch.yml
|
|
|
|
##第1台
|
|
cluster.name: szjz
|
|
node.name: node1
|
|
path.data: /usr/local/elasticsearch/data
|
|
path.logs: /usr/local/elasticsearch/logs
|
|
network.host: 10.10.14.51
|
|
http.port: 9200
|
|
transport.port: 9300
|
|
discovery.seed_hosts: ["10.10.14.51:9300", "10.10.14.52:9300", "10.10.14.53:9300"]
|
|
xpack.security.enabled: false
|
|
xpack.security.transport.ssl.enabled: false
|
|
|
|
##第2台
|
|
cluster.name: szjz
|
|
node.name: node2
|
|
path.data: /usr/local/elasticsearch/data
|
|
path.logs: /usr/local/elasticsearch/logs
|
|
network.host: 10.10.14.52
|
|
http.port: 9200
|
|
transport.port: 9300
|
|
discovery.seed_hosts: ["10.10.14.51:9300", "10.10.14.52:9300", "10.10.14.53:9300"]
|
|
xpack.security.enabled: false
|
|
xpack.security.transport.ssl.enabled: false
|
|
|
|
##第3台
|
|
cluster.name: szjz
|
|
node.name: node3
|
|
path.data: /usr/local/elasticsearch/data
|
|
path.logs: /usr/local/elasticsearch/logs
|
|
network.host: 10.10.14.53
|
|
http.port: 9200
|
|
transport.port: 9300
|
|
discovery.seed_hosts: ["10.10.14.51:9300", "10.10.14.52:9300", "10.10.14.53:9300"]
|
|
xpack.security.enabled: false
|
|
xpack.security.transport.ssl.enabled: false
|
|
|
|
|
|
##启动
|
|
#调试启动
|
|
su elasticsearch -l -c "/usr/local/elasticsearch/bin/elasticsearch"
|
|
#后台启动
|
|
su elasticsearch -l -c "/usr/local/elasticsearch/bin/elasticsearch -d" |