Mysql
安装homebrew
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
安装完查看版本
brew --version
搜索mysql
brew search mysql
安装mysql
brew install mysql@5.7
编辑环境变量
viim ~/.zprofile
添加环境变量
echo 'export PATH="/opt/homebrew/opt/mysql@5.7/bin:$PATH"' >> ~/.zprofile
echo 'export LDFLAGS="-L/opt/homebrew/opt/mysql@5.7/lib"' >> ~/.zprofile
echo 'export CPPFLAGS="-I/opt/homebrew/opt/mysql@5.7/include"' >> ~/.zprofile
更新环境变量
source ~/.zprofile
启动mysql并且登录
启动mysql
brew services start mysql@5.7
mysql -uroot
设置密码等
# 设置密码
SET PASSWORD = PASSWORD('ok');
# 设置用户的访问密码用不过期
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
#刷新权限
FLUSH PRIVILEGES;
Redis
安装redis
brew install redis
启动redis
brew services start redis
连接redis
redis-cli -h localhost -p 6379
配置文件目录
配置文件目录
cd /opt/homebrew/etc
open redis.conf
测试redis
redis-cli
set test 123
key*
Elasticsearch
下载地址
https://www.elastic.co/cn/downloads/elasticsearch
https://www.elastic.co/cn/downloads/kibana
解压然后进入Es的bin目录,双击执行
第一次启动成功后复制保存好kibana的code信息
进入kinaba的bin目录双击运行
输入es启动成功的那个code之后输入这个code(kinbada启动成功后有这个code)
kibana启动后查看
es启动后查看网址
ES启动后如果报错:
received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:56958}
Elasticsearch报错: received plaintext http traffic on an https channel, closing connection ...
解决方案:
https://blog.csdn.net/qq_25086397/article/details/124749039