Table of Contents |
---|
...
createrepo rpm 설치를 위해 먼저 아래와 같은 순서로 dependencies RPM을 설치합니다.
Code Block language bash $ rpm -ivh /root/repos/deltarpm-3.6-3.el7.x86_64.rpm $ rpm -ivh /root/repos/python-deltarpm-3.6-3.el7.x86_64.rpm $ rpm -ivh /root/repos/libxml2-python-2.9.1-6.el7.5.x86_64.rpm $ rpm -ivh /root/repos/createrepo-0.9.9-28.el7.noarch.rpm 경고: createrepo-0.9.9-28.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY 준비 중... ################################# [100%] Updating / installing... 1:createrepo-0.9.9-28.el7 ################################# [100%]
기존 yum repository 파일을 백업합니다. 폐쇄망 환경이라 공인 인터넷 주소를 참조하는 repo 파일이 있으면
yum install
할 때 시간이 오래 걸립니다.Code Block language bash # 기존 repo 파일을 백업합니다. # $ cd /etc/yum.repos.d $ mkdir bak $ mv * bak/
local repository 파일을 작성합니다.
Code Block language bash # baseurl은 rpm이 있는 local 디렉토리 경로 # $ vi local.repo [localrepo] name=localrepo baseurl=file:///root/repos enabled=1 gpgcheck=0
USB 또는 CD에 있는 rpm 파일을 임의 디렉토리(e.g. /root/repos)에 복사합니다. 디렉토리 경로는
local.repo
의baseurl
로 지정된 경로와 같아야 합니다.createrepo
명령어로 rpm 디렉토리(3, 4번에 지정한)를 yum local repository 디렉토리로 등록합니다.Code Block language bash # yum repository에 RPM 디렉토리 등록 # $ createrepo /root/repos/ Spawning worker 0 with 31 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete
...
install
Code Block language bash $ yum localinstall kapacitor-1.5.4-1.x86_64.rpm Examining kapacitor-1.5.4-1.x86_64.rpm: kapacitor-1.5.4-1.x86_64 Marking kapacitor-1.5.4-1.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package kapacitor.x86_64 0:1.5.4-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================================ Installing: kapacitor x86_64 1.5.4-1 /kapacitor-1.5.4-1.x86_64 90 M Transaction Summary ============================================================================================================================================================ Install 1 Package Total size: 90 M Installed size: 90 M Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : kapacitor-1.5.4-1.x86_64 1/1 Verifying : kapacitor-1.5.4-1.x86_64 1/1 Installed: kapacitor.x86_64 0:1.5.4-1 Complete!
config 수정 : docker에서 사용한 kapacitor conf와 동일하게 사용합니다.
Code Block language yaml $ vi /etc/kapacitor/kapacitor.conf hostname = "localhost" data_dir = "/var/lib/kapacitor" skip-config-overrides = false default-retention-policy = "" [http] bind-address = ":9094" auth-enabled = false log-enabled = true write-tracing = false pprof-enabled = false https-enabled = false https-certificate = "/etc/ssl/kapacitor.pem" shutdown-timeout = "10s" shared-secret = "" [replay] dir = "/var/lib/kapacitor/replay" [storage] boltdb = "/var/lib/kapacitor/kapacitor.db" [task] dir = "/var/lib/kapacitor/tasks" snapshot-interval = "1m0s" [[influxdb]] enabled = true name = "default" default = false urls = ["http://:8086"] username = "" password = "" ssl-ca = "" ssl-cert = "" ssl-key = "" insecure-skip-verify = false timeout = "0s" disable-subscriptions = false subscription-protocol = "http" kapacitor-hostname = "" http-port = 0 udp-bind = "" udp-buffer = 1000 udp-read-buffer = 0 startup-timeout = "5m0s" subscriptions-sync-interval = "1m0s" [influxdb.excluded-subscriptions] _kapacitor = ["autogen"] [logging] file = "STDERR" level = "INFO" [config-override] enabled = true [collectd] enabled = false bind-address = ":25826" database = "collectd" retention-policy = "" batch-size = 5000 batch-pending = 10 batch-timeout = "10s" read-buffer = 0 typesdb = "/usr/share/collectd/types.db" [opentsdb] enabled = false bind-address = ":4242" database = "opentsdb" retention-policy = "" consistency-level = "one" tls-enabled = false certificate = "/etc/ssl/influxdb.pem" batch-size = 1000 batch-pending = 5 batch-timeout = "1s" log-point-errors = true [alerta] enabled = false url = "" token = "" environment = "" origin = "" [hipchat] enabled = false url = "" token = "" room = "" global = false state-changes-only = false [opsgenie] enabled = false api-key = "" url = "https://api.opsgenie.com/v1/json/alert" recovery_url = "https://api.opsgenie.com/v1/json/alert/note" global = false [pagerduty] enabled = false url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json" service-key = "" global = false [smtp] enabled = false host = "localhost" port = 25 username = "" password = "" no-verify = false global = false state-changes-only = false from = "" idle-timeout = "30s" [sensu] enabled = false addr = "" source = "Kapacitor" [slack] enabled = false url = "" channel = "" username = "kapacitor" icon-emoji = "" global = false state-changes-only = false [talk] enabled = false url = "" author_name = "" [telegram] enabled = false url = "https://api.telegram.org/bot" token = "" chat-id = "" parse-mode = "" disable-web-page-preview = false disable-notification = false global = false state-changes-only = false [victorops] enabled = false api-key = "" routing-key = "" url = "https://alert.victorops.com/integrations/generic/20131114/alert" global = false [kubernetes] enabled = false in-cluster = false token = "" ca-path = "" namespace = "" [reporting] enabled = false url = "https://usage.influxdata.com" [stats] enabled = true stats-interval = "10s" database = "_kapacitor" retention-policy = "autogen" timing-sample-rate = 0.1 timing-movavg-size = 1000 [udf] [deadman] interval = "10s" threshold = 0.0 id = "{{ .Group }}:NODE_NAME for task '{{ .TaskName }}'" message = "{{ .ID }} is {{ if eq .Level \"OK\" }}alive{{ else }}dead{{ end }}: {{ index .Fields \"emitted\" | printf \"%0.3f\" }} points/INTERVAL." global = false
service start
Code Block language bash $ systemctl enable kapacitor $ systemctl daemon-reload $ systemctl start kapacitor
etcd
install
Code Block language bash $ yum install -y etcd Examining etcd-3.3.11-2.el7.centos.x86_64.rpm: etcd-3.3.11-2.el7.centos.x86_64 Marking etcd-3.3.11-2.el7.centos.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package etcd.x86_64 0:3.3.11-2.el7.centos will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================== Installing: etcd x86_64 3.3.11-2.el7.centos /etcd-3.3.11-2.el7.centos.x86_64 45 M Transaction Summary =================================================================================================================================================== Install 1 Package Total size: 45 M Installed size: 45 M Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : etcd-3.3.11-2.el7.centos.x86_64 1/1 Verifying : etcd-3.3.11-2.el7.centos.x86_64 1/1 Installed: etcd.x86_64 0:3.3.11-2.el7.centos Complete!
config
Code Block language bash $ vi /etc/etcd/etcd.conf #[Member] ETCD_DATA_DIR="/var/lib/etcd/etcd1.etcd" ETCD_LISTEN_PEER_URLS="http://{ETCD_CLIENT_IP1}:2380" ETCD_LISTEN_CLIENT_URLS="http://{ETCD_CLIENT_IP1},http://127.0.0.1:2379" ETCD_NAME="etcd1" #[Clustering] ETCD_INITIAL_ADVERTISE_PEER_URLS="http://{ETCD_CLIENT_IP1}:2380" ETCD_ADVERTISE_CLIENT_URLS="http://{ETCD_CLIENT_IP1}:2379" ETCD_INITIAL_CLUSTER="etcd1=http://{ETCD_CLIENT_IP1}:2380" ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01" ETCD_INITIAL_CLUSTER_STATE="new" #[Security] ETCD_AUTO_TLS="true" ETCD_PEER_AUTO_TLS="true"
service start
Code Block language bash $ systemctl enable etcd $ systemctl daemon-reload $ systemctl start etcd
SaltStack 설치
공인망 환경에서의 과정과 동일합니다.
epel-release
저장소 등록 과정은 Pass합니다.
...