1. nginx
nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server.
從niginx基本介紹上看到Other HTTP server features中有一項(xiàng):
- FLV and MP4 streaming;
可知nginx也支持流媒體.
2. brew
brew又叫Homebrew儿子,是Mac中的一款軟件包管理工具陌凳,通過brew可以很方便的在Mac中安裝軟件或者是卸載軟件.
一般Mac電腦會默認(rèn)安裝有brew.
常用指令如下:
- brew 搜索軟件
brew search nginx
- brew 安裝軟件
brew install nginx
- brew 卸載軟件
brew uninstall nginx
- brew 升級
sudo brew update
- 查看安裝信息(經(jīng)常用到, 比如查看安裝目錄等)
sudo brew info nginx
- 查看已經(jīng)安裝的軟件
brew list
3. brew安裝nginx
- 安裝nginx
可以用brew很方便地安裝nginx.
sudo brew install nginx
- 啟動(dòng)nginx服務(wù)
sudo brew services start nginx
利用http://localhost:8080
進(jìn)行訪問, 如果出現(xiàn)如下界面,說明啟動(dòng)成功.
- 查看nginx版本
nginx -v
- 關(guān)閉nginx服務(wù)
sudo brew services stop nginx
另外幾個(gè)比較方便的指令
- 重新加載nginx
nginx -s reload
- 停止nginx
nginx -s stop