清理一下笔记本, 看到了很多之前写的东西,不是完全准确,仅供参考,欢迎交流…
mac 环境配置记录
安装homebrew
/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
https://juejin.im/post/5b42cbb15188251abf413ee6
更新和查看版本
brew update
brew -v
安装python3
brew install python3 (3.7.2)
安装pip
sudo pip install six --upgrade --ignore-installed six
sudo easy_install pip
pip install ipython
启动ipython
https://blog.csdn.net/weixin_40612082/article/details/82080727
https://blog.csdn.net/huxinguang_ios/article/details/78709428
python -m IPython --version
alias ipython=“python -m IPython”
sudo pip3 install ipython
Ipython — python2
Ipython3 — python3
安装虚拟环境:
https://www.jianshu.com/p/56e769f6b540
pip3 install virtualenv
pip3 show virtualenv
Name: virtualenv
Version: 16.2.0
Summary: Virtual Python Environment builder
Home-page: https://virtualenv.pypa.io/
Author: Ian Bicking
Author-email: ianb@colorstudy.com
License: MIT
Location: /usr/local/lib/python3.7/site-packages
Requires: setuptools
Required-by:
pip3 install virtualenvwrapper
mkdir ~/PyEnv
vim ~/.bash_profile,插入
export WORKON_HOME=~/PyEnv
source /usr/local/bin/virtualenvwrapper.sh
source ~/.bash_probile
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
/usr/local/bin/python3
Mac下安装mysql:
https://blog.csdn.net/bobohelloworld/article/details/79616683
https://blog.csdn.net/qq_35447305/article/details/78681361
cd /usr/local/mysql/bin
vim ~/.bash_profile
PATH=$PATH:/usr/local/mysql/bin
source ~/.bash_profile
Mac下安装 mongodb:
http://www.runoob.com/mongodb/mongodb-osx-install.html
cd /usr/local
sudo curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.2.tgz
sudo tar -zxvf mongodb-osx-x86_64-3.4.2.tgz
vim ~/.bash_profile
export PATH=/usr/local/mongodb/bin:$PATH
source ~/.bash_profile
创建一个数据库存储目录 /data/db:
sudo mkdir -p /data/db
启动 mongodb,默认数据库目录即为 /data/db:
sudo mongod
# 如果没有创建全局路径 PATH,需要进入以下目录
cd /usr/local/mongodb/bin
sudo ./mongod
再打开一个终端进入执行以下命令:
$ cd /usr/local/mongodb/bin
$ ./mongo
MongoDB shell version v3.4.2
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.2
Welcome to the MongoDB shell.
……
> 1 + 1
2
>
Mac下安装 redis
https://www.jianshu.com/p/3bdfda703552
brew install redis
如果需要后台运行 redis 服务,使用命令 brew services start redis
如果不需要后台服务,则使用命令 redis-server /usr/local/etc/redis.conf
gitlab配置
brew cask install switchhosts
sudo spctl --master-disable
Mac生成公钥
https://blog.csdn.net/wangjunling888/article/details/51115659