In this post, we will show you how to install Grafana from the repository on a OCI Instance which Oracle Linux 7.7 running.

First, connect to the server with private key and the fetch the latest package of Grafana from https://grafana.com/grafana/download.

login as: opc
Authenticating with public key "rsa-key-20200220"
[opc@grafanaoci ~]$ sudo -i
[root@grafanaoci ~]# wget https://dl.grafana.com/oss/release/grafana-6.6.2-1.x86_64.rpm
--2020-02-27 15:26:53--  https://dl.grafana.com/oss/release/grafana-6.6.2-1.x86_64.rpm
Resolving dl.grafana.com (dl.grafana.com)... 199.232.66.217, 2a04:4e42:50::729
Connecting to dl.grafana.com (dl.grafana.com)|199.232.66.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 62807182 (60M) [application/x-redhat-package-manager]
Saving to: ‘grafana-6.6.2-1.x86_64.rpm’

100%[===================================================================================================================================================>] 62,807,182   104MB/s   in 0.6s

2020-02-27 15:26:53 (104 MB/s) - ‘grafana-6.6.2-1.x86_64.rpm’ saved [62807182/62807182]

[root@grafanaoci ~]#

Now install Grafana using the following yum command.

[root@grafanaoci ~]# yum localinstall grafana-6.6.2-1.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining grafana-6.6.2-1.x86_64.rpm: grafana-6.6.2-1.x86_64
Marking grafana-6.6.2-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package grafana.x86_64 0:6.6.2-1 will be installed
--> Processing Dependency: fontconfig for package: grafana-6.6.2-1.x86_64
ol7_UEKR5                                                                                                                                                             | 2.8 kB  00:00:00
ol7_addons                                                                                                                                                            | 2.8 kB  00:00:00
ol7_developer                                                                                                                                                         | 2.8 kB  00:00:00
ol7_developer_EPEL                                                                                                                                                    | 3.4 kB  00:00:00
ol7_ksplice                                                                                                                                                           | 2.8 kB  00:00:00
ol7_latest                                                                                                                                                            | 3.4 kB  00:00:00
ol7_oci_included                                                                                                                                                      | 2.9 kB  00:00:00
ol7_optional_latest                                                                                                                                                   | 2.8 kB  00:00:00
ol7_software_collections                                                                                                                                              | 2.8 kB  00:00:00
(1/19): ol7_UEKR5/x86_64/updateinfo                                                                                                                                   |  31 kB  00:00:00
(2/19): ol7_developer/x86_64/primary_db                                                                                                                               | 477 kB  00:00:00
(3/19): ol7_developer_EPEL/x86_64/group_gz                                                                                                                            |  87 kB  00:00:00
(4/19): ol7_developer_EPEL/x86_64/updateinfo                                                                                                                          | 6.0 kB  00:00:00
(5/19): ol7_addons/x86_64/primary_db                                                                                                                                  | 143 kB  00:00:00
(6/19): ol7_ksplice/updateinfo                                                                                                                                        | 5.3 kB  00:00:00
(7/19): ol7_ksplice/primary_db                                                                                                                                        | 619 kB  00:00:00
(8/19): ol7_latest/x86_64/group_gz                                                                                                                                    | 148 kB  00:00:00
(9/19): ol7_addons/x86_64/updateinfo                                                                                                                                  |  83 kB  00:00:00
(10/19): ol7_latest/x86_64/updateinfo                                                                                                                                 | 2.7 MB  00:00:00
(11/19): ol7_oci_included/x86_64/primary_db                                                                                                                           | 118 kB  00:00:00
(12/19): ol7_optional_latest/x86_64/updateinfo                                                                                                                        | 899 kB  00:00:00
(13/19): ol7_developer/x86_64/updateinfo                                                                                                                              |   71 B  00:00:00
(14/19): ol7_software_collections/x86_64/updateinfo                                                                                                                   | 8.7 kB  00:00:00
(15/19): ol7_optional_latest/x86_64/primary_db                                                                                                                        | 4.1 MB  00:00:00
(16/19): ol7_developer_EPEL/x86_64/primary_db                                                                                                                         |  11 MB  00:00:00
(17/19): ol7_software_collections/x86_64/primary_db                                                                                                                   | 4.8 MB  00:00:00
(18/19): ol7_UEKR5/x86_64/primary_db                                                                                                                                  |  10 MB  00:00:00
(19/19): ol7_latest/x86_64/primary_db                                                                                                                                 |  19 MB  00:00:00
--> Processing Dependency: urw-fonts for package: grafana-6.6.2-1.x86_64
--> Running transaction check
---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64
---> Package urw-base35-fonts.noarch 0:20170801-10.el7 will be installed
--> Processing Dependency: urw-base35-fonts-common = 20170801-10.el7 for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-z003-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-standard-symbols-ps-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-p052-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-nimbus-sans-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-nimbus-roman-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-nimbus-mono-ps-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-gothic-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-d050000l-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-c059-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-bookman-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package urw-base35-bookman-fonts.noarch 0:20170801-10.el7 will be installed
--> Processing Dependency: xorg-x11-server-utils for package: urw-base35-bookman-fonts-20170801-10.el7.noarch
--> Processing Dependency: xorg-x11-server-utils for package: urw-base35-bookman-fonts-20170801-10.el7.noarch
--> Processing Dependency: xorg-x11-font-utils for package: urw-base35-bookman-fonts-20170801-10.el7.noarch
--> Processing Dependency: xorg-x11-font-utils for package: urw-base35-bookman-fonts-20170801-10.el7.noarch
---> Package urw-base35-c059-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-d050000l-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-fonts-common.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-gothic-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-nimbus-mono-ps-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-nimbus-roman-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-nimbus-sans-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-p052-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-standard-symbols-ps-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-z003-fonts.noarch 0:20170801-10.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
---> Package xorg-x11-font-utils.x86_64 1:7.5-21.el7 will be installed
--> Processing Dependency: libfontenc.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.5-21.el7.x86_64
---> Package xorg-x11-server-utils.x86_64 0:7.7-20.el7 will be installed
--> Processing Dependency: libXxf86vm.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXt.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXrender.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXrandr.so.2()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXmuu.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXmu.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXinerama.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXi.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXext.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXcursor.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libICE.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Running transaction check
---> Package libICE.x86_64 0:1.0.9-9.el7 will be installed
---> Package libX11.x86_64 0:1.6.7-2.el7 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.el7.x86_64
---> Package libXcursor.x86_64 0:1.1.15-1.el7 will be installed
--> Processing Dependency: libXfixes.so.3()(64bit) for package: libXcursor-1.1.15-1.el7.x86_64
---> Package libXext.x86_64 0:1.3.3-3.el7 will be installed
---> Package libXi.x86_64 0:1.7.9-1.el7 will be installed
---> Package libXinerama.x86_64 0:1.1.3-2.1.el7 will be installed
---> Package libXmu.x86_64 0:1.1.2-2.el7 will be installed
---> Package libXrandr.x86_64 0:1.5.1-2.el7 will be installed
---> Package libXrender.x86_64 0:0.9.10-1.el7 will be installed
---> Package libXt.x86_64 0:1.1.5-3.el7 will be installed
--> Processing Dependency: libSM.so.6()(64bit) for package: libXt-1.1.5-3.el7.x86_64
---> Package libXxf86misc.x86_64 0:1.0.3-7.1.el7 will be installed
---> Package libXxf86vm.x86_64 0:1.1.4-1.el7 will be installed
---> Package libfontenc.x86_64 0:1.1.3-3.el7 will be installed
--> Running transaction check
---> Package libSM.x86_64 0:1.2.2-2.el7 will be installed
---> Package libX11-common.noarch 0:1.6.7-2.el7 will be installed
---> Package libXfixes.x86_64 0:5.0.3-1.el7 will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.13-1.el7.x86_64
--> Running transaction check
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                                      Arch                           Version                                   Repository                                       Size
=============================================================================================================================================================================================
Installing:
 grafana                                                      x86_64                         6.6.2-1                                   /grafana-6.6.2-1.x86_64                         174 M
Installing for dependencies:
 dejavu-fonts-common                                          noarch                         2.33-6.el7                                ol7_latest                                       64 k
 dejavu-sans-fonts                                            noarch                         2.33-6.el7                                ol7_latest                                      1.4 M
 fontconfig                                                   x86_64                         2.13.0-4.3.el7                            ol7_latest                                      254 k
 libICE                                                       x86_64                         1.0.9-9.el7                               ol7_latest                                       66 k
 libSM                                                        x86_64                         1.2.2-2.el7                               ol7_latest                                       39 k
 libX11                                                       x86_64                         1.6.7-2.el7                               ol7_latest                                      606 k
 libX11-common                                                noarch                         1.6.7-2.el7                               ol7_latest                                      164 k
 libXau                                                       x86_64                         1.0.8-2.1.el7                             ol7_latest                                       28 k
 libXcursor                                                   x86_64                         1.1.15-1.el7                              ol7_latest                                       30 k
 libXext                                                      x86_64                         1.3.3-3.el7                               ol7_latest                                       38 k
 libXfixes                                                    x86_64                         5.0.3-1.el7                               ol7_latest                                       18 k
 libXi                                                        x86_64                         1.7.9-1.el7                               ol7_latest                                       40 k
 libXinerama                                                  x86_64                         1.1.3-2.1.el7                             ol7_latest                                       13 k
 libXmu                                                       x86_64                         1.1.2-2.el7                               ol7_latest                                       70 k
 libXrandr                                                    x86_64                         1.5.1-2.el7                               ol7_latest                                       27 k
 libXrender                                                   x86_64                         0.9.10-1.el7                              ol7_latest                                       25 k
 libXt                                                        x86_64                         1.1.5-3.el7                               ol7_latest                                      172 k
 libXxf86misc                                                 x86_64                         1.0.3-7.1.el7                             ol7_latest                                       19 k
 libXxf86vm                                                   x86_64                         1.1.4-1.el7                               ol7_latest                                       17 k
 libfontenc                                                   x86_64                         1.1.3-3.el7                               ol7_latest                                       30 k
 libxcb                                                       x86_64                         1.13-1.el7                                ol7_latest                                      213 k
 urw-base35-bookman-fonts                                     noarch                         20170801-10.el7                           ol7_latest                                      852 k
 urw-base35-c059-fonts                                        noarch                         20170801-10.el7                           ol7_latest                                      879 k
 urw-base35-d050000l-fonts                                    noarch                         20170801-10.el7                           ol7_latest                                       74 k
 urw-base35-fonts                                             noarch                         20170801-10.el7                           ol7_latest                                      7.1 k
 urw-base35-fonts-common                                      noarch                         20170801-10.el7                           ol7_latest                                       18 k
 urw-base35-gothic-fonts                                      noarch                         20170801-10.el7                           ol7_latest                                      649 k
 urw-base35-nimbus-mono-ps-fonts                              noarch                         20170801-10.el7                           ol7_latest                                      796 k
 urw-base35-nimbus-roman-fonts                                noarch                         20170801-10.el7                           ol7_latest                                      860 k
 urw-base35-nimbus-sans-fonts                                 noarch                         20170801-10.el7                           ol7_latest                                      1.3 M
 urw-base35-p052-fonts                                        noarch                         20170801-10.el7                           ol7_latest                                      977 k
 urw-base35-standard-symbols-ps-fonts                         noarch                         20170801-10.el7                           ol7_latest                                       39 k
 urw-base35-z003-fonts                                        noarch                         20170801-10.el7                           ol7_latest                                      274 k
 xorg-x11-font-utils                                          x86_64                         1:7.5-21.el7                              ol7_latest                                      104 k
 xorg-x11-server-utils                                        x86_64                         7.7-20.el7                                ol7_latest                                      178 k

Transaction Summary
=============================================================================================================================================================================================
Install  1 Package (+35 Dependent packages)

Total size: 184 M
Total download size: 10 M
Installed size: 196 M
Is this ok [y/d/N]: y
Downloading packages:
(1/35): dejavu-fonts-common-2.33-6.el7.noarch.rpm                                                                                                                     |  64 kB  00:00:00
(2/35): fontconfig-2.13.0-4.3.el7.x86_64.rpm                                                                                                                          | 254 kB  00:00:00
(3/35): libICE-1.0.9-9.el7.x86_64.rpm                                                                                                                                 |  66 kB  00:00:00
(4/35): libSM-1.2.2-2.el7.x86_64.rpm                                                                                                                                  |  39 kB  00:00:00
(5/35): dejavu-sans-fonts-2.33-6.el7.noarch.rpm                                                                                                                       | 1.4 MB  00:00:00
(6/35): libX11-1.6.7-2.el7.x86_64.rpm                                                                                                                                 | 606 kB  00:00:00
(7/35): libX11-common-1.6.7-2.el7.noarch.rpm                                                                                                                          | 164 kB  00:00:00
(8/35): libXau-1.0.8-2.1.el7.x86_64.rpm                                                                                                                               |  28 kB  00:00:00
(9/35): libXcursor-1.1.15-1.el7.x86_64.rpm                                                                                                                            |  30 kB  00:00:00
(10/35): libXext-1.3.3-3.el7.x86_64.rpm                                                                                                                               |  38 kB  00:00:00
(11/35): libXfixes-5.0.3-1.el7.x86_64.rpm                                                                                                                             |  18 kB  00:00:00
(12/35): libXi-1.7.9-1.el7.x86_64.rpm                                                                                                                                 |  40 kB  00:00:00
(13/35): libXinerama-1.1.3-2.1.el7.x86_64.rpm                                                                                                                         |  13 kB  00:00:00
(14/35): libXmu-1.1.2-2.el7.x86_64.rpm                                                                                                                                |  70 kB  00:00:00
(15/35): libXrandr-1.5.1-2.el7.x86_64.rpm                                                                                                                             |  27 kB  00:00:00
(16/35): libXrender-0.9.10-1.el7.x86_64.rpm                                                                                                                           |  25 kB  00:00:00
(17/35): libXt-1.1.5-3.el7.x86_64.rpm                                                                                                                                 | 172 kB  00:00:00
(18/35): libXxf86misc-1.0.3-7.1.el7.x86_64.rpm                                                                                                                        |  19 kB  00:00:00
(19/35): libXxf86vm-1.1.4-1.el7.x86_64.rpm                                                                                                                            |  17 kB  00:00:00
(20/35): libfontenc-1.1.3-3.el7.x86_64.rpm                                                                                                                            |  30 kB  00:00:00
(21/35): libxcb-1.13-1.el7.x86_64.rpm                                                                                                                                 | 213 kB  00:00:00
(22/35): urw-base35-bookman-fonts-20170801-10.el7.noarch.rpm                                                                                                          | 852 kB  00:00:00
(23/35): urw-base35-c059-fonts-20170801-10.el7.noarch.rpm                                                                                                             | 879 kB  00:00:00
(24/35): urw-base35-d050000l-fonts-20170801-10.el7.noarch.rpm                                                                                                         |  74 kB  00:00:00
(25/35): urw-base35-fonts-20170801-10.el7.noarch.rpm                                                                                                                  | 7.1 kB  00:00:00
(26/35): urw-base35-fonts-common-20170801-10.el7.noarch.rpm                                                                                                           |  18 kB  00:00:00
(27/35): urw-base35-gothic-fonts-20170801-10.el7.noarch.rpm                                                                                                           | 649 kB  00:00:00
(28/35): urw-base35-nimbus-mono-ps-fonts-20170801-10.el7.noarch.rpm                                                                                                   | 796 kB  00:00:00
(29/35): urw-base35-nimbus-roman-fonts-20170801-10.el7.noarch.rpm                                                                                                     | 860 kB  00:00:00
(30/35): urw-base35-nimbus-sans-fonts-20170801-10.el7.noarch.rpm                                                                                                      | 1.3 MB  00:00:00
(31/35): urw-base35-p052-fonts-20170801-10.el7.noarch.rpm                                                                                                             | 977 kB  00:00:00
(32/35): urw-base35-standard-symbols-ps-fonts-20170801-10.el7.noarch.rpm                                                                                              |  39 kB  00:00:00
(33/35): urw-base35-z003-fonts-20170801-10.el7.noarch.rpm                                                                                                             | 274 kB  00:00:00
(34/35): xorg-x11-font-utils-7.5-21.el7.x86_64.rpm                                                                                                                    | 104 kB  00:00:00
(35/35): xorg-x11-server-utils-7.7-20.el7.x86_64.rpm                                                                                                                  | 178 kB  00:00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                         40 MB/s |  10 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : urw-base35-fonts-common-20170801-10.el7.noarch                                                                                                                           1/36
  Installing : libICE-1.0.9-9.el7.x86_64                                                                                                                                                2/36
  Installing : libSM-1.2.2-2.el7.x86_64                                                                                                                                                 3/36
  Installing : libfontenc-1.1.3-3.el7.x86_64                                                                                                                                            4/36
  Installing : 1:xorg-x11-font-utils-7.5-21.el7.x86_64                                                                                                                                  5/36
  Installing : libXau-1.0.8-2.1.el7.x86_64                                                                                                                                              6/36
  Installing : libxcb-1.13-1.el7.x86_64                                                                                                                                                 7/36
  Installing : libX11-common-1.6.7-2.el7.noarch                                                                                                                                         8/36
  Installing : libX11-1.6.7-2.el7.x86_64                                                                                                                                                9/36
  Installing : libXext-1.3.3-3.el7.x86_64                                                                                                                                              10/36
  Installing : libXrender-0.9.10-1.el7.x86_64                                                                                                                                          11/36
  Installing : libXt-1.1.5-3.el7.x86_64                                                                                                                                                12/36
  Installing : libXmu-1.1.2-2.el7.x86_64                                                                                                                                               13/36
  Installing : libXrandr-1.5.1-2.el7.x86_64                                                                                                                                            14/36
  Installing : libXinerama-1.1.3-2.1.el7.x86_64                                                                                                                                        15/36
  Installing : libXxf86misc-1.0.3-7.1.el7.x86_64                                                                                                                                       16/36
  Installing : libXxf86vm-1.1.4-1.el7.x86_64                                                                                                                                           17/36
  Installing : libXi-1.7.9-1.el7.x86_64                                                                                                                                                18/36
  Installing : libXfixes-5.0.3-1.el7.x86_64                                                                                                                                            19/36
  Installing : libXcursor-1.1.15-1.el7.x86_64                                                                                                                                          20/36
  Installing : xorg-x11-server-utils-7.7-20.el7.x86_64                                                                                                                                 21/36
  Installing : dejavu-fonts-common-2.33-6.el7.noarch                                                                                                                                   22/36
  Installing : dejavu-sans-fonts-2.33-6.el7.noarch                                                                                                                                     23/36
  Installing : fontconfig-2.13.0-4.3.el7.x86_64                                                                                                                                        24/36
  Installing : urw-base35-z003-fonts-20170801-10.el7.noarch                                                                                                                            25/36
  Installing : urw-base35-p052-fonts-20170801-10.el7.noarch                                                                                                                            26/36
  Installing : urw-base35-nimbus-roman-fonts-20170801-10.el7.noarch                                                                                                                    27/36
  Installing : urw-base35-c059-fonts-20170801-10.el7.noarch                                                                                                                            28/36
  Installing : urw-base35-d050000l-fonts-20170801-10.el7.noarch                                                                                                                        29/36
  Installing : urw-base35-nimbus-mono-ps-fonts-20170801-10.el7.noarch                                                                                                                  30/36
  Installing : urw-base35-bookman-fonts-20170801-10.el7.noarch                                                                                                                         31/36
  Installing : urw-base35-nimbus-sans-fonts-20170801-10.el7.noarch                                                                                                                     32/36
  Installing : urw-base35-standard-symbols-ps-fonts-20170801-10.el7.noarch                                                                                                             33/36
  Installing : urw-base35-gothic-fonts-20170801-10.el7.noarch                                                                                                                          34/36
  Installing : urw-base35-fonts-20170801-10.el7.noarch                                                                                                                                 35/36
  Installing : grafana-6.6.2-1.x86_64                                                                                                                                                  36/36
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
 sudo /bin/systemctl daemon-reload
 sudo /bin/systemctl enable grafana-server.service
### You can start grafana-server by executing
 sudo /bin/systemctl start grafana-server.service
POSTTRANS: Running script
  Verifying  : libXext-1.3.3-3.el7.x86_64                                                                                                                                               1/36
  Verifying  : 1:xorg-x11-font-utils-7.5-21.el7.x86_64                                                                                                                                  2/36
  Verifying  : fontconfig-2.13.0-4.3.el7.x86_64                                                                                                                                         3/36
  Verifying  : libXinerama-1.1.3-2.1.el7.x86_64                                                                                                                                         4/36
  Verifying  : libXrender-0.9.10-1.el7.x86_64                                                                                                                                           5/36
  Verifying  : urw-base35-z003-fonts-20170801-10.el7.noarch                                                                                                                             6/36
  Verifying  : libXxf86misc-1.0.3-7.1.el7.x86_64                                                                                                                                        7/36
  Verifying  : libXxf86vm-1.1.4-1.el7.x86_64                                                                                                                                            8/36
  Verifying  : urw-base35-p052-fonts-20170801-10.el7.noarch                                                                                                                             9/36
  Verifying  : urw-base35-nimbus-roman-fonts-20170801-10.el7.noarch                                                                                                                    10/36
  Verifying  : libXi-1.7.9-1.el7.x86_64                                                                                                                                                11/36
  Verifying  : libXt-1.1.5-3.el7.x86_64                                                                                                                                                12/36
  Verifying  : libICE-1.0.9-9.el7.x86_64                                                                                                                                               13/36
  Verifying  : grafana-6.6.2-1.x86_64                                                                                                                                                  14/36
  Verifying  : urw-base35-c059-fonts-20170801-10.el7.noarch                                                                                                                            15/36
  Verifying  : urw-base35-d050000l-fonts-20170801-10.el7.noarch                                                                                                                        16/36
  Verifying  : dejavu-fonts-common-2.33-6.el7.noarch                                                                                                                                   17/36
  Verifying  : libX11-1.6.7-2.el7.x86_64                                                                                                                                               18/36
  Verifying  : libX11-common-1.6.7-2.el7.noarch                                                                                                                                        19/36
  Verifying  : libxcb-1.13-1.el7.x86_64                                                                                                                                                20/36
  Verifying  : urw-base35-fonts-common-20170801-10.el7.noarch                                                                                                                          21/36
  Verifying  : urw-base35-fonts-20170801-10.el7.noarch                                                                                                                                 22/36
  Verifying  : urw-base35-nimbus-mono-ps-fonts-20170801-10.el7.noarch                                                                                                                  23/36
  Verifying  : dejavu-sans-fonts-2.33-6.el7.noarch                                                                                                                                     24/36
  Verifying  : libXmu-1.1.2-2.el7.x86_64                                                                                                                                               25/36
  Verifying  : libXrandr-1.5.1-2.el7.x86_64                                                                                                                                            26/36
  Verifying  : urw-base35-bookman-fonts-20170801-10.el7.noarch                                                                                                                         27/36
  Verifying  : urw-base35-nimbus-sans-fonts-20170801-10.el7.noarch                                                                                                                     28/36
  Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                                                                                                             29/36
  Verifying  : libSM-1.2.2-2.el7.x86_64                                                                                                                                                30/36
  Verifying  : libXcursor-1.1.15-1.el7.x86_64                                                                                                                                          31/36
  Verifying  : urw-base35-standard-symbols-ps-fonts-20170801-10.el7.noarch                                                                                                             32/36
  Verifying  : xorg-x11-server-utils-7.7-20.el7.x86_64                                                                                                                                 33/36
  Verifying  : libXfixes-5.0.3-1.el7.x86_64                                                                                                                                            34/36
  Verifying  : libfontenc-1.1.3-3.el7.x86_64                                                                                                                                           35/36
  Verifying  : urw-base35-gothic-fonts-20170801-10.el7.noarch                                                                                                                          36/36

Installed:
  grafana.x86_64 0:6.6.2-1

Dependency Installed:
  dejavu-fonts-common.noarch 0:2.33-6.el7                       dejavu-sans-fonts.noarch 0:2.33-6.el7                              fontconfig.x86_64 0:2.13.0-4.3.el7
  libICE.x86_64 0:1.0.9-9.el7                                   libSM.x86_64 0:1.2.2-2.el7                                         libX11.x86_64 0:1.6.7-2.el7
  libX11-common.noarch 0:1.6.7-2.el7                            libXau.x86_64 0:1.0.8-2.1.el7                                      libXcursor.x86_64 0:1.1.15-1.el7
  libXext.x86_64 0:1.3.3-3.el7                                  libXfixes.x86_64 0:5.0.3-1.el7                                     libXi.x86_64 0:1.7.9-1.el7
  libXinerama.x86_64 0:1.1.3-2.1.el7                            libXmu.x86_64 0:1.1.2-2.el7                                        libXrandr.x86_64 0:1.5.1-2.el7
  libXrender.x86_64 0:0.9.10-1.el7                              libXt.x86_64 0:1.1.5-3.el7                                         libXxf86misc.x86_64 0:1.0.3-7.1.el7
  libXxf86vm.x86_64 0:1.1.4-1.el7                               libfontenc.x86_64 0:1.1.3-3.el7                                    libxcb.x86_64 0:1.13-1.el7
  urw-base35-bookman-fonts.noarch 0:20170801-10.el7             urw-base35-c059-fonts.noarch 0:20170801-10.el7                     urw-base35-d050000l-fonts.noarch 0:20170801-10.el7
  urw-base35-fonts.noarch 0:20170801-10.el7                     urw-base35-fonts-common.noarch 0:20170801-10.el7                   urw-base35-gothic-fonts.noarch 0:20170801-10.el7
  urw-base35-nimbus-mono-ps-fonts.noarch 0:20170801-10.el7      urw-base35-nimbus-roman-fonts.noarch 0:20170801-10.el7             urw-base35-nimbus-sans-fonts.noarch 0:20170801-10.el7
  urw-base35-p052-fonts.noarch 0:20170801-10.el7                urw-base35-standard-symbols-ps-fonts.noarch 0:20170801-10.el7      urw-base35-z003-fonts.noarch 0:20170801-10.el7
  xorg-x11-font-utils.x86_64 1:7.5-21.el7                       xorg-x11-server-utils.x86_64 0:7.7-20.el7

Complete!

[root@grafanaoci ~]#

Now Install dependent libraries.

[root@grafanaoci ~]# yum install fontconfig -y
[root@grafanaoci ~]# yum install freetype* -y
[root@grafanaoci ~]# yum install urw-fonts -y

After the installation, we need to reload the systemd manager configuration before starting the Grafana service.

Run the following systemctl command.

[root@grafanaoci ~]# service grafana-server start
Starting grafana-server (via systemctl):
                                                           [  OK  ]

[root@grafanaoci ~]# /sbin/chkconfig --add grafana-server

[root@grafanaoci ~]# systemctl enable grafana-server.service
Created symlink from /etc/systemd/system/multi-user.target.wants/grafana-server.service to /usr/lib/systemd/system/grafana-server.service.

[root@grafanaoci ~]#

Next, start Grafana and then enable it to run automatically everytime the system boots up.

[root@grafanaoci ~]# systemctl start grafana-server

[root@grafanaoci ~]# systemctl enable grafana-server

[root@grafanaoci ~]# systemctl status grafana-server
? grafana-server.service - Grafana instance
   Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-02-27 15:28:34 GMT; 46s ago
     Docs: http://docs.grafana.org
 Main PID: 12015 (grafana-server)
   CGroup: /system.slice/grafana-server.service
           +-12015 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default.paths.logs=/var/log/grafana cfg:de...

Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="Initializing TracingService" logger=server
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="Initializing UsageStatsService" logger=server
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="Initializing CleanUpService" logger=server
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="Initializing NotificationService" logger=server
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="Initializing provisioningServiceImpl" logger=server
Feb 27 15:28:34 grafanaoci systemd[1]: Started Grafana instance.
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="Backend rendering via phantomJS" logger=rendering renderer=phantomJS
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=warn msg="phantomJS is deprecated and will be removed in a future release. You should consider...r=phantomJS
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="Initializing Stream Manager"
Feb 27 15:28:34 grafanaoci grafana-server[12015]: t=2020-02-27T15:28:34+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket=
Hint: Some lines were ellipsized, use -l to show in full.

[root@grafanaoci ~]#

Grafana is running on port 3000, So we need open the port in firewall.

[root@grafanaoci ~]# firewall-cmd --add-port=3000/tcp --permanent
success

[root@grafanaoci ~]# firewall-cmd --reload
success

Grafana installation on server has been successful. Now we can open  Grafana console in web-browser.

URL http://<Public IP>:3000

Note: In OCI Instance, we need to set Ingress rule for 3000 port to get Public IP accessible.

Log in to the Grafana Dashboard using default user ‘admin’ and password ‘admin’.

In next post, we can install Oracle Infrastucture OCI plugin and monitor the OCI environment from Grafana.

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Comments

  1. Pingback: Monitor a MySQL Database Service (MDS) DB System with Grafana - mortensi

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.