{"id":5211,"date":"2018-08-22T09:31:59","date_gmt":"2018-08-22T09:31:59","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=5211"},"modified":"2024-05-29T03:10:51","modified_gmt":"2024-05-29T03:10:51","slug":"install-and-configure-grafana-in-ubuntu-and-debian","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/install-and-configure-grafana-in-ubuntu-and-debian\/","title":{"rendered":"Install and Configure Grafana in Ubuntu and Debian"},"content":{"rendered":"\n<p><strong>This Tutorial is Deprecated and New Version of Tutorial you can find here &#8211; <a href=\"https:\/\/www.devopsschool.com\/blog\/install-and-configure-grafana-in-rhel-7\/\">CLICK HERE<\/a><\/strong><\/p>\n\n\n<p>Install and Configure Grafana in Ubuntu and Debian<\/p>\n<p><strong>Step 1 &#8211; Download &amp; Install Grafana<\/strong><br>\nDownload Grafana RPM file RPM for Linux from https:\/\/grafana.com\/grafana\/download?platform=linux<\/p>\n<pre># Ubuntu &amp; Debian\n$ wget https:\/\/s3-us-west-2.amazonaws.com\/grafana-releases\/release\/grafana_5.2.2_amd64.deb\n$ sudo dpkg -i grafana_5.2.2_amd64.deb<\/pre>\n<p><strong>Step 2 &#8211; Understand Grafana Installation details in Ubuntu\/Debian<\/strong><\/p>\n<ol>\n<li>Installs binary to \/usr\/sbin\/grafana-server<\/li>\n<li>Installs Init.d script to \/etc\/init.d\/grafana-server<\/li>\n<li>Creates default file (environment vars) to \/etc\/default\/grafana-server<\/li>\n<li>Installs configuration file to \/etc\/grafana\/grafana.ini<\/li>\n<li>Installs systemd service (if systemd is available) name grafana-server.service<\/li>\n<li>The default configuration sets the log file at \/var\/log\/grafana\/grafana.log<\/li>\n<li>The default configuration specifies an sqlite3 db at \/var\/lib\/grafana\/grafana.db<\/li>\n<li>Installs HTML\/JS\/CSS and other Grafana files at \/usr\/share\/grafana<\/li>\n<\/ol>\n<p><strong>Step 3 &#8211; Start the server (init.d service)<\/strong><\/p>\n<p>[code]$ sudo service grafana-server start[\/code]<\/p>\n<p>This will start the grafana-server process as the grafana user, which was created during the package installation. The default HTTP port is 3000 and default user and group is admin.<\/p>\n<p><strong>Step 4 &#8211; Configure the Grafana server to start at boot time<\/strong><\/p>\n<p>[code]$ sudo update-rc.d grafana-server defaults<br>\n$ systemctl daemon-reload<br>\n$ systemctl start grafana-server<br>\n$ systemctl status grafana-server<br>\n$ sudo systemctl enable grafana-server.service[\/code]<\/p>\n<p><strong>Step 5 &#8211; Grafana server Environment file<\/strong><br>\nThe systemd service file and init.d script both use the file located at \/etc\/default\/grafana-server for environment variables used when starting the back-end. Here you can override log directory, data directory and other variables.<\/p>\n<p><strong>Step 6 &#8211; Grafana server Log<\/strong><br>\nBy default Grafana will log to \/var\/log\/grafana<\/p>\n<p><strong>Step 7 &#8211; Grafana Database<\/strong><br>\nThe default configuration specifies a sqlite3 database located at \/var\/lib\/grafana\/grafana.db.<\/p>\n<p>You can also use MySQL or Postgres as the Grafana database, as detailed on<br>\nhttp:\/\/docs.grafana.org\/installation\/configuration\/#database<\/p>\n<p><strong>Step 7 &#8211; Grafana configuration<\/strong><br>\nThe configuration file is located at \/etc\/grafana\/grafana.ini. Go the Configuration page for details on all those options. You can add following data sources<\/p>\n<ol>\n<li>Graphite<\/li>\n<li>InfluxDB<\/li>\n<li>OpenTSDB<\/li>\n<li>Prometheus<\/li>\n<\/ol>\n<p><strong>Step 8 &#8211; Server side image rendering<\/strong><br>\nServer side image (png) rendering is a feature that is optional but very useful when sharing visualizations, for example in alert notifications.<\/p>\n<p>[code]$ yum install fontconfig<br>\n$ yum install freetype*<br>\n$ yum install urw-fonts[\/code]<\/p>\n<p><strong>Step 9 &#8211; How to access the Grafana dashboard<\/strong><\/p>\n<p>http:\/\/13.232.27.156:3000\/<br>\nUser name &#8211; admin<br>\nPassword &#8211; admin<\/p>","protected":false},"excerpt":{"rendered":"<p>This Tutorial is Deprecated and New Version of Tutorial you can find here &#8211; CLICK HERE Install and Configure Grafana in Ubuntu and Debian Step 1 &#8211; Download &amp; Install Grafana Download Grafana RPM file RPM for Linux from https:\/\/grafana.com\/grafana\/download?platform=linux # Ubuntu &amp; Debian $ wget https:\/\/s3-us-west-2.amazonaws.com\/grafana-releases\/release\/grafana_5.2.2_amd64.deb $ sudo dpkg -i grafana_5.2.2_amd64.deb Step 2 &#8211;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":8572,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[5012],"tags":[254,701,5011,237,702],"class_list":["post-5211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-grafana","tag-configure","tag-debian","tag-grafana","tag-install","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/5211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=5211"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/5211\/revisions"}],"predecessor-version":[{"id":30185,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/5211\/revisions\/30185"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/8572"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=5211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=5211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=5211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}