CentOS安装openjdk和elasticsearch

CentOS安装openjdk

文章目录

一、yum

1.1search

powershell 复制代码
yum search java | grep jdk

1.2安装openjdk

root@test \~# yum install java-1.8.0-openjdk -y

查看openjdk版本

root@test \~# java -version

二、elasticsearch的启动和关闭

2.1启动

切换到elasticsearch安装目录的bin目录下,执行如下命令即可

切换es的用户

powershell 复制代码
./elasticsearch -d

2.2关闭

查询java进程

powershell 复制代码
[elasticsearch@localhost bin]$ ps -ef|grep java

kill -9 进程号 即可关闭

2.3添加服务

elasticsearch@localhost system$ pwd

/etc/systemd/system

vim es.service

powershell 复制代码
[Unit]
Description=es.service
After=network.target
[Service]
LimitNOFILE=infinity
User=elasticsearch
Group=elasticsearch
Type=forking
ExecStart=/data/elasticsearch/bin/elasticsearch -d
PrivateTmp=True
[Install]
WantedBy=multi-user.target
powershell 复制代码
重载系统服务
systemctl daemon-reload
加入开机自启
systemctl enable es.service
# 启动redis服务
systemctl start es.service 
# 停止redis服务
systemctl stop es.service
# 查看redis服务状态
systemctl status es.service
相关推荐
徐寿春10 小时前
什么是 Elasticsearch 倒排索引
大数据·elasticsearch·搜索引擎
拦路雨g11 小时前
VMware centos磁盘容量扩容
linux·运维·centos
keyipatience13 小时前
27,28,29进程通信和匿名管道详解
linux·ubuntu·centos
Java 码思客1 天前
【ElasticSearch从入门到架构师】第1章:ElasticSearch 核心认知与行业定位
大数据·elasticsearch·搜索引擎
serve the people1 天前
Elasticsearch(5) i want to monitor the es health from a http api
大数据·http·elasticsearch
Taerge01102 天前
Doris, StarRocks, ClickHouse, Hologres, ES 对比,选型建议
大数据·clickhouse·elasticsearch
serve the people2 天前
Elasticsearch(1) could you tell me how to use es if i am a beginner
大数据·elasticsearch·jenkins
一个儒雅随和的男子2 天前
Elasticsearch出现深度分页问题怎么解决?
大数据·elasticsearch·搜索引擎
bjzhang752 天前
CentOS下安装MySQL详解
linux·mysql·centos
My is 李豆2 天前
CentOS 7 安装 Docker 完整教程(含 docker-compose 插件)
docker·eureka·centos