1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Elasticsearch配置 cd elasticsearch-rtf/config nano *.yml #在尾部加入以下配置信息 http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User" #出现内存不够的错误提示,应用服务器的控制器中选择创建快照后增加内存。 cd /elsticsearch-rtf/config/jvm.options -Xms512m -Xmx512m #报权限错误 groupadd pzs useradd pzs -g pzs -p elasticsearch chown -R pzs:pzs elasticsearch-rtf su pzs #报最大映射错误 cd config/*.yml max virtual memory areas vm.max_map_count [65530] is too low nano /etc/sysctl.conf vm.max_map_count=262144 #后台启动 ./elasticsearch & #验证 curl -XGET 'http://localhost:9200'
|