Installing Grafana v8.1.7 from source code on zLinux (s390x)
Build the Grafana Server
PRE-REQUISITES
- Create a working directory (hereafter called <work_dir>) for Grafana (In this example it is in ~/software/grafana_v8).
- Ensure make is installed by executing: make --version. If make is not installed please install it.
- GoLang Compiler (v1.17.1 or later): Ensure go is installed by executing: go version (If not installed follow this article to install GoLang v1.17.1 to folder /usr/local/go)
- Specify the following 'env' variables:
- export GO111MODULE=on
- export GOPATH=~/software/go-path (create this directory if required)
- export GOROOT=/usr/local/go (assuming go is installed here)
- export PATH=$GOPATH/bin:$GOROOT/bin:$PATH - NodeJS (v16.15.1) and Yarn (v1.22.19): Ensure NodeJS and Yarn are installed by executing: node --version && yarn --version (If not installed follow this article to install NodeJS v16.15.1)
- Execute the following:
- export PATH=$PATH:~/software/<node_install_dir>/bin
- export NODE_OPTIONS="--max-old-space-size=8192"
GET THE SOURCE CODE and INSTALL THE SERVER
From the <work_dir> download the source code of Grafana v8.1.7 using:
wget https://github.com/grafana/grafana/archive/refs/tags/v8.1.7.tar.gz
Extract it to the current directory (hereafter referred to as <grafana_root>) with:
sudo tar -C . -xzf v8.1.7.tar.gz
- Go to the path: <grafana_root> and execute: make run (this will install server)
- Once the server starts at port 3000, stop the server (press Cntrl+C) and proceed to next step
INSTALL AND START CLIENT
From the directory <grafana_root> execute the following (this might take a while to complete say a few minutes):
- yarn install --pure-lockfile - this will install client dependencies
- yarn start - this will build the client and start it. Once the client has started stop it (press Cntrl+C) and proceed to next step.
START THE SERVER
- (Optional Step) If you want to change the default Grafana port (3000), edit <grafana_root>/conf/default.ini and change the <http_port> value.
- Change directory to <grafana_root>/bin directory and execute: ./grafana-server - This will run the server at port <http_port> (default 3000).
- DONE!!! Open http://<server>:<port> in a browser to see the Grafana login screen. The default username, pwd is admin, admin respectively.
0 comments: