Last active
September 8, 2020 12:33
-
-
Save MostafaNorzade/c99f000f5843c42c8bb9b585e8edfb6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################# change DNS for iran server ##################### | |
lsattr /etc/resolv.conf | |
chattr -a /etc/resolv.conf | |
lsattr /etc/resolv.conf | |
chattr -i /etc/resolv.conf | |
lsattr /etc/resolv.conf | |
vim /etc/resolv.conf | |
############################################## | |
############## Install Elasticsearch ######## | |
yum install java | |
vi /etc/yum.repos.d/elasticsearch.repo | |
[elasticsearch-7.x] | |
name=Elasticsearch repository for 7.x packages | |
baseurl=https://artifacts.elastic.co/packages/7.x/yum | |
gpgcheck=1 | |
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch | |
enabled=1 | |
autorefresh=1 | |
type=rpm-md | |
#if server in Iran use this DNS on /etc/resolve.conf : | |
nameserver 178.22.122.100 | |
nameserver 185.51.200.2 | |
yum install elasticsearch | |
vi /etc/elasticsearch/elasticsearch.yml | |
-network.host: localhost | |
-http.port: 9200 | |
systemctl daemon-reload | |
systemctl start elasticsearch | |
systemctl enable elasticsearch | |
#check elasticsearch enable in port 9200 | |
yum install net-tools | |
netstat -antupl | grep 9200 | |
############################################ | |
########## Install Kibana ################## | |
vi /etc/yum.repos.d/kibana.repo | |
[kibana-7.x] | |
name=Kibana repository for 7.x packages | |
baseurl=https://artifacts.elastic.co/packages/7.x/yum | |
gpgcheck=1 | |
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch | |
enabled=1 | |
autorefresh=1 | |
type=rpm-md | |
yum install kibana | |
vi /etc/kibana/kibana.yml | |
server.port: 5601 | |
server.host: "localhost" | |
elasticsearch.url: "http://localhost:9200" | |
#check kibana port | |
netstat -antupl | grep 5601 | |
############################################## | |
################# install NGINX ############## | |
yum install epel-release | |
yum install nginx httpd-tools | |
nano /etc/nginx/nginx.conf | |
server { | |
listen 80; | |
server_name elk.fedorafans.com; | |
auth_basic "Restricted Access"; | |
auth_basic_user_file /etc/nginx/.kibana-user; | |
location / { | |
proxy_pass http://localhost:5601; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment