[root@pg1 ~]# yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-10.0.1-1.x86_64.rpm Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. grafana-enterprise-10.0.1-1.x86_64.rpm | 84 MB 00:00:03 Examining /var/tmp/yum-root-k6XeeX/grafana-enterprise-10.0.1-1.x86_64.rpm: grafana-enterprise-10.0.1-1.x86_64 Marking /var/tmp/yum-root-k6XeeX/grafana-enterprise-10.0.1-1.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package grafana-enterprise.x86_64 0:10.0.1-1 will be installed --> Finished Dependency Resolution akopytov_sysbench/x86_64/signature | 833 B 00:00:00 akopytov_sysbench/x86_64/signature | 1.0 kB 00:00:00 !!! akopytov_sysbench-source/signature | 833 B 00:00:00 akopytov_sysbench-source/signature | 1.0 kB 00:00:00 !!! docker-ce-stable/7Server/x86_64 | 3.5 kB 00:00:00 docker-ce-stable/7Server/x86_64/primary_db | 152 kB 00:00:00 file:///media/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/repodata/repomd.xml" Trying other mirror. Dependencies Resolved ============================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================= Installing: grafana-enterprise x86_64 10.0.1-1 /grafana-enterprise-10.0.1-1.x86_64 305 M Transaction Summary ============================================================================================================================================================= Install 1 Package Total size: 305 M Installed size: 305 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : grafana-enterprise-10.0.1-1.x86_64 1/1 ### 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 : grafana-enterprise-10.0.1-1.x86_64 1/1 Installed: grafana-enterprise.x86_64 0:10.0.1-1 Complete! [root@pg1 ~]# systemctl status grafana-server.service ● grafana-server.service - Grafana instance Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; disabled; vendor preset: disabled) Active: inactive (dead) Docs: http://docs.grafana.org Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:29] Unknown lvalue 'ProtectControlGroups' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:31] Unknown lvalue 'ProtectHostname' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:32] Unknown lvalue 'ProtectKernelLogs' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:33] Unknown lvalue 'ProtectKernelModules' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:34] Unknown lvalue 'ProtectKernelTunables' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:35] Unknown lvalue 'ProtectProc' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:37] Unknown lvalue 'RemoveIPC' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:39] Unknown lvalue 'RestrictNamespaces' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:40] Unknown lvalue 'RestrictRealtime' in section 'Service' Sep 07 09:53:44 pg1 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:41] Unknown lvalue 'RestrictSUIDSGID' in section 'Service' [root@pg1 ~]# systemctl start grafana-server.service [root@pg1 ~]# systemctl status grafana-server.service ● grafana-server.service - Grafana instance Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; disabled; vendor preset: disabled) Active: active (running) since Sat 2024-09-07 09:54:57 CST; 2s ago Docs: http://docs.grafana.org Main PID: 4738 (grafana) Tasks: 12 CGroup: /system.slice/grafana-server.service └─4738 /usr/share/grafana/bin/grafana server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cf... Sep 07 09:54:57 pg1 grafana[4738]: logger=report t=2024-09-07T09:54:57.223565342+08:00 level=warn msg="Scheduling and sending of reports disable...o enable." Sep 07 09:54:57 pg1 grafana[4738]: logger=ngalert.state.manager t=2024-09-07T09:54:57.224000719+08:00 level=info msg="Warming state cache for startup" Sep 07 09:54:57 pg1 systemd[1]: Started Grafana instance. Sep 07 09:54:57 pg1 grafana[4738]: logger=http.server t=2024-09-07T09:54:57.226189861+08:00 level=info msg="HTTP Server Listen" address=[::]:300...l= socket= Sep 07 09:54:57 pg1 grafana[4738]: logger=sqlstore.transactions t=2024-09-07T09:54:57.235436249+08:00 level=info msg="Database locked, sleeping ...is locked" Sep 07 09:54:57 pg1 grafana[4738]: logger=ngalert.state.manager t=2024-09-07T09:54:57.246332496+08:00 level=info msg="State cache has been initi...22.33037ms Sep 07 09:54:57 pg1 grafana[4738]: logger=ticker t=2024-09-07T09:54:57.246404616+08:00 level=info msg=starting first_tick=2024-09-07T09:55:00+08:00 Sep 07 09:54:57 pg1 grafana[4738]: logger=ngalert.multiorg.alertmanager t=2024-09-07T09:54:57.246417262+08:00 level=info msg="starting MultiOrg Alertmanager" Sep 07 09:54:57 pg1 grafana[4738]: logger=grafana.update.checker t=2024-09-07T09:54:57.25289761+08:00 level=error msg="Update check failed" error="failed ... Sep 07 09:54:57 pg1 grafana[4738]: logger=plugins.update.checker t=2024-09-07T09:54:57.844678851+08:00 level=info msg="Update check succeeded" d...17.58013ms Hint: Some lines were ellipsized, use -l to show in full. [root@pg1 ~]# --修改中文 # Default UI language (supported IETF language tag, such as en-US) #default_language = en-US default_language = zh-Hans # Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash. home_page = # External user management external_manage_link_url = external_manage_link_name = external_manage_info = # Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard. viewers_can_edit = false # Editors can administrate dashboard, folders and teams they create editors_can_admin = false @ "/usr/share/grafana/conf/defaults.ini" 1894L, 74552C written [root@pg1 ~]# systemctl restart grafana-server.service [root@pg1 ~]#
标签:00,09,简单,systemd,grafana,pg1,server,安装 From: https://www.cnblogs.com/notonlydba/p/18401379