elasticsearch安装
程序员文章站
2022-07-05 10:59:18
...
预先需要安装java8
1. 源码包准备:
首先到官网下载jdk,http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2、解压源码包
sudo mkdir /usr/local/java
cp jdk-8u25-linux-x64.tar.gz /usr/local/java
cd /usr/local/java
sudo tar xvf jdk-8u25-linux-x64.tar.gz
sudo rm jdk-8u25-linux-x64.tar.gz
3、设置jdk环境变量
sudo vim ~/.bashrc
打开之后在末尾添加:
export JAVA_HOME=/usr/local/java/jdk1.8.0_25
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
4、检验是否安装成功
在终端输入如下命令
java -version
以上java安装参考来源:https://www.linuxidc.com/Linux/2015-01/112030.htm
安装elasticsearch:
https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-targz.html
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz.sha512
shasum -a 512 -c elasticsearch-6.2.4.tar.gz.sha512
tar -xzf elasticsearch-6.2.4.tar.gz
cd elasticsearch-6.2.4/
启动:
./bin/elasticsearch
到此安装完成。
可能出现的问题:
There is insufficient memory for the Java Runtime Environment to continue.
解决方法:
打开vim config/jvm.options 找到-Xms2g -Xmx2g(有的时-Xms1g -Xmx1g),改成如下:
#Xms represents the initial size of total heap space
#Xmx represents the maximum size of total heap space
-Xms512m
-Xmx512m
上一篇: Spark Streaming原理简析
下一篇: Java学习笔记:Redis的持久化
推荐阅读
-
VMware 12安装及激活图文教程
-
CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6 7.0 7.1多版本全能环境
-
VMware workstation 9安装配置图文教程
-
Linux下Nginx安装的方法(pcre和openssl)
-
PHP安装全攻略:APACHE
-
mac 下 安装nginx的方法小结
-
CentOS 4.0安装配置Nginx的方法
-
详解Centos7.2编译安装zabbix3.2(详细步骤)
-
Vmware12虚拟机安装教程 Vmware12虚拟机上安装Oracle
-
猩猩助手怎么用 猩猩助手安卓模拟器下载安装教程图