After installation, the ETC folder will create a new Grafana folder with the following structure:
[Root@hotlinking-spark-dev001-shgq sysconfig]# ls/etc/grafana/
grafana.ini ldap.toml
Grafana Environment files (envrionment file) are stored under/etc/sysconfig/grafana-server and can be modified to change the log storage address, data storage address, and other variables.
The SYSTEMD service file and Init.d script both use the file located at/etc/sysconfig/grafana-server for environment Vari Ables used when starting the back-end. Here's can override log directory, data directory and other variables.
The contents of the Grafana-server file are as follows:
Grafana_user=grafana
grafana_group=grafana
grafana_home=/usr/share/grafana
log_dir=/var/log/ Grafana
data_dir=/var/lib/grafana
max_open_files=10000
conf_dir=/etc/grafana
conf_file=/etc/ Grafana/grafana.ini
restart_on_upgrade=false
plugins_dir=/var/lib/grafana/plugins
Grafana configuration files (config file) are stored in/etc/grafana/grafana.ini, website configuration link, the link mentioned in $working_dir refers to/usr/share/ Grafana
The configuration file is located At/etc/grafana/grafana.ini
As you can see by diff,/usr/share/grafana/conf/default.ini is the same as/etc/grafana/grafana.ini content, except that the content of the latter is commented.
Specific configuration information is described in the relevant links, not detailed here.
Start the server
[Root@hotlinking-spark-dev001-shgq grafana]# Service grafana-server start
starting Grafana server: .... Ok
Related commands
[Root@hotlinking-spark-dev001-shgq grafana]# sudo service grafana-server-help
Usage:/etc/init.d/grafana-server {Start|stop|restart|force-reload|status}