1. 在官網下載下傳源檔案
在http://nginx.org/en/download.html下載下傳nginx
2. 解壓縮
tar -xzf nginx-1.2.5.tar.gz
3. 進入解壓後檔案目錄,修改操作權限
chmod a+rwx
4. 生成安裝配置
./configure --without-http_rewrite_module
5. make安裝
make install
6. 在/etc/profile中加入nginx目錄
export PATH=/usr/local/nginx/sbin:$PATH
7. 完成
which nginx