elasticseach环境搭建

1.官方下载elasticseach
2.在/bin目录下启动 ./elaticseach
3.发现无法使用root用户启动 创建elsearch用户

groupadd elsearch
useradd elsearch -g elsearch -p elasticsearch

chown -R elsearch:elsearch elasticsearch

su elsearch #切换账户
cd elasticsearch/bin #进入你的elasticsearch目录下的bin目录
./elasticsearch

4.设置.

/etc/security/limits.conf

elsearch soft nofile 819200
elsearch hard nofile 819200

5.临时

[root@localhost ~]# sysctl -w vm.max_map_count=262144
1
查看修改结果

[root@localhost ~]# sysctl -a|grep vm.max_map_count
vm.max_map_count = 262144
或者永久性修改

[root@localhost ~]# cat /etc/sysctl.conf | grep -v "vm.max_map_count" > /tmp/system_sysctl.conf
[root@localhost ~]# echo "vm.max_map_count=262144" >> /tmp/system_sysctl.conf
[root@localhost ~]# mv /tmp/system_sysctl.conf /etc/sysctl.conf
mv:是否覆盖"/etc/sysctl.conf"? y
[root@localhost ~]# cat /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
vm.max_map_count=262144
[root@localhost ~]# sysctl -p
vm.max_map_count = 262144

外网访问修改 host

你可能感兴趣的:(Java-Web应用)