7.8.1
// TODO: 待整理。
[root@centos essw]# ll
总用量 479420
-rw-r--r--. 1 root root 172521789 6月 7 2021 apache-skywalking-apm-8.6.0.tar.gz
-rw-r--r--. 1 root root 318401743 7月 27 2020 elasticsearch-7.8.1-x86_64.rpm
[root@centos essw]# tar zxvf elasticsearch-7.8.1-x86_64.rpm
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[root@centos essw]# rpm –ivh elasticsearch-7.8.1-x86_64.rpm
RPM 版本 4.11.3
版权所有 (C) 1998-2002 - 红帽公司。
该程序可以在 GNU GPL 条款下自由分发
用法: rpm [-aKfgpqVcdLilsiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires] [--whatprovides] [--nomanifest] [-c|--configfiles]
[-d|--docfiles] [-L|--licensefiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT] [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript] [--allfiles] [--allmatches]
[--badreloc] [-e|--erase <package>+] [--excludedocs] [--excludepath=<path>] [--force] [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos] [--ignoresize]
[-i|--install] [--justdb] [--nodeps] [--nofiledigest] [--nocontexts] [--noorder] [--noscripts] [--notriggers] [--nocollections] [--oldpackage] [--percent] [--prefix=<dir>]
[--relocate=<old>=<new>] [--replacefiles] [--replacepkgs] [--test] [-U|--upgrade <packagefile>+] [--reinstall=<packagefile>+] [-D|--define “MACRO EXPR”] [--undefine=MACRO]
[-E|--eval “EXPR”] [--macros=<FILE:…>] [--noplugins] [--nodigest] [--nosignature] [--rcfile=<FILE:…>] [-r|--root ROOT] [--dbpath=DIRECTORY] [--querytags] [--showrc] [--quiet]
[-v|--verbose] [--version] [-?|--help] [--usage] [--scripts] [--setperms] [--setugids] [--setcaps] [--restore] [--conflicts] [--obsoletes] [--provides] [--requires] [--info]
[--changelog] [--xml] [--triggers] [--last] [--dupes] [--filesbypkg] [--fileclass] [--filecolor] [--fscontext] [--fileprovide] [--filerequire] [--filecaps]
[root@centos essw]# yum localinstall elasticsearch-7.8.1-x86_64.rpm
已加载插件:fastestmirror, nvidia
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
正在检查 elasticsearch-7.8.1-x86_64.rpm: elasticsearch-7.8.1-1.x86_64
elasticsearch-7.8.1-x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 elasticsearch.x86_64.0.7.8.1-1 将被 安装
--> 解决依赖关系完成
依赖关系解决
====================================================================================================================================================================================================
Package 架构 版本 源 大小
====================================================================================================================================================================================================
正在安装:
elasticsearch x86_64 7.8.1-1 /elasticsearch-7.8.1-x86_64 507 M
事务概要
====================================================================================================================================================================================================
安装 1 软件包
总计:507 M
安装大小:507 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。
** 发现 4 个已存在的 RPM 数据库问题, 'yum check' 输出如下:
cuda-nsight-11-5-11.5.114-1.x86_64 有缺少的需求 jre >= ('0', '1.7', None)
cuda-nvvp-11-5-11.5.114-1.x86_64 有缺少的需求 jre >= ('0', '1.7', None)
2:postfix-2.10.1-9.el7.x86_64 有缺少的需求 libmysqlclient.so.18()(64bit)
2:postfix-2.10.1-9.el7.x86_64 有缺少的需求 libmysqlclient.so.18(libmysqlclient_18)(64bit)
Creating elasticsearch group... OK
Creating elasticsearch user... OK
正在安装 : elasticsearch-7.8.1-1.x86_64 1/1
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
future versions of Elasticsearch will require Java 11; your Java version from [/usr/setup/jdk1.8.0_144/jre] does not meet this requirement
Created elasticsearch keystore in /etc/elasticsearch/elasticsearch.keystore
验证中 : elasticsearch-7.8.1-1.x86_64 1/1
已安装:
elasticsearch.x86_64 0:7.8.1-1
完毕!
[root@centos essw]# systemctl enable elasticsearch
Created symlink from /etc/systemd/system/multi-user.target.wants/elasticsearch.service to /usr/lib/systemd/system/elasticsearch.service.
[root@centos essw]# systemctl start elasticsearch
[root@centos essw]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since 五 2022-05-06 12:36:28 CST; 1s ago
Docs: https://www.elastic.co
Main PID: 2226 (java)
CGroup: /system.slice/elasticsearch.service
├─2226 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=tr...
└─2424 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
5月 06 12:36:10 centos.home systemd[1]: Starting Elasticsearch...
5月 06 12:36:28 centos.home systemd[1]: Started Elasticsearch.
[root@centos essw]# curl "http://localhost:9200"
{
"name" : "centos.home",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "GucUb0DVTAulpTVvHwek1g",
"version" : {
"number" : "7.8.1",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89",
"build_date" : "2020-07-21T16:40:44.668009Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
[root@centos essw]# firewall-cmd --zone=public --add-port=9200/tcp --permanent
Warning: ALREADY_ENABLED: 9200:tcp
success
[root@centos essw]# reboot
[root@centos ~]# firewall-cmd --zone=public --list-ports
8848/tcp 6379/tcp 3306/tcp 9200/tcp 9300/tcp
[root@centos ~]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since 五 2022-05-06 12:43:53 CST; 6min ago
Docs: https://www.elastic.co
Main PID: 1327 (java)
CGroup: /system.slice/elasticsearch.service
├─1327 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=tr...
└─2046 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
5月 06 12:43:44 centos.home systemd[1]: Starting Elasticsearch...
5月 06 12:43:53 centos.home systemd[1]: Started Elasticsearch.
[root@centos ~]# vi /etc/elasticsearch/elasticsearch.yml
[root@centos ~]# systemctl restart elasticsearch
Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
[root@centos ~]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 五 2022-05-06 12:52:00 CST; 14s ago
Docs: https://www.elastic.co
Process: 2213 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=78)
Main PID: 2213 (code=exited, status=78)
5月 06 12:51:47 centos.home systemd[1]: Starting Elasticsearch...
5月 06 12:52:00 centos.home systemd-entrypoint[2213]: ERROR: [1] bootstrap checks failed
5月 06 12:52:00 centos.home systemd-entrypoint[2213]: [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_p...e configured
5月 06 12:52:00 centos.home systemd-entrypoint[2213]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/elasticsearch.log
5月 06 12:52:00 centos.home systemd[1]: elasticsearch.service: main process exited, code=exited, status=78/n/a
5月 06 12:52:00 centos.home systemd[1]: Failed to start Elasticsearch.
5月 06 12:52:00 centos.home systemd[1]: Unit elasticsearch.service entered failed state.
5月 06 12:52:00 centos.home systemd[1]: elasticsearch.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@centos ~]# systemctl start elasticsearch
Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
[root@centos ~]# vi /etc/elasticsearch/elasticsearch.yml
[root@centos ~]# cd /etc/elasticsearch/
[root@centos elasticsearch]# ll
总用量 40
-rw-rw----. 1 root elasticsearch 199 5月 6 12:35 elasticsearch.keystore
-rw-rw----. 1 root elasticsearch 4093 5月 6 12:58 elasticsearch.yml
-rw-rw----. 1 root elasticsearch 2373 7月 22 2020 jvm.options
drwxr-s---. 2 root elasticsearch 6 7月 22 2020 jvm.options.d
-rw-rw----. 1 root elasticsearch 17419 7月 22 2020 log4j2.properties
-rw-rw----. 1 root elasticsearch 473 7月 22 2020 role_mapping.yml
-rw-rw----. 1 root elasticsearch 197 7月 22 2020 roles.yml
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users_roles
[root@centos elasticsearch]# systemctl start elasticsearch
[root@centos elasticsearch]# systemctl stop firewalld
[root@centos elasticsearch]# cat /usr/lib/systemd/system/elasticsearch.service
[Unit]
Description=Elasticsearch
Documentation=https://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
RuntimeDirectory=elasticsearch
PrivateTmp=true
Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_PATH_CONF=/etc/elasticsearch
Environment=PID_DIR=/var/run/elasticsearch
Environment=ES_SD_NOTIFY=true
EnvironmentFile=-/etc/sysconfig/elasticsearch
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch
Group=elasticsearch
ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -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.8.1 (packages)
[root@centos elasticsearch]# cd /usr/share/elasticsearch/bin
[root@centos bin]# ll
总用量 19996
-rwxr-xr-x. 1 root root 2877 7月 22 2020 elasticsearch
-rwxr-xr-x. 1 root root 491 7月 22 2020 elasticsearch-certgen
-rwxr-xr-x. 1 root root 483 7月 22 2020 elasticsearch-certutil
-rwxr-xr-x. 1 root root 996 7月 22 2020 elasticsearch-cli
-rwxr-xr-x. 1 root root 433 7月 22 2020 elasticsearch-croneval
-rwxr-xr-x. 1 root root 4428 7月 22 2020 elasticsearch-env
-rwxr-xr-x. 1 root root 1828 7月 22 2020 elasticsearch-env-from-file
-rwxr-xr-x. 1 root root 184 7月 22 2020 elasticsearch-keystore
-rwxr-xr-x. 1 root root 440 7月 22 2020 elasticsearch-migrate
-rwxr-xr-x. 1 root root 126 7月 22 2020 elasticsearch-node
-rwxr-xr-x. 1 root root 172 7月 22 2020 elasticsearch-plugin
-rwxr-xr-x. 1 root root 431 7月 22 2020 elasticsearch-saml-metadata
-rwxr-xr-x. 1 root root 438 7月 22 2020 elasticsearch-setup-passwords
-rwxr-xr-x. 1 root root 118 7月 22 2020 elasticsearch-shard
-rwxr-xr-x. 1 root root 441 7月 22 2020 elasticsearch-sql-cli
-rwxr-xr-x. 1 root root 20384452 7月 22 2020 elasticsearch-sql-cli-7.8.1.jar
-rwxr-xr-x. 1 root root 426 7月 22 2020 elasticsearch-syskeygen
-rwxr-xr-x. 1 root root 426 7月 22 2020 elasticsearch-users
-rwxr-xr-x. 1 root root 332 7月 22 2020 systemd-entrypoint
-rwxr-xr-x. 1 root root 346 7月 22 2020 x-pack-env
-rwxr-xr-x. 1 root root 354 7月 22 2020 x-pack-security-env
-rwxr-xr-x. 1 root root 353 7月 22 2020 x-pack-watcher-env
[root@centos bin]# cd ..
[root@centos elasticsearch]# ll
总用量 568
drwxr-xr-x. 2 root root 4096 5月 6 12:35 bin
drwxr-xr-x. 9 root root 107 5月 6 12:35 jdk
drwxr-xr-x. 3 root root 4096 5月 6 12:35 lib
-rw-r--r--. 1 root root 13675 7月 22 2020 LICENSE.txt
drwxr-xr-x. 48 root root 4096 5月 6 12:35 modules
-rw-rw-r--. 1 root root 544318 7月 22 2020 NOTICE.txt
drwxr-xr-x. 2 root root 6 7月 22 2020 plugins
-rw-r--r--. 1 root root 8165 7月 22 2020 README.asciidoc
[root@centos elasticsearch]# cd /etc/sysconfig/elasticsearch
-bash: cd: /etc/sysconfig/elasticsearch: 不是目录
[root@centos elasticsearch]# ll /etc/sysconfig/elasticsearch
-rw-rw----. 1 root elasticsearch 1673 7月 22 2020 /etc/sysconfig/elasticsearch
[root@centos elasticsearch]# cat /etc/sysconfig/elasticsearch
################################
# Elasticsearch
################################
# Elasticsearch home directory
#ES_HOME=/usr/share/elasticsearch
# Elasticsearch Java path
#JAVA_HOME=
# Elasticsearch configuration directory
# Note: this setting will be shared with command-line tools
ES_PATH_CONF=/etc/elasticsearch
# Elasticsearch PID directory
#PID_DIR=/var/run/elasticsearch
# Additional Java OPTS
#ES_JAVA_OPTS=
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
#RESTART_ON_UPGRADE=true
################################
# Elasticsearch service
################################
# SysV init.d
#
# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process
ES_STARTUP_SLEEP_TIME=5
################################
# System properties
################################
# Specifies the maximum file descriptor number that can be opened by this process
# When using Systemd, this setting is ignored and the LimitNOFILE defined in
# /usr/lib/systemd/system/elasticsearch.service takes precedence
#MAX_OPEN_FILES=65535
# The maximum number of bytes of memory that may be locked into RAM
# Set to "unlimited" if you use the 'bootstrap.memory_lock: true' option
# in elasticsearch.yml.
# When using systemd, LimitMEMLOCK must be set in a unit file such as
# /etc/systemd/system/elasticsearch.service.d/override.conf.
#MAX_LOCKED_MEMORY=unlimited
# Maximum number of VMA (Virtual Memory Areas) a process can own
# When using Systemd, this setting is ignored and the 'vm.max_map_count'
# property is set at boot time in /usr/lib/sysctl.d/elasticsearch.conf
#MAX_MAP_COUNT=262144
[root@centos elasticsearch]# cat /etc/elasticsearch
cat: /etc/elasticsearch: 是一个目录
[root@centos elasticsearch]# cd /etc/elasticsearch/
[root@centos elasticsearch]# ll
总用量 40
-rw-rw----. 1 root elasticsearch 199 5月 6 12:35 elasticsearch.keystore
-rw-rw----. 1 root elasticsearch 4093 5月 6 12:58 elasticsearch.yml
-rw-rw----. 1 root elasticsearch 2373 7月 22 2020 jvm.options
drwxr-s---. 2 root elasticsearch 6 7月 22 2020 jvm.options.d
-rw-rw----. 1 root elasticsearch 17419 7月 22 2020 log4j2.properties
-rw-rw----. 1 root elasticsearch 473 7月 22 2020 role_mapping.yml
-rw-rw----. 1 root elasticsearch 197 7月 22 2020 roles.yml
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users_roles
[root@centos elasticsearch]# cp elasticsearch.yml elasticsearch9202.yml
[root@centos elasticsearch]# cp elasticsearch.yml elasticsearch9203.yml
[root@centos elasticsearch]# vi elasticsearch9202.yml
[root@centos elasticsearch]# vi elasticsearch9203.yml
[root@centos elasticsearch]# cd ..
[root@centos etc]# ll
总用量 1104
-rw-r--r--. 1 root root 18 1月 3 14:12 adjtime
-rw-r--r--. 1 root root 1529 4月 1 2020 aliases
-rw-r--r--. 1 root root 12288 1月 3 06:13 aliases.db
drwxr-xr-x. 2 root root 4096 4月 25 21:38 alternatives
-rw-------. 1 root root 541 8月 9 2019 anacrontab
-rw-r--r--. 1 root root 55 8月 8 2019 asound.conf
drwxr-x---. 3 root root 43 1月 3 14:10 audisp
drwxr-x---. 3 root root 83 1月 3 06:13 audit
drwxr-xr-x. 2 root root 75 2月 15 13:06 bash_completion.d
-rw-r--r--. 1 root root 2853 4月 1 2020 bashrc
drwxr-xr-x. 2 root root 6 2月 3 2021 binfmt.d
-rw-r--r--. 1 root root 37 11月 23 2020 centos-release
-rw-r--r--. 1 root root 51 11月 23 2020 centos-release-upstream
drwxr-xr-x. 2 root root 6 10月 13 2020 chkconfig.d
-rw-r--r--. 1 root root 1158 1月 3 14:12 chrony.conf
-rw-r-----. 1 root chrony 481 8月 8 2019 chrony.keys
drwxr-xr-x. 2 root root 25 2月 15 13:10 containerd
drwxr-xr-x. 2 root root 21 1月 3 14:10 cron.d
drwxr-xr-x. 2 root root 42 1月 3 14:10 cron.daily
-rw-------. 1 root root 0 8月 9 2019 cron.deny
drwxr-xr-x. 2 root root 22 6月 10 2014 cron.hourly
drwxr-xr-x. 2 root root 6 6月 10 2014 cron.monthly
-rw-r--r--. 1 root root 451 6月 10 2014 crontab
drwxr-xr-x. 2 root root 6 6月 10 2014 cron.weekly
-rw-------. 1 root root 0 1月 3 14:10 crypttab
-rw-r--r--. 1 root root 1620 4月 1 2020 csh.cshrc
-rw-r--r--. 1 root root 1103 4月 1 2020 csh.login
lrwxrwxrwx. 1 root root 29 1月 3 23:01 cufile.json -> /etc/alternatives/cufile.json
drwxr-xr-x. 4 root root 78 1月 3 14:10 dbus-1
drwxr-xr-x. 4 root root 31 1月 3 23:04 dconf
drwxr-xr-x. 2 root root 44 1月 3 23:04 default
drwxr-xr-x. 2 root root 23 1月 3 14:10 depmod.d
drwxr-x---. 4 root root 53 6月 10 2021 dhcp
-rw-r--r--. 1 root root 5090 11月 16 2020 DIR_COLORS
-rw-r--r--. 1 root root 5725 11月 16 2020 DIR_COLORS.256color
-rw-r--r--. 1 root root 4669 11月 16 2020 DIR_COLORS.lightbgcolor
drwxr-xr-x. 2 root root 50 1月 3 23:04 dkms
drwxr-xr-x. 2 root root 41 2月 15 13:11 docker
-rw-r--r--. 1 root root 1285 9月 30 2020 dracut.conf
drwxr-xr-x. 2 root root 6 9月 30 2020 dracut.conf.d
-rw-r--r--. 1 root root 112 9月 30 2020 e2fsck.conf
drwxr-xr-x. 3 root root 37 1月 3 23:03 egl
drwxr-s---. 3 root elasticsearch 4096 5月 6 13:22 elasticsearch
-rw-r--r--. 1 root root 36 1月 3 06:18 environment
-rw-r--r--. 1 root root 1317 4月 11 2018 ethertypes
-rw-r--r--. 1 root root 0 6月 7 2013 exports
lrwxrwxrwx. 1 root root 56 1月 3 14:10 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
-rw-r--r--. 1 root root 70 4月 1 2020 filesystems
drwxr-x---. 7 root root 133 1月 3 15:56 firewalld
drwxr-xr-x. 3 root root 38 1月 3 22:14 fonts
-rw-r--r--. 1 root root 709 1月 3 16:09 fstab
-rw-r--r--. 1 root root 38 10月 30 2018 fuse.conf
drwxr-xr-x. 2 root root 6 8月 2 2017 gcrypt
drwxr-xr-x. 3 root root 26 1月 3 23:03 glvnd
drwxr-xr-x. 2 root root 6 7月 13 2018 gnupg
-rw-r--r--. 1 root root 94 3月 25 2017 GREP_COLORS
drwxr-xr-x. 4 root root 40 1月 3 14:10 groff
-rw-r--r--. 1 root root 576 5月 6 12:35 group
-rw-r--r--. 1 root root 555 5月 6 09:25 group-
lrwxrwxrwx. 1 root root 22 1月 3 15:56 grub2.cfg -> ../boot/grub2/grub.cfg
lrwxrwxrwx. 1 root root 31 1月 3 15:56 grub2-efi.cfg -> ../boot/efi/EFI/centos/grub.cfg
drwx------. 2 root root 182 1月 3 15:56 grub.d
----------. 1 root root 464 5月 6 12:35 gshadow
----------. 1 root root 446 5月 6 09:25 gshadow-
drwxr-xr-x. 3 root root 20 12月 2 23:32 gss
-rw-r--r--. 1 root root 9 6月 7 2013 host.conf
-rw-r--r--. 1 root root 12 1月 3 14:12 hostname
-rw-r--r--. 1 root root 158 6月 7 2013 hosts
-rw-r--r--. 1 root root 370 6月 7 2013 hosts.allow
-rw-r--r--. 1 root root 460 6月 7 2013 hosts.deny
lrwxrwxrwx. 1 root root 11 1月 3 14:10 init.d -> rc.d/init.d
-rw-r--r--. 1 root root 511 11月 17 2020 inittab
-rw-r--r--. 1 root root 942 6月 7 2013 inputrc
drwxr-xr-x. 2 root root 159 1月 3 14:10 iproute2
-rw-r--r--. 1 root root 23 11月 23 2020 issue
-rw-r--r--. 1 root root 22 11月 23 2020 issue.net
drwxr-xr-x. 3 root root 62 1月 3 23:02 java
drwxr-xr-x. 2 root root 6 11月 21 2015 jvm
drwxr-xr-x. 2 root root 6 11月 21 2015 jvm-commmon
-rw-r--r--. 1 root root 7274 1月 3 15:56 kdump.conf
drwxr-xr-x. 5 root root 56 1月 3 23:04 kernel
-rw-r--r--. 1 root root 646 9月 30 2020 krb5.conf
drwxr-xr-x. 2 root root 6 12月 2 23:32 krb5.conf.d
-rw-r--r--. 1 root root 44303 5月 6 09:25 ld.so.cache
-rw-r--r--. 1 root root 65 1月 4 17:34 ld.so.conf
drwxr-xr-x. 2 root root 4096 5月 6 09:25 ld.so.conf.d
-rw-r-----. 1 root root 191 3月 2 2019 libaudit.conf
drwxr-xr-x. 2 root root 35 1月 3 14:10 libnl
-rw-r--r--. 1 root root 2391 10月 13 2013 libuser.conf
-rw-r--r--. 1 root root 19 1月 3 14:12 locale.conf
lrwxrwxrwx. 1 root root 35 1月 3 14:12 localtime -> ../usr/share/zoneinfo/Asia/Shanghai
-rw-r--r--. 1 root root 2027 8月 6 2019 login.defs
-rw-r--r--. 1 root root 662 7月 31 2013 logrotate.conf
drwxr-xr-x. 2 root root 112 5月 6 09:25 logrotate.d
drwxr-xr-x. 6 root root 100 1月 3 15:56 lvm
-r--r--r--. 1 root root 33 1月 3 14:10 machine-id
-rw-r--r--. 1 root root 111 10月 1 2020 magic
-rw-r--r--. 1 root root 5122 6月 10 2021 makedumpfile.conf.sample
-rw-r--r--. 1 root root 5171 10月 31 2018 man_db.conf
drwxr-xr-x. 2 root root 6 11月 21 2015 maven
drwxr-xr-x. 3 root root 20 1月 3 23:35 mercurial
-rw-r--r--. 1 root root 1106 9月 30 2020 mke2fs.conf
drwxr-xr-x. 2 root root 81 1月 3 23:49 modprobe.d
drwxr-xr-x. 2 root root 6 2月 3 2021 modules-load.d
-rw-r--r--. 1 root root 0 6月 7 2013 motd
lrwxrwxrwx. 1 root root 17 1月 3 14:10 mtab -> /proc/self/mounts
-rw-r--r--. 1 root root 1756 5月 6 09:30 my.cnf
drwxr-xr-x. 2 root root 6 10月 4 2018 my.cnf.d
-rw-r--r--. 1 root root 767 8月 9 2019 netconfig
drwxr-xr-x. 7 root root 134 6月 10 2021 NetworkManager
-rw-r--r--. 1 root root 58 11月 17 2020 networks
-rw-r--r--. 1 root root 1949 1月 3 14:10 nsswitch.conf
-rw-r--r--. 1 root root 1938 9月 30 2020 nsswitch.conf.bak
drwxr-xr-x. 2 root root 6 10月 1 2021 nvidia
drwxr-xr-x. 3 root root 21 1月 3 23:04 OpenCL
drwxr-xr-x. 3 root root 36 1月 3 15:56 openldap
drwxr-xr-x. 2 root root 6 4月 11 2018 opt
lrwxrwxrwx. 1 root root 21 1月 3 15:56 os-release -> ../usr/lib/os-release
drwxr-xr-x. 2 root root 4096 1月 3 23:04 pam.d
-rw-r--r--. 1 root root 1227 5月 6 12:35 passwd
-rw-r--r--. 1 root root 1157 5月 6 09:25 passwd-
drwxr-xr-x. 3 root root 21 1月 3 14:10 pkcs11
drwxr-xr-x. 10 root root 116 1月 3 14:10 pki
drwxr-xr-x. 2 root root 28 1月 3 14:10 plymouth
drwxr-xr-x. 5 root root 52 1月 3 14:10 pm
drwxr-xr-x. 5 root root 72 1月 3 14:10 polkit-1
drwxr-xr-x. 2 root root 6 6月 10 2014 popt.d
drwxr-xr-x. 2 root root 154 1月 3 14:10 postfix
drwxr-xr-x. 3 root root 123 1月 3 15:56 ppp
drwxr-xr-x. 2 root root 78 1月 3 15:56 prelink.conf.d
-rw-r--r--. 1 root root 233 6月 7 2013 printcap
-rw-r--r--. 1 root root 2039 4月 25 21:42 profile
drwxr-xr-x. 2 root root 251 1月 3 15:56 profile.d
-rw-r--r--. 1 root root 6545 4月 1 2020 protocols
drwxr-xr-x. 2 root root 35 1月 3 15:56 python
lrwxrwxrwx. 1 root root 10 1月 3 15:56 rc0.d -> rc.d/rc0.d
lrwxrwxrwx. 1 root root 10 1月 3 15:56 rc1.d -> rc.d/rc1.d
lrwxrwxrwx. 1 root root 10 1月 3 15:56 rc2.d -> rc.d/rc2.d
lrwxrwxrwx. 1 root root 10 1月 3 15:56 rc3.d -> rc.d/rc3.d
lrwxrwxrwx. 1 root root 10 1月 3 15:56 rc4.d -> rc.d/rc4.d
lrwxrwxrwx. 1 root root 10 1月 3 15:56 rc5.d -> rc.d/rc5.d
lrwxrwxrwx. 1 root root 10 1月 3 15:56 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root 127 11月 17 2020 rc.d
lrwxrwxrwx. 1 root root 13 1月 3 15:56 rc.local -> rc.d/rc.local
lrwxrwxrwx. 1 root root 14 1月 3 15:56 redhat-release -> centos-release
-rw-r--r--. 1 root root 67 5月 6 12:43 resolv.conf
-rw-r--r--. 1 root root 1634 12月 25 2012 rpc
drwxr-xr-x. 2 root root 107 1月 3 23:35 rpm
-rw-r--r--. 1 root root 458 4月 1 2020 rsyncd.conf
-rw-r--r--. 1 root root 3232 9月 30 2020 rsyslog.conf
drwxr-xr-x. 2 root root 25 6月 10 2021 rsyslog.d
-rw-r--r--. 1 root root 1008 11月 17 2020 rwtab
drwxr-xr-x. 2 root root 23 11月 17 2020 rwtab.d
drwxr-xr-x. 2 root root 24 1月 3 14:10 sasl2
-rw-------. 1 root root 221 4月 1 2020 securetty
drwxr-xr-x. 6 root root 4096 5月 6 11:04 security
drwxr-xr-x. 5 root root 81 11月 17 2020 selinux
-rw-r--r--. 1 root root 670293 6月 7 2013 services
-rw-r--r--. 1 root root 216 4月 1 2020 sestatus.conf
----------. 1 root root 818 5月 6 12:35 shadow
----------. 1 root root 789 5月 6 09:25 shadow-
-rw-r--r--. 1 root root 44 4月 1 2020 shells
drwxr-xr-x. 2 root root 62 1月 3 15:56 skel
drwxr-xr-x. 2 root root 225 3月 22 01:05 ssh
drwxr-xr-x. 2 root root 19 1月 3 15:56 ssl
-rw-r--r--. 1 root root 212 11月 17 2020 statetab
drwxr-xr-x. 2 root root 6 11月 17 2020 statetab.d
-rw-r--r--. 1 root root 0 4月 1 2020 subgid
-rw-r--r--. 1 root root 0 4月 1 2020 subuid
-rw-r-----. 1 root root 1786 9月 30 2020 sudo.conf
-r--r-----. 1 root root 4328 9月 30 2020 sudoers
drwxr-x---. 2 root root 6 10月 14 2021 sudoers.d
-rw-r-----. 1 root root 3181 9月 30 2020 sudo-ldap.conf
drwxr-xr-x. 6 root root 4096 5月 6 12:35 sysconfig
-rw-r--r--. 1 root root 476 5月 6 11:05 sysctl.conf
drwxr-xr-x. 2 root root 28 1月 3 15:56 sysctl.d
drwxr-xr-x. 4 root root 151 1月 3 15:56 systemd
lrwxrwxrwx. 1 root root 14 1月 3 15:56 system-release -> centos-release
-rw-r--r--. 1 root root 23 11月 23 2020 system-release-cpe
-rw-------. 1 tss tss 7046 8月 4 2017 tcsd.conf
drwxr-xr-x. 2 root root 6 9月 7 2017 terminfo
drwxr-xr-x. 2 root root 6 2月 3 2021 tmpfiles.d
drwxr-xr-x. 3 root root 109 1月 3 15:56 tuned
drwxr-xr-x. 3 root root 54 4月 25 22:18 udev
-rw-r--r--. 1 root root 37 1月 3 14:12 vconsole.conf
-rw-r--r--. 1 root root 51 9月 1 2015 vdpau_wrapper.cfg
-rw-r--r--. 1 root root 1982 12月 16 2020 virc
drwxr-xr-x. 5 root root 67 1月 3 23:04 vulkan
-rw-r--r--. 1 root root 4479 5月 16 2019 wgetrc
drwxr-xr-x. 2 root root 33 1月 3 15:56 wpa_supplicant
drwxr-xr-x. 5 root root 57 1月 3 14:10 X11
drwxr-xr-x. 4 root root 38 1月 3 14:10 xdg
drwxr-xr-x. 2 root root 6 4月 11 2018 xinetd.d
drwxr-xr-x. 6 root root 100 1月 3 14:10 yum
-rw-r--r--. 1 root root 970 10月 2 2020 yum.conf
drwxr-xr-x. 2 root root 4096 3月 6 21:21 yum.repos.d
[root@centos etc]# ls
adjtime cron.hourly e2fsck.conf grub2-efi.cfg kernel mercurial passwd- rc5.d shadow- terminfo
aliases cron.monthly egl grub.d krb5.conf mke2fs.conf pkcs11 rc6.d shells tmpfiles.d
aliases.db crontab elasticsearch gshadow krb5.conf.d modprobe.d pki rc.d skel tuned
alternatives cron.weekly environment gshadow- ld.so.cache modules-load.d plymouth rc.local ssh udev
anacrontab crypttab ethertypes gss ld.so.conf motd pm redhat-release ssl vconsole.conf
asound.conf csh.cshrc exports host.conf ld.so.conf.d mtab polkit-1 resolv.conf statetab vdpau_wrapper.cfg
audisp csh.login favicon.png hostname libaudit.conf my.cnf popt.d rpc statetab.d virc
audit cufile.json filesystems hosts libnl my.cnf.d postfix rpm subgid vulkan
bash_completion.d dbus-1 firewalld hosts.allow libuser.conf netconfig ppp rsyncd.conf subuid wgetrc
bashrc dconf fonts hosts.deny locale.conf NetworkManager prelink.conf.d rsyslog.conf sudo.conf wpa_supplicant
binfmt.d default fstab init.d localtime networks printcap rsyslog.d sudoers X11
centos-release depmod.d fuse.conf inittab login.defs nsswitch.conf profile rwtab sudoers.d xdg
centos-release-upstream dhcp gcrypt inputrc logrotate.conf nsswitch.conf.bak profile.d rwtab.d sudo-ldap.conf xinetd.d
chkconfig.d DIR_COLORS glvnd iproute2 logrotate.d nvidia protocols sasl2 sysconfig yum
chrony.conf DIR_COLORS.256color gnupg issue lvm OpenCL python securetty sysctl.conf yum.conf
chrony.keys DIR_COLORS.lightbgcolor GREP_COLORS issue.net machine-id openldap rc0.d security sysctl.d yum.repos.d
containerd dkms groff java magic opt rc1.d selinux systemd
cron.d docker group jvm makedumpfile.conf.sample os-release rc2.d services system-release
cron.daily dracut.conf group- jvm-commmon man_db.conf pam.d rc3.d sestatus.conf system-release-cpe
cron.deny dracut.conf.d grub2.cfg kdump.conf maven passwd rc4.d shadow tcsd.conf
[root@centos etc]# cp e
e2fsck.conf egl/ elasticsearch/ environment ethertypes exports
[root@centos etc]# cp elasticsearch/ elasticsearch9202
cp: 略过目录"elasticsearch/"
[root@centos etc]# cp -r elasticsearch/ elasticsearch9202
[root@centos etc]# cp -r elasticsearch/ elasticsearch9203
[root@centos etc]# cd elasticsearch9202/
[root@centos elasticsearch9202]# cd ..
[root@centos etc]# rm -rf elasticsearch9202/elasticsearch.yml elasticsearch9202/elasticsearch9203.yml
[root@centos etc]# rm -rf elasticsearch9203/elasticsearch.yml elasticsearch9202/elasticsearch9202.yml
[root@centos etc]# ll elasticsearch
总用量 48
-rw-r-----. 1 root elasticsearch 4093 5月 6 13:22 elasticsearch9202.yml
-rw-r-----. 1 root elasticsearch 4093 5月 6 13:22 elasticsearch9203.yml
-rw-rw----. 1 root elasticsearch 199 5月 6 12:35 elasticsearch.keystore
-rw-rw----. 1 root elasticsearch 4093 5月 6 12:58 elasticsearch.yml
-rw-rw----. 1 root elasticsearch 2373 7月 22 2020 jvm.options
drwxr-s---. 2 root elasticsearch 6 7月 22 2020 jvm.options.d
-rw-rw----. 1 root elasticsearch 17419 7月 22 2020 log4j2.properties
-rw-rw----. 1 root elasticsearch 473 7月 22 2020 role_mapping.yml
-rw-rw----. 1 root elasticsearch 197 7月 22 2020 roles.yml
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users_roles
[root@centos etc]# rm -rf elasticsearch/elasticsearch9203.yml elasticsearch9202/elasticsearch9202.yml
[root@centos etc]# ll elasticsearch
总用量 44
-rw-r-----. 1 root elasticsearch 4093 5月 6 13:22 elasticsearch9202.yml
-rw-rw----. 1 root elasticsearch 199 5月 6 12:35 elasticsearch.keystore
-rw-rw----. 1 root elasticsearch 4093 5月 6 12:58 elasticsearch.yml
-rw-rw----. 1 root elasticsearch 2373 7月 22 2020 jvm.options
drwxr-s---. 2 root elasticsearch 6 7月 22 2020 jvm.options.d
-rw-rw----. 1 root elasticsearch 17419 7月 22 2020 log4j2.properties
-rw-rw----. 1 root elasticsearch 473 7月 22 2020 role_mapping.yml
-rw-rw----. 1 root elasticsearch 197 7月 22 2020 roles.yml
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users_roles
[root@centos etc]# mv elasticsearch/elasticsearch9202.yml elasticsearch9202
[root@centos etc]# ll elasticsearch
总用量 40
-rw-rw----. 1 root elasticsearch 199 5月 6 12:35 elasticsearch.keystore
-rw-rw----. 1 root elasticsearch 4093 5月 6 12:58 elasticsearch.yml
-rw-rw----. 1 root elasticsearch 2373 7月 22 2020 jvm.options
drwxr-s---. 2 root elasticsearch 6 7月 22 2020 jvm.options.d
-rw-rw----. 1 root elasticsearch 17419 7月 22 2020 log4j2.properties
-rw-rw----. 1 root elasticsearch 473 7月 22 2020 role_mapping.yml
-rw-rw----. 1 root elasticsearch 197 7月 22 2020 roles.yml
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users
-rw-rw----. 1 root elasticsearch 0 7月 22 2020 users_roles
[root@centos etc]# ll elasticsearch9202
总用量 40
-rw-r-----. 1 root elasticsearch 4093 5月 6 13:22 elasticsearch9202.yml
-rw-r-----. 1 root root 199 5月 6 13:24 elasticsearch.keystore
-rw-r-----. 1 root root 2373 5月 6 13:24 jvm.options
drwxr-x---. 2 root root 6 5月 6 13:24 jvm.options.d
-rw-r-----. 1 root root 17419 5月 6 13:24 log4j2.properties
-rw-r-----. 1 root root 473 5月 6 13:24 role_mapping.yml
-rw-r-----. 1 root root 197 5月 6 13:24 roles.yml
-rw-r-----. 1 root root 0 5月 6 13:24 users
-rw-r-----. 1 root root 0 5月 6 13:24 users_roles
[root@centos etc]# ll elasticsearch9203
总用量 44
-rw-r-----. 1 root root 4093 5月 6 13:24 elasticsearch9202.yml
-rw-r-----. 1 root root 4093 5月 6 13:24 elasticsearch9203.yml
-rw-r-----. 1 root root 199 5月 6 13:24 elasticsearch.keystore
-rw-r-----. 1 root root 2373 5月 6 13:24 jvm.options
drwxr-x---. 2 root root 6 5月 6 13:24 jvm.options.d
-rw-r-----. 1 root root 17419 5月 6 13:24 log4j2.properties
-rw-r-----. 1 root root 473 5月 6 13:24 role_mapping.yml
-rw-r-----. 1 root root 197 5月 6 13:24 roles.yml
-rw-r-----. 1 root root 0 5月 6 13:24 users
-rw-r-----. 1 root root 0 5月 6 13:24 users_roles
[root@centos etc]# rm elasticsearch9203/elasticsearch9202.yml
rm:是否删除普通文件 "elasticsearch9203/elasticsearch9202.yml"?
[root@centos etc]# ll elasticsearch9203
总用量 44
-rw-r-----. 1 root root 4093 5月 6 13:24 elasticsearch9202.yml
-rw-r-----. 1 root root 4093 5月 6 13:24 elasticsearch9203.yml
-rw-r-----. 1 root root 199 5月 6 13:24 elasticsearch.keystore
-rw-r-----. 1 root root 2373 5月 6 13:24 jvm.options
drwxr-x---. 2 root root 6 5月 6 13:24 jvm.options.d
-rw-r-----. 1 root root 17419 5月 6 13:24 log4j2.properties
-rw-r-----. 1 root root 473 5月 6 13:24 role_mapping.yml
-rw-r-----. 1 root root 197 5月 6 13:24 roles.yml
-rw-r-----. 1 root root 0 5月 6 13:24 users
-rw-r-----. 1 root root 0 5月 6 13:24 users_roles
[root@centos etc]# rm elasticsearch9203/elasticsearch9202.yml
rm:是否删除普通文件 "elasticsearch9203/elasticsearch9202.yml"?y
[root@centos etc]# ll elasticsearch9203
总用量 40
-rw-r-----. 1 root root 4093 5月 6 13:24 elasticsearch9203.yml
-rw-r-----. 1 root root 199 5月 6 13:24 elasticsearch.keystore
-rw-r-----. 1 root root 2373 5月 6 13:24 jvm.options
drwxr-x---. 2 root root 6 5月 6 13:24 jvm.options.d
-rw-r-----. 1 root root 17419 5月 6 13:24 log4j2.properties
-rw-r-----. 1 root root 473 5月 6 13:24 role_mapping.yml
-rw-r-----. 1 root root 197 5月 6 13:24 roles.yml
-rw-r-----. 1 root root 0 5月 6 13:24 users
-rw-r-----. 1 root root 0 5月 6 13:24 users_roles
[root@centos etc]# cd elasticsearch9202
[root@centos elasticsearch9202]# ll
总用量 40
-rw-r-----. 1 root elasticsearch 4093 5月 6 13:22 elasticsearch9202.yml
-rw-r-----. 1 root root 199 5月 6 13:24 elasticsearch.keystore
-rw-r-----. 1 root root 2373 5月 6 13:24 jvm.options
drwxr-x---. 2 root root 6 5月 6 13:24 jvm.options.d
-rw-r-----. 1 root root 17419 5月 6 13:24 log4j2.properties
-rw-r-----. 1 root root 473 5月 6 13:24 role_mapping.yml
-rw-r-----. 1 root root 197 5月 6 13:24 roles.yml
-rw-r-----. 1 root root 0 5月 6 13:24 users
-rw-r-----. 1 root root 0 5月 6 13:24 users_roles
[root@centos elasticsearch9202]# mv elasticsearch9202.yml elasticsearch.yml
[root@centos elasticsearch9202]# cd ../elasticsearch9203
[root@centos elasticsearch9203]# mv elasticsearch9203.yml elasticsearch.yml
[root@centos elasticsearch9203]# cat /etc/systemd/system/multi-user.target.wants/elasticsearch.service
[Unit]
Description=Elasticsearch
Documentation=https://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
RuntimeDirectory=elasticsearch
PrivateTmp=true
Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_PATH_CONF=/etc/elasticsearch
Environment=PID_DIR=/var/run/elasticsearch
Environment=ES_SD_NOTIFY=true
EnvironmentFile=-/etc/sysconfig/elasticsearch
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch
Group=elasticsearch
ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -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.8.1 (packages)
[root@centos elasticsearch9203]# cd /var/run/elasticsearch
[root@centos elasticsearch]# ll
总用量 4
-rw-r--r--. 1 elasticsearch elasticsearch 4 5月 6 13:01 elasticsearch.pid
[root@centos elasticsearch]# cd ..
[root@centos run]# ll
总用量 28
-rw-r--r--. 1 root root 4 5月 6 12:43 auditd.pid
drwxr-x---. 2 chrony chrony 80 5月 6 12:43 chrony
drwxr-xr-x. 2 root root 40 5月 6 12:43 console
-rw-r--r--. 1 root root 4 5月 6 12:43 crond.pid
----------. 1 root root 0 5月 6 12:43 cron.reboot
drwx------. 2 root root 40 5月 6 12:43 cryptsetup
drwxr-xr-x. 2 root root 60 5月 6 12:43 dbus
prw-------. 1 root root 0 5月 6 12:43 dmeventd-client
prw-------. 1 root root 0 5月 6 12:43 dmeventd-server
-rw-------. 1 root root 0 5月 6 12:43 ebtables.lock
drwxr-xr-x. 2 elasticsearch elasticsearch 60 5月 6 13:01 elasticsearch
drwxr-xr-x. 2 root root 40 5月 6 12:43 faillock
drwxr-x---. 2 root root 40 5月 6 13:04 firewalld
drwxr-xr-x. 4 root root 120 5月 6 2022 initramfs
drwxr-xr-x. 5 root root 120 5月 6 12:43 lock
drwxr-xr-x. 3 root root 60 5月 6 2022 log
drwx------. 3 root root 100 5月 6 12:43 lvm
-rw-r--r--. 1 root root 4 5月 6 12:43 lvmetad.pid
drwxr-xr-x. 2 root root 40 5月 6 2022 mount
drwxr-xr-x. 2 mysql mysql 60 5月 6 12:43 mysqld
drwxrwxr-x. 2 root root 40 5月 6 12:43 netreport
drwxr-xr-x. 3 root root 100 5月 6 12:43 NetworkManager
drwxr-xr-x. 2 root root 40 5月 6 12:43 plymouth
-rw-r--r--. 1 root root 5 5月 6 12:43 redis_6379.pid
drwxr-xr-x. 2 root root 40 5月 6 12:43 sepermit
drwxr-xr-x. 2 root root 40 5月 6 12:43 setrans
-rw-r--r--. 1 root root 5 5月 6 12:43 sshd.pid
drwx--x--x. 3 root root 60 5月 6 12:43 sudo
-rw-------. 1 root root 4 5月 6 12:43 syslogd.pid
drwxr-xr-x. 20 root root 480 5月 6 12:51 systemd
drwxr-xr-x. 2 root root 60 5月 6 2022 tmpfiles.d
drwxr-xr-x. 2 root root 60 5月 6 12:43 tuned
drwxr-xr-x. 7 root root 160 5月 6 13:04 udev
drwxr-xr-x. 4 root root 80 5月 6 12:48 user
-rw-rw-r--. 1 root utmp 2304 5月 6 12:53 utmp
-rw-------. 1 root root 0 5月 6 12:43 xtables.lock
[root@centos run]# ls
auditd.pid crond.pid dbus ebtables.lock firewalld log mount NetworkManager sepermit sudo tmpfiles.d user
chrony cron.reboot dmeventd-client elasticsearch initramfs lvm mysqld plymouth setrans syslogd.pid tuned utmp
console cryptsetup dmeventd-server faillock lock lvmetad.pid netreport redis_6379.pid sshd.pid systemd udev xtables.lock
[root@centos run]# mkdir elasticsearch9202
[root@centos run]# mkdir elasticsearch9203# 加入如下配置
# 集群名称
cluster.name: cluster-es
# 节点名称, 每个节点的名称不能重复
node.name: node-9200
#ip 地址, 每个节点的地址不能重复
network.host: 192.168.124.150
# 是不是有资格主节点
node.master: true
node.data: true
http.port: 9200
#tcp 监听端口
transport.tcp.port: 9300
# head 插件需要这打开这两个配置
http.cors.allow-origin: "*"
http.cors.enabled: true
http.max_content_length: 200mb
#es7.x 之后新增的配置,初始化一个新的集群时需要此配置来选举 master
cluster.initial_master_nodes: ["node-9201"]
#es7.x 之后新增的配置,节点发现
discovery.seed_hosts: ["192.168.124.150:9301","192.168.124.150:9302","192.168.124.150:9303"]
gateway.recover_after_nodes: 2
network.tcp.keep_alive: true
network.tcp.no_delay: true
transport.tcp.compress: true
# 集群内同时启动的数据任务个数,默认是 2 个
cluster.routing.allocation.cluster_concurrent_rebalance: 16
# 添加或删除节点及负载均衡时并发恢复的线程个数,默认 4 个
cluster.routing.allocation.node_concurrent_recoveries: 16
# 初 始化数据恢复时,并发恢复线程的个数,默认 4 个
cluster.routing.allocation.node_initial_primaries_recoveries: 16
# 加入如下配置
# 集群名称
cluster.name: cluster-es
# 节点名称, 每个节点的名称不能重复
node.name: node-9202
#ip 地址, 每个节点的地址不能重复
network.host: 192.168.124.150
# 是不是有资格主节点
node.master: true
node.data: true
http.port: 9202
#tcp 监听端口
transport.tcp.port: 9302
# head 插件需要这打开这两个配置
http.cors.allow-origin: "*"
http.cors.enabled: true
http.max_content_length: 200mb
#es7.x 之后新增的配置,初始化一个新的集群时需要此配置来选举 master
cluster.initial_master_nodes: ["node-9201"]
#es7.x 之后新增的配置,节点发现
discovery.seed_hosts: ["192.168.124.150:9301","192.168.124.150:9302","192.168.124.150:9303"]
gateway.recover_after_nodes: 2
network.tcp.keep_alive: true
network.tcp.no_delay: true
transport.tcp.compress: true
# 集群内同时启动的数据任务个数,默认是 2 个
cluster.routing.allocation.cluster_concurrent_rebalance: 16
# 添加或删除节点及负载均衡时并发恢复的线程个数,默认 4 个
cluster.routing.allocation.node_concurrent_recoveries: 16
# 初 始化数据恢复时,并发恢复线程的个数,默认 4 个
cluster.routing.allocation.node_initial_primaries_recoveries: 16
# 加入如下配置
# 集群名称
cluster.name: cluster-es
# 节点名称, 每个节点的名称不能重复
node.name: node-9203
#ip 地址, 每个节点的地址不能重复
network.host: 192.168.124.150
# 是不是有资格主节点
node.master: true
node.data: true
http.port: 9203
#tcp 监听端口
transport.tcp.port: 9303
# head 插件需要这打开这两个配置
http.cors.allow-origin: "*"
http.cors.enabled: true
http.max_content_length: 200mb
#es7.x 之后新增的配置,初始化一个新的集群时需要此配置来选举 master
cluster.initial_master_nodes: ["node-9201"]
#es7.x 之后新增的配置,节点发现
discovery.seed_hosts: ["192.168.124.150:9301","192.168.124.150:9302","192.168.124.150:9303"]
gateway.recover_after_nodes: 2
network.tcp.keep_alive: true
network.tcp.no_delay: true
transport.tcp.compress: true
# 集群内同时启动的数据任务个数,默认是 2 个
cluster.routing.allocation.cluster_concurrent_rebalance: 16
# 添加或删除节点及负载均衡时并发恢复的线程个数,默认 4 个
cluster.routing.allocation.node_concurrent_recoveries: 16
# 初 始化数据恢复时,并发恢复线程的个数,默认 4 个
cluster.routing.allocation.node_initial_primaries_recoveries: 16firewall-cmd --zone=public --add-port=5672/tcp --permanent # 开放 5672 端口
firewall-cmd --zone=public --remove-port=5672/tcp --permanent #关闭 5672 端口
firewall-cmd --reload # 配置立即生效
firewall-cmd --zone=public --list-ports systemctl stop firewalld.service firewall-cmd --state
3、查看系统中有哪些用户:
cut -d : -f 1 /etc/passwd
4、查看可以登录系统的用户:
cat /etc/passwd | grep -v /sbin/nologin | cut -d : -f 1
下载 rpm 版本的 es https://mirrors.tuna.tsinghua.edu.cn/elasticstack/yum/elastic-7.x/
rpm 版本安装 es yum localinstall es_xx -y 修改配置文件 [root@centos essw]# systemctl enable elasticsearch Created symlink from /etc/systemd/system/multi-user.target.wants/elasticsearch.service to /usr/lib/systemd/system/elasticsearch.service. 重新启动 systemctl restart es 开放端口 浏览器访问
[Unit] Description=Elasticsearch Documentation=https://www.elastic.co Wants=network-online.target After=network-online.target
[Service] Type=notify RuntimeDirectory=elasticsearch9202 PrivateTmp=true Environment=ES_HOME=/usr/share/elasticsearch Environment=ES_PATH_CONF=/etc/elasticsearch9202 Environment=PID_DIR=/var/run/elasticsearch9202 Environment=ES_SD_NOTIFY=true EnvironmentFile=-/etc/sysconfig/elasticsearch9202
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch Group=elasticsearch
ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -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.8.1 (packages)
================================================================================================================ [Unit] Description=Elasticsearch Documentation=https://www.elastic.co Wants=network-online.target After=network-online.target
[Service] Type=notify RuntimeDirectory=elasticsearch9203 PrivateTmp=true Environment=ES_HOME=/usr/share/elasticsearch Environment=ES_PATH_CONF=/etc/elasticsearch9203 Environment=PID_DIR=/var/run/elasticsearch9203 Environment=ES_SD_NOTIFY=true EnvironmentFile=-/etc/sysconfig/elasticsearch9203
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch Group=elasticsearch
ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -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.8.1 (packages)
/etc/systemd/system/multi-user.target.wants systemctl start elasticsearch9202.service