<pyqt5>通過小程式學習pyqt5
一.搭建基礎環境 1.關閉防火牆 2.更改主機名 3.改hosts檔案 4.安裝jdk Vim /etc/profile export JAVA_HOME=/usr/local/java/jdk1.8.0_181 export PATH=$JAVA_HOME/bin:$PATH
5.核心調優 vi /etc/sysctl.conf vm.max_map_count=655360 然後儲存 sysctl -p vi /etc/security/limits.conf
- soft nofile 65536
- hard nofile 131072
- soft nproc 2048
- hard nproc 4096 vi /etc/security/limits.d/20-nproc.conf
-
soft nproc 65536
root soft nproc unlimited
必須重啟! 重啟才可以生效
二.安裝es
1.下載安裝包
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.tar.gz
2.配置安裝
tar -xvf elasticsearch-6.3.2.tar.gz -C /usr/local/elasticsearch-6.3.2/
3.新建使用者
useradd feiyu
passwd feiyu
chown -R feiyu:feiyu elasticsearch-6.3.2/
4.修改配置檔案
單機:
vi config/elasticsearch.yml
network.host: 你自己的伺服器ip
http.port: 9200
5.啟動服務
Su feiyu
bin/elasticsearch -d
netstat -nltp | grep 9200
6.測試
curl
7.安裝外掛 Yum -y install docker docker pull mobz/elasticsearch-head:5 docker run -d -p 9100:9100 docker.io/mobz/elasticsearch-head:5 或者 mkdir -p /root/ELK cd /root/ELKy yum install git npm -y git clone https://github.com/mobz/elasticsearch-head.git cd elasticsearch-head npm install nohup npm run start & 8.測試
三.安裝logstash 1.下載安裝包 wget https://artifacts.elastic.co/downloads/logstash/logstash-6.3.2.tar.gz 2.解壓安裝 tar -zxvf logstash-6.3.2.tar.gz -C /usr/local/logstash-6.3.2 cd /usr/local/logstash-6.3.2/bin 3.改配置檔案 /usr/local/logstash-6.3.2/config/logstash.yml
4.編寫日誌過濾檔案格式
vi conf/erp-web.conf(路徑及檔名自定義)
input {
file {
path ⇒ "/var/log/messages"
type ⇒ "system"
start_position ⇒ "beginning"
}
}
output {
elasticsearch {
hosts ⇒ ["192.168.1.202:9200"]
index ⇒ "system-%{+YYYY.MM.dd}"
}
}
5.啟動服務
測試配置語法是否正確
bin/logstash -f config/erp-web.conf -t
指定配置檔案啟動
nohup bin/logstash -f config/erp-web.conf &
多配置檔案啟動:
nohup bin/logstash -f config/ & 四.安裝kibana 1.下載安裝包 wget https://artifacts.elastic.co/downloads/kibana/kibana-6.3.2-linux-x86_64.tar.gz 2.安裝配置 tar zxvf kibana-6.3.2-linux-x86_64.tar.gz -C /usr/local/ cd /usr/local/kibana-6.3.2-linux-x86_64/config vim kibana.yml
3.啟動服務 ./kibana & netstat -nltp| grep 5601