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

张家界建设企业网站汕头百度网站推广

张家界建设企业网站,汕头百度网站推广,武汉大学人民医院挂号预约,商城高中夜莺 v8.0.0-beta.10 部署 1. mariadb-server2. Redis安装3. 下载 n9e-v8.0.0-beta.10-linux-amd64.tar.gz设置 root 用户密码配置文件 配置mariadb的登录密码导入数据库表结构配置为 systemd 启动服务重新加载 systemd配置日志 访问夜莺VictoriaMetrics 时序数据库安装接入数据…

夜莺 v8.0.0-beta.10 部署

  • 1. mariadb-server
  • 2. Redis安装
  • 3. 下载 n9e-v8.0.0-beta.10-linux-amd64.tar.gz
    • 设置 root 用户密码
    • 配置文件 配置mariadb的登录密码
    • 导入数据库表结构
    • 配置为 systemd 启动服务
    • 重新加载 systemd
    • 配置日志
  • 访问夜莺
  • VictoriaMetrics 时序数据库安装
  • 接入数据源 Prometheus
  • node_exporter 服务
  • 修改 prometheus 配置文件
  • 添加数据源

1. mariadb-server

sudo apt update
sudo apt install mariadb-server -y
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
# sudo mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.Enter current password for root (enter for none):
OK, successfully used password, moving on...Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.You already have your root account protected, so you can safely answer 'n'.Switch to unix_socket authentication [Y/n] n... skipping.You already have your root account protected, so you can safely answer 'n'.Change the root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] n... skipping.By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!
配置过程解析
1. 初始登录:
系统询问root用户当前密码(新安装时为空)
直接按回车
2. Unix Socket认证:
询问是否切换到unix_socket认证
你选择了n,保持当前的认证方式
3. Root密码:
询问是否更改root密码
你选择了y,并设置了新密码
系统成功更新密码并重载了权限表
4. 匿名用户:
询问是否移除匿名用户
你选择了y,成功移除了匿名用户账户
5. Root远程登录:
询问是否禁止root远程登录
你选择了n,允许root用户从远程登录
⚠️ 注意:在生产环境中,通常建议禁止root远程登录以提高安全性
6. 测试数据库:
询问是否移除测试数据库及其访问权限
你选择了y,成功删除了测试数据库及其权限
7. 重载权限表:
询问是否重载权限表使设置立即生效
你选择了y,成功应用了所有更改

2. Redis安装

sudo apt update
sudo apt install redis-server -y
sudo systemctl enable redis-server
sudo systemctl start redis-server
# redis-cli ping
PONG

3. 下载 n9e-v8.0.0-beta.10-linux-amd64.tar.gz

mkdir n9e
cd n9e
wget https://github.com/ccfos/nightingale/releases/download/v8.0.0-beta.10/n9e-v8.0.0-beta.10-linux-amd64.tar.gz
tar -zxvf n9e-v8.0.0-beta.10-linux-amd64.tar.gz

设置 root 用户密码

mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('1234');"

配置文件 配置mariadb的登录密码

# 夜莺的主配置文件是 etc/config.toml
grep "1234" etc/config.toml

导入数据库表结构

mysql -uroot -p1234 < n9e.sql

配置为 systemd 启动服务

vim /etc/systemd/system/n9e.service
[Unit]
Description=N9E Service
After=network.target[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/root/n9e
ExecStart=/root/n9e/n9e
Restart=on-failure
RestartSec=10
Environment="PATH=/usr/bin:/usr/local/bin"[Install]
WantedBy=multi-user.target

重新加载 systemd

systemctl daemon-reload
systemctl enable n9e
systemctl start n9e
systemctl status n9e
journalctl -fu n9e.service
# netstat -ntlp | grep n9e
tcp        0      0 127.0.0.1:40549         0.0.0.0:*               LISTEN      27860/n9e
tcp6       0      0 :::17000                :::*                    LISTEN      27860/n9e
tcp6       0      0 :::20090                :::*                    LISTEN      27860/n9e

配置日志

把日志输出到 logs 目录下,日志级别是 INFO,日志文件大小超过 256M 时,会自动切割,保留 3 个日志文件。

cat config.toml
[Log]
# log write dir
Dir = "logs"
# log level: DEBUG INFO WARNING ERROR
Level = "INFO"
# stdout, stderr, file
Output = "file"
# # rotate by time
# KeepHours = 4
# # rotate by size
RotateNum = 3
# # unit: MB
RotateSize = 256

访问夜莺

浏览器访问夜莺的端口,即 17000,默认用户是 root,密码是 root.2020

VictoriaMetrics 时序数据库安装

wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.21.0-victorialogs/victoria-logs-linux-amd64-v1.21.0-victorialogs.tar.gz
vim /etc/systemd/system/victoria-metrics-prod.service
[Unit]
Description=Victoria Metrics Service
After=network.target[Service]
Type=simple
ExecStart=/root/victoria-logs-prod -storageDataPath=/root/victoria-metrics-data -retentionPeriod=12
Restart=on-failure
SuccessExitStatus=0
LimitNOFILE=65536
StandardOutput=journal
StandardError=journal
SyslogIdentifier=victoriametrics[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable victoria-metrics-prod
systemctl start victoria-metrics-prod
systemctl status victoria-metrics-prod
journalctl -fu victoria-metrics-prod.service
wget https://github.com/prometheus/prometheus/releases/download/v3.3.0/prometheus-3.3.0.linux-amd64.tar.gz
wget https://github.com/prometheus/node_exporter/releases/download/v1.9.1/node_exporter-1.9.1.linux-amd64.tar.gz

接入数据源 Prometheus

  • 添加参数
    –web.enable-remote-write-receiver
vim /etc/systemd/system/prometheus.service
[Unit]
Description=prometheus service[Service]
User=root
ExecStart=/root/prometheus/prometheus \--config.file=/root/prometheus/prometheus.yml \--storage.tsdb.path=/root/prometheus/prometheus_data \--web.enable-lifecycle \--storage.tsdb.retention.time=90d \--web.enable-remote-write-receiverTimeoutStopSec=10
Restart=on-failure
RestartSec=5[Install]
WantedBy=multi-user.target
systemctl daemon-reload 
systemctl enable prometheus.service
systemctl restart prometheus.service 

node_exporter 服务

vim /etc/systemd/system/node_exporter.service
[Unit]
Description=node_exporter service[Service]
User=root
ExecStart=/root/node_exporter/node_exporter \--collector.textfile.directory=/root/node_exporter/textfileTimeoutStopSec=10
Restart=on-failure
RestartSec=5[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl restart node_exporter.service
systemctl enable node_exporter.service
systemctl status node_exporter.service

修改 prometheus 配置文件

cat prometheus.yml
scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.- job_name: "prometheus"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets: ["localhost:9090"]# 添加 node_exporter 的配置- job_name: "node_exporter"static_configs:- targets: ["localhost:9100"]
systemctl restart prometheus.service

添加数据源

在这里插入图片描述

http://www.cadmedia.cn/news/10446.html

相关文章:

  • 长春网页设计培训昆明网站seo优化
  • 网站建设项目预算表网络舆情软件免费入口
  • 苏州市城乡和建设局网站首页网络推销平台有哪些
  • 网站建设与管理试题答案东莞网站定制开发
  • 创建公司网页seo诊断服务
  • asp网站助手百度识图鉴你所见
  • 网站的基本建设投资搜索引擎营销是什么
  • windowxp做网站服务器模板建站常规流程
  • 郑州包装设计公司宁波seo优化公司排名
  • 深圳网页设计网页制作百度关键词如何优化
  • 重庆建站模板代理东莞seo
  • 30天网站建设实录教程市场调研的步骤
  • 合肥电子商务开发网站建设手机网站快速建站
  • 网站建设合同附件格式搜索关键词排行榜
  • 工作室暴利项目东莞网站关键词优化公司
  • 郑州网站建设企业企业网站搜索优化网络推广
  • 梨园网站建设如何创建自己的个人网站
  • 电子商务网站建设教程试卷百度高级搜索引擎入口
  • 玉泉营网站建设公司百度开户返点
  • 金乡网站建设百度热搜广告位
  • 宁波网站建设费用是多少钱地推团队如何收费
  • 专业政府网站建设最新疫情最新情况
  • 广东商城网站建设线上推广产品
  • 免费b2b信息平台seo推广绩效考核指标是什么
  • 惠州市网站建设搜索引擎优化关键词
  • 高职学院网站建设方案网站建设推广多少钱
  • 注册建筑劳务公司需要什么条件seo站长工具推广平台
  • 宣城网站建设价格网页制作学习
  • 和优网站建网站建设网站的推广方案的内容有哪些
  • 照明设计师南京seo推广