夜莺监控V6在MAC环境中二进制方式搭建

前些天用云服务使用二进制方式构建过一次夜莺v6的版本,不过还想再折腾一下,打算开始重新在mac本地环境上再搭建一下。你可以获得到的知识点包含: - mac查看硬件信息 - Homebrew方式安装mariadb - 查看端口占用-lsof命令 - 启动项管理-launchctl命令 - Homebrew方式安装redis - VictoriaMetrics单机版 - go环境安装以及vscode配置 - 夜莺n9e编译安装 - Categraf采集器编译安装
摘要由CSDN通过智能技术生成

前言

前些天用云服务使用二进制方式构建过一次夜莺v6的版本,不过还想再折腾一下,打算开始重新在mac本地环境上再搭建一下。你可以获得到的知识点包含:

  • mac查看硬件信息
  • Homebrew方式安装mariadb
  • 查看端口占用-lsof命令
  • 启动项管理-launchctl命令
  • Homebrew方式安装redis
  • VictoriaMetrics单机版安装
  • go环境安装以及vscode配置
  • 夜莺n9e编译安装
  • Categraf采集器编译安装

二进制方式构建

查看系统信息

system_profiler SPHardwareDataType

Hardware:

Hardware Overview:

  Model Name: MacBook Pro
  Model Identifier: MacBookPro18,3
  Model Number: x
  Chip: Apple M1 Pro
  Total Number of Cores: 8 (6 performance and 2 efficiency)
  Memory: 16 GB
  System Firmware Version: 8422.100.650
  OS Loader Version: 8422.100.650
  Serial Number (system): x
  Hardware UUID: x
  Provisioning UDID: x
  Activation Lock Status: x

uname -a

Darwin xxdeMacBook-Pro.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64	

sysctl machdep

machdep.cpu.cores_per_package: 8
machdep.cpu.core_count: 8
machdep.cpu.logical_per_package: 8
machdep.cpu.thread_count: 8
machdep.cpu.brand_string: Apple M1 Pro
machdep.user_idle_level: 0
machdep.wake_abstime: 5768706646558
machdep.time_since_reset: 135506147099
machdep.wake_conttime: 15606192945512
machdep.deferred_ipi_timeout: 64000
machdep.virtual_address_size: 47
machdep.report_phy_read_delay: 0
machdep.report_phy_write_delay: 0
machdep.trace_phy_read_delay: 0
machdep.trace_phy_write_delay: 0
machdep.report_phy_read_osbt: 0
machdep.report_phy_write_osbt: 0
machdep.phy_read_delay_panic: 0
machdep.phy_write_delay_panic: 0

数据库安装-mariadb

这里默认已经安装了Homebrew,如果没有请参考文末链接安装

brew info mariadb
==> mariadb: stable 10.11.3 (bottled)
Drop-in replacement for MySQL
https://mariadb.org/
Conflicts with:
mariadb-connector-c (because both install `mariadb_config`)
mysql (because mariadb, mysql, and percona install the same binaries)
mytop (because both install `mytop` binaries)
percona-server (because mariadb, mysql, and percona install the same binaries)
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/mariadb.rb
License: GPL-2.0-only
==> Dependencies
Build: bison ✘, cmake ✘, fmt ✘, pkg-config ✘
Required: groonga ✘, openssl@1.1 ✘, pcre2 ✔, zstd ✘
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

MySQL is configured to only allow connections from localhost by default

To restart mariadb after an upgrade:
brew services restart mariadb
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/mariadb/bin/mysqld_safe --datadir=/opt/homebrew/var/mysql

在下一步运行brew install时候发现不成:),按提示去安装了xcode

brew install mariadb
Error: No developer tools installed.
Install the Command Line Tools:
xcode-select --install

安装xcode

xcode-select --install
xcode-select: note: install requested for command line developer tools

在次尝试install

brew install mariadb
...
To restart mariadb after an upgrade:
brew services restart mariadb
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/mariadb/bin/mysqld_safe --datadir=/opt/homebrew/var/mysql

查看安装状态

brew services list

Name    Status User File
mariadb none

brew services info mariadb

mariadb (homebrew.mxcl.mariadb)
Running: ✘
Loaded: ✘
Schedulable: ✘

启动mysql-不建议(1)

mysql.server start
Starting MariaDB
230516 16:03:46 mysqld_safe Logging to '/opt/homebrew/var/mysql/bogon.err'.
230516 16:03:46 m
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值