##
适合DBA的brew上手指南
1、brew安装
1.1、安装方法概述
https://brew.sh/
安装方法1:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
安装方法2:
用.pkg 安装器下载地址:https://github.com/Homebrew/brew
1.2、安装
#这里选择的是pkg的安装器,下一步>下一步就可以了
This package will install to:
⁃ /opt/homebrew on Apple Silicon
⁃ /usr/local/bin/brew and /usr/local/Homebrew on Intel
设置环境变量(Apple silicon和Intel的目录不一样)
[root@demodeMacBook-Air.local:/Users/demo]$vi .bash_profile
export PATH=/opt/homebrew/bin:$PATH
[root@demodeMacBook-Air.local:/Users/demo]$vi .zshrc
export PATH=/opt/homebrew/bin:$PATH
[root@demodeMacBook-Air.local:/Users/demo]$exit
logout
demo@demodeMacBook-Air ~ % source ~/.bash_profile
demo@demodeMacBook-Air ~ % source ~/.zshrc
demo@demodeMacBook-Air ~ % brew --version
Homebrew 4.4.25
1.3、测试
demo@demodeMacBook-Air ~ % brew install wget
demo@demodeMacBook-Air ~ % wget --version
GNU Wget 1.25.0 在 darwin22.6.0 上编译。
#下载太慢只能开代理或者更换源
2、数据库基础测试
#这里使用mysql
2.1、安装
demo@demodeMacBook-Air ~ % brew install mysql@8.4
...
==> mysql@8.4
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
mysql -u root
mysql@8.4 is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alter

最低0.47元/天 解锁文章
1740

被折叠的 条评论
为什么被折叠?



