安装elasticsearch-7.0.0(centos)
云主机上需设置root密码
sudo passwd root 回车后出入密码两次
jdk11页面
https://www.oracle.com/technetwork/java/javase/downloads/index.html
https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
安装jdk
mkdir /opt/downloads
jdk11
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" -P /opt/downloads http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.rpm
rpm -ivh /opt/downloads/jdk-11.0.2_linux-x64_bin.rpm
jdk1.8
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" -P /opt/downloads https://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/jdk-8u201-linux-x64.rpm
rpm -ivh /opt/downloads/jdk-8u201-linux-x64.rpm
查看是否安装成功
java -version
安装elasticsearch
https://www.elastic.co/cn/downloads/elasticsearch
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" -P /opt/downloads https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-x86_64.rpm
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" -P /opt/downloads https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-linux-x86_64.tar.gz
rpm -ivh /opt/downloads/elasticsearch-7.0.0-x86_64.rpm
配置elasticsearch
vim /etc/elasticsearch/elasticsearch.yml
修改network.host的值
network.host: 192.168.x.x 自身ip,限制为内网访问
network.host: 0.0.0.0 也可以不限制ip
http.port: 9200
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
注:es不能用root用户启动
测试是否正常运行
curl http://localhost:9200/
关闭命令
netstat -anltp|grep 9200
显示LISTEN xxxx/java
kill -9 xxxx
安装Elasticsearch-head
先查看是否安装git
git --version
安装git
yum install -y git
卸载为
yum remove git
安装Elasticsearch-head
cd /opt
git clone git://github.com/mobz/elasticsearch-head.git
修改配置
vim /opt/elasticsearch-head/Gruntfile.js
在原有的connect:server:options节点上加上hostname: '*',
修改es配置
vim /etc/elasticsearch/elasticsearch.yml
network.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
安装node和npm
参数:https://github.com/nodesource/distributions
curl -sL https://rpm.nodesource.com/setup_11.x | bash -
yum install -y nodejs
查看安装的版本
node -v
npm -v
安装grunt和grunt-cli
sudo npm install -g grunt
sudo npm install -g grunt-cli
安装模块依赖
npm install
npm install grunt --save #安装grunt到模块中并保存
后台启动head
cd /opt/elasticsearch-head
nohup npm run start &
回车返回到shell
客户端浏览器打开x.x.x.x:9100
若显示未连接修改http://y.y.y.y:9200为es服务器ip:port
关闭
netstat -anltp|grep 9100
显示LISTEN xxxx/grunt
kill -9 xxxx
安装IK Analysis插件
/usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.0.0/elasticsearch-analysis-ik-7.0.0.zip
重启es服务
sudo systemctl restart elasticsearch.service
守护进程启动文件浏览
vim /usr/lib/systemd/system/elasticsearch.service
[Unit]
Description=Elasticsearch
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
RuntimeDirectory=elasticsearch
PrivateTmp=true
Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_PATH_CONF=/etc/elasticsearch
Environment=PID_DIR=/var/run/elasticsearch
EnvironmentFile=-/etc/sysconfig/elasticsearch
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch
Group=elasticsearch
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet
# StandardOutput is configured to redirect to journalctl since
# some error messages may be logged in standard output before
# elasticsearch logging system is initialized. Elasticsearch
# stores its logs in /var/log/elasticsearch and does not use
# journalctl by default. If you also want to enable journalctl
# logging, you can simply remove the "quiet" option from ExecStart.
StandardOutput=journal
StandardError=inherit
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65535
# Specifies the maximum number of processes
LimitNPROC=4096
# Specifies the maximum size of virtual memory
LimitAS=infinity
# Specifies the maximum file size
LimitFSIZE=infinity
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
# SIGTERM signal is used to stop the Java process
KillSignal=SIGTERM
# Send the signal only to the JVM rather than its control group
KillMode=process
# Java process is never killed
SendSIGKILL=no
# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
# Built for packages-7.0.0 (packages)
安装elasticsearch-7.0.0(centos)的更多相关文章
- ELK——安装 logstash 2.2.0、elasticsearch 2.2.0 和 Kibana 3.0
本文内容 Elasticsearch logstash Kibana 参考资料 本文介绍安装 logstash 2.2.0 和 elasticsearch 2.2.0,操作系统环境版本是 CentOS ...
- MonoDevelop 4.2.2/Mono 3.4.0 in CentOS 6.5 安装笔记
MonoDevelop 4.2.2/Mono 3.4.0 in CentOS 6.5 安装笔记 说明 以root账户登录Linux操作系统,注意:本文中的所有命令行前面的 #> 表示命令行提示符 ...
- 在Windows上安装Elasticsearch 5.0
在windows上安装Elasticsearch Elasticsearch可以使用.zip软件包安装在Windows上. elasticsearch-service.bat命令,它将设置Elasti ...
- CentOS 6 中安装Node.js 4.0 版本或以上
如果想在CentOS 6 中安装Node.js >4.0,如果通过以往的方式安装: wget http://nodejs.org/dist/v4.0.0/node-v4.0.0.tar.gz t ...
- 在Linux CentOS上编译并安装Clang 3.5.0
编译CoreCLR需要Clang 3.5,而CentOS上安装的是Clang 3.4.2(yum repos中最新版也是这个),只能自己手工编译LLVM的源代码进行安装. (注:CentOS的版本是6 ...
- 安装Elasticsearch,Logstash,Kibana(5.0.1-mac版)
安装Elasticsearch 1.下载https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0.1.tar.gz包 ...
- 如何在Ubuntu/CentOS上安装Linux内核4.0
大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0.代号为‘Hurr durr I'm a sheep’的Linux内核4.0是目前为止最新的主干内核.它是稳定版3. ...
- linux centos安装编译phantomjs 2.0的方法
phantomjs 2.0最新版的官方不提供编译好的文件下载,只能自己编译,有教程但是过于简单,特别是服务器上要安装N多的支持.折腾到现在终于装好了并且能正常运行了,截图mark一下: linux c ...
- CentOS 6.5安装Erlang/OTP 17.0
CentOS 6.5安装Erlang/OTP 17.0 作者:chszs,转载需注明.博客主页:http://blog.csdn.net/chszs Erlang眼下已经是Fedora和Debian/ ...
- CentOS下源码安装vsftpd-3.0.0,并设置指定用户访问指定目录(附带完整配置文件)
1.卸载系统已经存在的ftp服务器 因为是源码安装,所以不能通过rpm -qa的方式查看是否已经安装ftp服务器,可以通过find / | grep vsftp*方式查看系统中存在哪些与vsftpd相 ...
随机推荐
- Ubuntu 16.04安装MySQL(5.7.18)
此篇为http://www.cnblogs.com/EasonJim/p/7139275.html的分支页. 安装MySQL前需要做如下了解: 1.MySQL各类型版本的区别,参考:http://ww ...
- mongoDB 数据库操作
mongoDB 数据库操作 数据库命名规则 . 使用 utf8 字符,默认所有字符为 utf8 . 不能含有空格 . / \ "\0" 字符 (c++ 中会将 "\0&q ...
- BATCH+VBS脚本自动执行命令
打开cmd,然后执行run.bat s 1就会执行tmpsw.vbs的内容,1是作为id传进去的参数. run.bat: @echo off set type=%1 set id=%2 :打开一个te ...
- unix文件系统中的硬链接和软连接
硬链接: 一般情况下,文件名和inode号码是"一一对应"关系,每个inode号码对应一个文件名.但是,Unix/Linux系统允许,多个文件名指向同一个inode号码. 这意味着 ...
- OO期末总结
$0 写在前面 善始善终,临近期末,为一学期的收获和努力画一个圆满的句号. $1 测试与正确性论证的比较 $1-0 什么是测试? 测试是使用人工操作或者程序自动运行的方式来检验它是否满足规定的需求或弄 ...
- Day047--JS BOM介绍, jQuery介绍和使用
内容回顾 DOM 文档对象模型(model) 一个模型就是一个对象(属性和方法 面向对象的三大特性:封装 继承 多态) 为了可扩展性 DOM操作 标签属性操作 获取值 getAttribute() 设 ...
- pytest 10 skip跳过测试用例
pytest.mark.skip可以标记无法在某些平台上运行的测试功能,或者你希望失败的测试功能 skip意味着只有在满足某些条件时才希望测试通过,否则pytest应该跳过运行测试.常见事例时非win ...
- Pandas系列(六)-时间序列详解
内容目录 1. 基础概述 2. 转换时间戳 3. 生成时间戳范围 4. DatetimeIndex 5. DateOffset对象 6. 与时间序列相关的方法 6.1 移动 6.2 频率转换 6.3 ...
- nodejs和npm的关系【转】
node.js是javascript的一种运行环境,是对Google V8引擎进行的封装.是一个服务器端的javascript的解释器. 包含关系: nodejs中含有npm,比如说你安装好nodej ...
- LFYZ-OJ ID: 1028 背包问题
背包问题 题目描述 简单的背包问题.设有一个背包,可以放入的重量为s.现有n件物品,重量分别为w1,w2-,wn,(1≤i≤n)均为正整数,从n件物品中挑选若干件,使得放入背包的重量之和正好为s.找到 ...