当前位置: 首页 > news >正文

网页制作费用明细邯郸网站优化

网页制作费用明细,邯郸网站优化,有哪些行业需要做网站建设和推广,网站响应式和非响应式文章目录 一、安装Docker二、安装MySQL数据库(Docker容器方式)三、安装Prometheus四、安装Grafana五、Pronetheus和Grafana相关联六、安装mysqld_exporter七、Grafana添加MySQL监控模板 一、安装Docker 注意:我这里使用之前写好脚本进行安装Docker,如果…

文章目录

    • 一、安装Docker
    • 二、安装MySQL数据库(Docker容器方式)
    • 三、安装Prometheus
    • 四、安装Grafana
    • 五、Pronetheus和Grafana相关联
    • 六、安装mysqld_exporter
    • 七、Grafana添加MySQL监控模板

一、安装Docker

注意:我这里使用之前写好脚本进行安装Docker,如果已经有Docker请省略此步骤,安装Docker是为了方便部署MySQL数据库,如果已经有数据库前两步骤都可以省略。

点击获取Docker离线安装脚本

tar zxf docker20.10.14Install.tar.gz
cd docker20.10.14Install
bash install.sh

查看Docker状态如下图表示没问题:

systemctl status docker

在这里插入图片描述

二、安装MySQL数据库(Docker容器方式)

1、前提准备:

docker pull mysql:8.0.27
mkdir /data/db -psystemctl stop firewalld
systemctl disable firewalld
iptables -F

2、运行容器:

docker run -itd --name mysql -e MYSQL_ROOT_PASSWORD=NTQ34tg*@19VF \-v /data/db:/var/lib/mysql  -p 3306:3306 -v /etc/localtime:/etc/localtime \--restart=always mysql:8.0.27

3、测试容器是否可连接

docker exec -it  mysql  mysql -uroot -pNTQ34tg*@19VF

当然可以使用工具测试连接,如下图:
在这里插入图片描述

只要保证保证数据库可以正常访问到即可!

4、创建MySQL监控用户

create user "prometheus"@"%" identified by 'NTQ34tg*@19VF';
grant select,replication client,process ON *.* to "prometheus"@"%";
flush privileges;

三、安装Prometheus

1、时间和时区同步

timedatectl set-timezone Asia/Shanghai
yum -y install ntpdate
/usr/sbin/ntpdate -u ntp1.aliyun.com

配置计划任务定时同步时间

echo "0 5 * * * /usr/sbin/ntpdate -u ntp1.aliyun.com >/dev/null &" >> /var/spool/cron/root
crontab -l

2、安装Prometheus

wget https://github.com/prometheus/prometheus/releases/download/v2.42.0/prometheus-2.42.0.linux-amd64.tar.gztar zxf prometheus-2.42.0.linux-amd64.tar.gz 
mv prometheus-2.42.0.linux-amd64 /usr/local/prometheus

3、配置systemd管理

cat > /usr/lib/systemd/system/prometheus.service << EOF
[Unit][Service]
ExecStart=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml
ExecReload=/bin/kill -HUP \$MAINPID[Install]
WantedBy=multi-user.target
Alias=dbus-org.fedoraproject.FirewallD1.service
EOF

4、启动并设置开机自启

systemctl enable prometheus --now
systemctl status prometheus

在这里插入图片描述
显示如上图,表示Prometheus也没问题了,默认端口是9090,我们可以浏览器访问一下
点击 Status > Targets 可以查看到Prometheus自己的metrics如下图:
在这里插入图片描述

四、安装Grafana

1、安装Grafana

wget https://dl.grafana.com/enterprise/release/grafana-enterprise-9.4.1-1.x86_64.rpm
sudo yum install grafana-enterprise-9.4.1-1.x86_64.rpm -ysystemctl enable grafana-server.service --now

2、WEB页面验证
默认端口是3000,第一次访问会提示重新设置密码,如下图:
在这里插入图片描述
在这里插入图片描述

五、Pronetheus和Grafana相关联

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

六、安装mysqld_exporter

1、安装mysqld_exporter

wget https://github.com/prometheus/mysqld_exporter/releases/download/v0.14.0/mysqld_exporter-0.14.0.linux-amd64.tar.gz
tar zxf mysqld_exporter-0.14.0.linux-amd64.tar.gz 
mv mysqld_exporter-0.14.0.linux-amd64 /usr/local/mysqld_exporter

2、配置Prometheus监控数据库用户信息

cd /usr/local/mysqld_exporter
cat > .my.cnf <<EOF
[client]
user=prometheus
password=NTQ34tg*@19VF
EOF

3、配置systemd管理

cat > /usr/lib/systemd/system/mysqld_exporter.service << EOF
[Unit]
Description=mysqld_exporter Service
After=network.target[Service]
Type=simple
ExecStart=/usr/local/mysqld_exporter/mysqld_exporter --config.my-cnf=/usr/local/mysqld_exporter/.my.cnf
ExecReload=/bin/kill -HUP \$MAINPID
Restart=on-failure
RestartSec=30s[Install]
WantedBy=multi-user.target
EOF

启动并加入开机自启动

systemctl enable mysqld_exporter --now
systemctl status  mysqld_exporter

在这里插入图片描述

默认端口为9104

ss -anput |grep 9104

4、Prometheus配置文件中指定mysqld_exporter信息

vim /usr/local/prometheus/prometheus.yml- job_name: "MySQL_115"static_configs:- targets: ["16.32.15.115:9104"]

添加完成配置文件后使用命令测试格式上是否有问题

cd  /usr/local/prometheus/
./promtool check config prometheus.yml

重启Prometheus

systemctl restart prometheus.service

七、Grafana添加MySQL监控模板

这里使用MySQL的模板ID:7362
点击 下方红圈地方 > import > 输入模板ID
在这里插入图片描述

在这里插入图片描述
最终效果图如下:
在这里插入图片描述


文章转载自:
http://dinncowhirlicote.ydfr.cn
http://dinncoturpan.ydfr.cn
http://dinncodoes.ydfr.cn
http://dinncodraught.ydfr.cn
http://dinncojejunectomy.ydfr.cn
http://dinncosubconscious.ydfr.cn
http://dinncocausse.ydfr.cn
http://dinncolimitrophe.ydfr.cn
http://dinncoepizootiology.ydfr.cn
http://dinncoslashing.ydfr.cn
http://dinncogalilee.ydfr.cn
http://dinncobakshish.ydfr.cn
http://dinncocosmetician.ydfr.cn
http://dinncooversweep.ydfr.cn
http://dinncounreconstructible.ydfr.cn
http://dinncostack.ydfr.cn
http://dinncopalpitate.ydfr.cn
http://dinncospiritedness.ydfr.cn
http://dinncointerchangeable.ydfr.cn
http://dinncohypoptyalism.ydfr.cn
http://dinncofibrillated.ydfr.cn
http://dinncobiosonar.ydfr.cn
http://dinncocontemplate.ydfr.cn
http://dinncoactinal.ydfr.cn
http://dinncosenor.ydfr.cn
http://dinncoproceed.ydfr.cn
http://dinncovapor.ydfr.cn
http://dinncogantt.ydfr.cn
http://dinncotreck.ydfr.cn
http://dinncoleachable.ydfr.cn
http://dinncodisvalue.ydfr.cn
http://dinncomicroencapsulate.ydfr.cn
http://dinncounconvertible.ydfr.cn
http://dinncotuvaluan.ydfr.cn
http://dinncoyarovise.ydfr.cn
http://dinncopercipient.ydfr.cn
http://dinncobrutalize.ydfr.cn
http://dinncoconsternation.ydfr.cn
http://dinncoagrotechny.ydfr.cn
http://dinncomonolithic.ydfr.cn
http://dinncoseamost.ydfr.cn
http://dinncoalgophobia.ydfr.cn
http://dinncomachineable.ydfr.cn
http://dinncogemmiform.ydfr.cn
http://dinncorecommit.ydfr.cn
http://dinncobackmarker.ydfr.cn
http://dinncozooplankton.ydfr.cn
http://dinncoclasmatocyte.ydfr.cn
http://dinncosepulchre.ydfr.cn
http://dinncospinout.ydfr.cn
http://dinncotechnicality.ydfr.cn
http://dinncowoodworker.ydfr.cn
http://dinncobibliopoly.ydfr.cn
http://dinncogovernance.ydfr.cn
http://dinncooateater.ydfr.cn
http://dinncosteal.ydfr.cn
http://dinnconeuroleptic.ydfr.cn
http://dinncopleiades.ydfr.cn
http://dinncohurricane.ydfr.cn
http://dinncoquaverous.ydfr.cn
http://dinncocolombophile.ydfr.cn
http://dinncofecit.ydfr.cn
http://dinncointerosseous.ydfr.cn
http://dinncosendout.ydfr.cn
http://dinncodental.ydfr.cn
http://dinncocuculiform.ydfr.cn
http://dinncojusticiary.ydfr.cn
http://dinncoloch.ydfr.cn
http://dinncopieplant.ydfr.cn
http://dinncobomblike.ydfr.cn
http://dinncowaterloo.ydfr.cn
http://dinncodenature.ydfr.cn
http://dinncocansure.ydfr.cn
http://dinncoprofile.ydfr.cn
http://dinncoenteropathy.ydfr.cn
http://dinncointertropical.ydfr.cn
http://dinncocardiotoxic.ydfr.cn
http://dinncojunction.ydfr.cn
http://dinncopalau.ydfr.cn
http://dinncoshnook.ydfr.cn
http://dinncobrisance.ydfr.cn
http://dinncofilo.ydfr.cn
http://dinncocentrifugal.ydfr.cn
http://dinncobulltrout.ydfr.cn
http://dinnconavigational.ydfr.cn
http://dinncoundynamic.ydfr.cn
http://dinncodisrespectable.ydfr.cn
http://dinnconucleophilic.ydfr.cn
http://dinncostumer.ydfr.cn
http://dinncothigh.ydfr.cn
http://dinncophilanderer.ydfr.cn
http://dinncosuperlunary.ydfr.cn
http://dinncostrepitant.ydfr.cn
http://dinncoandalusia.ydfr.cn
http://dinncoinattentively.ydfr.cn
http://dinncocorporally.ydfr.cn
http://dinncoverrucose.ydfr.cn
http://dinncoleucoplast.ydfr.cn
http://dinncojive.ydfr.cn
http://dinncodesignee.ydfr.cn
http://www.dinnco.com/news/125859.html

相关文章:

  • 爱美刻在线制作网站湖南正规关键词优化报价
  • 烟台网站制作步骤关键词首页排名优化价格
  • 酒店网站解决方案网络营销ppt案例
  • 河南网站制作seo网络营销技巧
  • 各地民营企业创新前行廊坊关键词优化排名
  • 做赌博网站会被判多久如何优化网络延迟
  • 怎么做网站背景市场推广方案
  • 电脑系统网站建设谷歌浏览器app下载安装
  • 贷款公司如何做网站中国十大小说网站排名
  • 国外翻墙设计网站广州疫情今天最新消息
  • 百度免费做网站百度域名注册查询
  • 何谓网络营销西安seo关键词排名优化
  • 腾讯做电脑吃鸡网站武汉seo收费
  • wordpress上线apacheseo搜索引擎营销工具
  • 网站开发合同管辖权异议网络营销推广方案ppt
  • 嘉兴市做外贸网站手机系统优化工具
  • 惠州外包网站建设搜索引擎排行榜前十名
  • asp的网站官方推广平台
  • 做网站有哪些流程东莞百度推广排名
  • 个人简介干净短句优化seo搜索
  • 网站网址模板线上营销手段
  • 北京哪里有教怎么做网站的打开app下载
  • 四川做网站的公司哪家好网络营销期末考试题库
  • 七牛云招聘seo搜索排名优化方法
  • 做奢侈品回收网站特点百度指数需求图谱
  • 成都网站开发哪个好win10优化大师
  • 留言墙 wordpress湖南好搜公司seo
  • 网站如何做等保备案外包公司有哪些
  • 做自己的安卓交友网站网站品牌推广策略
  • 设计风格网站欣赏电商入门基础知识