# PLG-Install-Script **Repository Path**: daitianci/plg-install-script ## Basic Information - **Project Name**: PLG-Install-Script - **Description**: Linux服务器Promtail、Loki、Grafana安装脚本。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://blog.csdn.net/ClancyLv/article/details/138346999?spm=1001.2014.3001.5502 - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-07-09 - **Last Updated**: 2024-07-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 详细安装请跳转:[ClancyLv](https://blog.csdn.net/ClancyLv/article/details/138346999?spm=1001.2014.3001.5502) install.sh添加可执行权限: chmod +x install.sh 一、Loki安装 1、Loki脚本安装命令(第一个参数:loki压缩包全名称;第二个参数:压缩包解压后绝对路径): 取消install.sh中loki_install "$1" "$2"注释 sh install.sh 'loki-linux-amd64.zip' '/usr/local/loki/data' 2、开放3100端口供Promtail推送日志 Loki服务启动命令: systemctl start loki.service Loki服务停止命令: systemctl stop loki.service Loki服务状态命令: systemctl status loki.service Loki服务重启命令: systemctl restart loki.service 二、Promtail安装 1、修改yaml配置 2、Promtail脚本安装命令(第一个参数:promtail压缩包全名称;第二个参数:压缩包解压后绝对路径): 取消install.sh中promtail_install "$1" "$2"注释 sh install.sh 'promtail-linux-amd64.zip' '/usr/local/promtail/data' Promtail服务启动命令: systemctl start promtail.service Promtail服务停止命令: systemctl stop promtail.service Promtail服务状态命令: systemctl status promtail.service Promtail服务重启命令: systemctl restart promtail.service 三、Grafana安装 1、Grafana安装 yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-10.4.2-1.x86_64.rpm 2、开放3000端口供用户访问页面 Grafana服务启动命令: systemctl start grafana-server.service Grafana服务停止命令: systemctl stop grafana-server.service Grafana服务状态命令: systemctl status grafana-server.service Grafana服务重启命令: systemctl restart grafana-server.service 访问grafana ui页面: 路径:http://ip:3000 用户名:admin(默认:admin) 密码:lyc@123(默认:admin)