在linux中安装elasticsearch的时候,在启动的时候报错:The unit elasticsearch.service has entered the ‘failed’ state with result ‘oom-kill’. 由于系统内存接近饱和且没有交换空间,可以通过配置交换空间来防止内存不足的情况。 1、创建交换文件 sudo dd if=/dev/zero of=/swapfile bs=1M count=409