Tuesday, February 1, 2022

How To Install Grafana with Apache on Rocky Linux

 Grafana is free and open-source analytics and visualization tool. It's a multi-platform web-based application that provides customizable charts, graphs, and alerts for supported data sources.
Apache is one of most popular web server software in the world.
Homepag - https://grafana.com/
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y

cat <<EOF | sudo tee /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
EOF

dnf makecache ; dnf install grafana httpd  -y
systemctl enable --now grafana-server ; systemctl status grafana-server

nano /etc/grafana/grafana.ini
http_addr = localhost | http_port = 3000 |domain = www.example.com

systemctl restart grafana-server ; systemctl status grafana-server
nano /etc/httpd/conf.d/example.conf
<VirtualHost *:80>
        ServerAdmin admin@example.com
        ServerName www.example.com    
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined
        ProxyRequests On
        ProxyPass / http://localhost:3000/
        ProxyPassReverse / http://localhost:3000/
</VirtualHost>
systemctl start httpd ; systemctl enable httpd ; systemctl status httpd
apachectl configtest
nano /etc/hosts
192.168.1.60    www.example.com    
systemctl restart httpd ; systemctl status httpd
www.example.com    
admin/admin
_________________________________________________________________________________________

No comments:

Post a Comment