vi /usr/local/etc/redis.conf
Add the line:
requirepass <your password>
And restart your redis service with brew services restart redis
.
macos: 16 items found.
vi /usr/local/etc/redis.conf
Add the line:
requirepass <your password>
And restart your redis service with brew services restart redis
.
Use find to list the current folder:
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
Add to ~/.bash_profile or ~/.zshrc
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
Or install the tree with brew
brew install tree
I installed the ansible via pip install
, and there are several issues here:
Here you should create a file ~/.ansible.cfg
[defaults]
inventory =~/.ansible/hosts
sudo_user=root
remote_port=22
host_key_checking=False
remote_user=root
log_path=~/.ansible/log/ansible.log
module_name=command
private_key_file=~/.ssh/id_rsa
mysql server was installed by brew install mysql
ERROR: Failed building wheel for mysqlclient
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?
对于容器的配置文件, docker-compose的还好理解,但是一到k8s,就有很多对象, pods, nodes, services, deployment... 每个基本上都有个yml的定义,其中的参数一看一脸茫然。
还好找到这个:kubectl explain xxx
可以看它的定义
如kubectl explain service --recursive
可以查看service定义的所有定段。
如kubectl explain svc.metadata.uid
可以查看某个字段的定义
当然,k8s官方也有一些examples: https://github.com/kubernetes/examples
先安装macos桌面版的docker
brew install kubernetes-cli --verbose
安装virtualbox
brew cask install minikube
如果有墙内,可以安装阿里云的版本
curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.1.1/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
启动minikube
minikube start --registry-mirror=https://registry.docker-cn.com
(可选)dashboard
minikube dashboard