mac下的常用環境配置

 

Mac下安裝home-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)"

---------------------

替換現有上游源

cd "$(brew --repo)" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git brew update

---------------------

MongoDB 安裝和配置

mongod --config /usr/local/etc/mongod.conf

/usr/local/Cellar/mongodb/3.4.0

brew services start mongodb

export MONGO_PATH=/usr/local/Cellar/mongodb

export PATH=$PATH:$MONGO_PATH/bin

---------------------

Nginx 安裝和配置

記住三個目錄;/usr/local/cellar(安裝目錄)   /usr/local/etc/nginx(配置文件路徑)   /usr/local/var()

進入sudo vim /usr/local/etc/nginx/nginx.conf

export NGINX_HOME=/usr/local/etc/nginx export PATH=$PATH:$NGINX_HOME/sbin

brew services start nginx

nginx -c /usr/local/etc/nginx/nginx.conf 啓動nginx(windows下start nginx);

nginx -s quit 停止ngix

nginx -s reload 重新載入nginx(當配置信息發生修改時)

nginx -s reopen 打開日誌文件

nginx -v 查看版本

nginx -t 查看nginx的配置文件的目錄

nginx -h 查看幫助信息

brew安裝 rtmp

brew tap denji/nginx

brew install nginx-full --with-rtmp-module /若安裝出錯,可根據提示操作

---------------------

libreoffice安裝

brew cask install libreoffice libreoffice-language-pack

安裝xcode

xcode-select --install

---------------------

mac系統設置

sudo spctl --master-disable 隱藏“允許任何來源的應用”選項問題

 

安裝Java8

brew tap caskroom/versions

brew cask install java8

brew cask uninstall java8

 

mac中顯示隱藏文件,終端輸入:

defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章