Skip to content

Commit 79e82db

Browse files
author
zhang
committed
2019-05-13
1 parent 223b9c6 commit 79e82db

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

centos-settings/CentOS-Extra-Packages.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,22 @@
8383
- `sudo yum install -y htop`(htop 官方源是没有的,所以如果能下载下来就表示已经使用了第三方源)
8484

8585

86+
### 禁用源
87+
88+
- 编辑:`vim /etc/yum.repos.d/elasticsearch.repo`
89+
- 把 enabled=1 改为 enabled=0
90+
91+
```
92+
[elasticsearch-6.x]
93+
name=Elasticsearch repository for 6.x packages
94+
baseurl=https://artifacts.elastic.co/packages/6.x/yum
95+
gpgcheck=1
96+
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
97+
enabled=1
98+
autorefresh=1
99+
type=rpm-md
100+
```
101+
86102
> 资料:
87103
88104
- <https://wiki.centos.org/zh/PackageManagement/Yum/Priorities>

markdown-file/Elasticsearch-Base.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ elasticsearch hard memlock unlimited
6161

6262
#### 开始安装
6363

64+
- 检查:`rpm -qa | grep elastic`
65+
- 卸载:`rpm -e --nodeps elasticsearch`
6466
- 官网 RPM 安装流程(重要,以下资料都是对官网的总结):<https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html>
6567
- 导入 KEY:`rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch`
6668
- 新建文件:`vim /etc/yum.repos.d/elasticsearch.repo`
67-
- 内容如下:
69+
- 内容如下(6.x)
6870

6971
```
7072
[elasticsearch-6.x]
@@ -77,6 +79,19 @@ autorefresh=1
7779
type=rpm-md
7880
```
7981

82+
- 内容如下(5.x):
83+
84+
```
85+
[elasticsearch-5.x]
86+
name=Elasticsearch repository for 5.x packages
87+
baseurl=https://artifacts.elastic.co/packages/5.x/yum
88+
gpgcheck=1
89+
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
90+
enabled=1
91+
autorefresh=1
92+
type=rpm-md
93+
```
94+
8095
- 开始安装:`yum install -y elasticsearch`,预计文件有 108M 左右,国内网络安装可能会很慢,慢慢等
8196
- 安装完后会多了一个:elasticsearch 用户和组
8297
- 设置 java 软链接:`ln -s /usr/local/jdk1.8.0_181/jre/bin/java /usr/local/sbin/java`

0 commit comments

Comments
 (0)