macos

mac系统下使用的包管理工具是homebrewpython

安装brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
卸载
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
安装其余工具mysql

安装软件,如:brew install oclint
卸载软件,如:brew uninstall oclint
搜索软件,如:brew search oclint
更新软件,如:brew upgrade oclint
查看安装列表, 如:brew list
更新Homebrew,如:brew update

安装redis

brew install redisgit

查看当前启动的服务
bews services listgithub

配置文件
/usr/local/etc/redis.confredis

启动redis-server
brew services start redis
使用launchctl启动/中止
launchctl load/unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
设置开机启动
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents/sql

进入客户端
redis-clidocker

python3

默认自带的py2
brew search python3
brew install python3ruby

关于brew长时间updating问题

切换git网络

cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git 
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git

关于安装py依赖环境提示pymssql错误

_mssql.c:314:10: fatal error: 'sqlfront.h' file not foundcurl

安装依赖

brew install freetds
pip install cython

mysql安装

在mysql官网下载相应的mysql版本包。双击安装便可,在安装的时候注意初始密码。安装完成以后在系统偏好设置最底下就会出现mysql服务,能够点击控制服务的启动与关闭
命令行启动关闭
/usr/local/mysql/support-files/mysql.server start
/usr/local/mysql/support-files/mysql.server stop

若是忘记了密码,须要进行重置。

进制mysql验证功能
sudo  /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
此时mysql服务会重启,
新启动一个命令窗口,进入mysql
/usr/local/mysql/bin/mysql
刷新权限
FLUSH PRIVILEGES; 
重置密码
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('你的新密码');

docker安装

brew安装
brew cask install docker
手动安装
下载相应的dmg镜像,安装便可
镜像加速鉴于国内网络问题,后续拉取 Docker 镜像十分缓慢,咱们能够须要配置加速器来解决,我使用的是网易的镜像地址:http://hub-mirror.c.163.com。

在任务栏点击 Docker for mac 应用图标 -> Perferences... -> Daemon -> Registry mirrors。在列表中填写加速器地址便可。修改完成以后,点击 Apply & Restart 按钮,Docker 就会重启并应用配置的镜像地址了

将win系统下的多余空间做为mac的扩展来存储文件

双系统下,mac是没法给win硬盘存储东西的,移动硬盘也不行,这是应为文件格式的缘由, 能够将多余空间做为mac的扩展,日志格式来存储文件 插入你的硬盘--点击Finder--应用程序--实用工具--磁盘工具--在左上角选择你的硬盘--而后正上方有四个选项(选择抹掉)--选择格式(选择Mac os扩展日志式)

相关文章
相关标签/搜索