FAQ

Page Discussion Edit History

ChsInstall

Nginx涓枃鏂囨。 > 瀹夎Nginx

Contents

棰勭紪璇戠増

Linux 鍜 BSD 鐨勯缂栬瘧鍖

澶ч儴鍒 Linux 鍙戣鐗堝拰 BSD 琛嶇敓鐗堢殑婧愰噷閮芥湁 Nginx锛屼娇鐢ㄩ氬父瀹夎鍏朵粬杞欢鐨勬柟寮忓嵆鍙畨瑁咃紙鍦 Debian 涓婄敤 apt-get锛孏entoo 涓婄敤 emerge锛孎reeBSD 涓婄敤 ports锛岀瓑绛夛級銆

璇锋敞鎰忚繖浜涘寘閫氬父涓嶆槸鏈鏂扮増鏈傚鏋滀綘鎯充娇鐢ㄦ渶鏂板姛鑳藉拰 Bug 淇锛屽缓璁粠婧愮爜缂栬瘧瀹夎锛堝疄闄呬笂锛岀紪璇戝畨瑁呬篃鐩稿綋绠鍗曪級銆

Win32 棰勭紪璇戝寘

鐜板湪nginx瀹樻柟宸茬粡鍙戝竷浜嗗畼鏂圭増鐨刵ginx/Win32浜嗭紝娆㈣繋澶у浣跨敤銆傚湪鍏堝墠Kevin Worthington 璐熻矗缁存姢涓涓 Windows 鐨勬渶鏂伴缂栬瘧鐗堝垎鏀紝濡傛灉鎮ㄥ凡缁忎範鎯簡浣跨敤杩欎釜鐗堟湰涔熷彲浠ラ夋嫨浣跨敤杩欎釜鐗堟湰鐨勩

婧愪唬鐮佸彂甯

Nginx 鏈変袱涓増鏈細绋冲畾鐗 (1.0.x), 鍜 鍘嗗彶绋冲畾鐗 (0.8.x)銆傚悓鏃讹紝鎴戜滑鍦╯vn涓篃鎻愪緵寮鍙戠増銆傚紑鍙戠増鍒嗘敮浼氳緝蹇幏寰楁柊鍔熻兘鍜岀己闄蜂慨澶嶏紝浣嗗悓鏃朵篃鍙兘閬囧埌鏂扮殑缂洪櫡銆備竴鏃︽洿鏂扮ǔ瀹氫笅鏉ワ紝灏变細琚姞鍏ョǔ瀹氱増鍒嗘敮銆傜劧鑰屾柊鍔熻兘涓嶄竴瀹氫細琚姞鍒版棫鐨勭ǔ瀹氱増涓幓銆

浣滀负鐢熶骇鐜锛岄氬父寤鸿浣跨敤绋冲畾鐗堬紝浣嗗叾瀹炲紑鍙戠増鏈篃鐩稿綋绋冲畾銆傚鏋滄偍鐨勭綉绔欎笉鏄熀浜嶧cgi锛屽缓璁娇鐢ㄥ紑鍙戠増銆傝鍙傝 FAQ

鏌ョ湅鎵鏈夌増鏈

浠庢簮浠g爜缂栬瘧 Nginx

鎶婃簮鐮佽В鍘嬬缉涔嬪悗锛屽湪缁堢閲岃繍琛屽涓嬪懡浠わ細

./configure
make
sudo make install

榛樿鎯呭喌涓嬶紝Nginx 浼氳瀹夎鍦 /usr/local/nginx銆傞氳繃璁惧畾缂栬瘧閫夐」锛屼綘鍙互鏀瑰彉杩欎釜璁惧畾銆

Nginx/Win32 瀹夎

涓轰簡瀹夎Nginx/Win32锛岄渶鍏堜笅杞藉畠銆傜劧鍚庤В鍘嬩箣锛岀劧鍚庤繍琛屽嵆鍙備笅闈互C鐩樻牴鐩綍涓轰緥璇存槑涓嬶細

  cd C:
  cd C:\nginx-0.8.54   start nginx

Nginx/Win32鏄繍琛屽湪涓涓帶鍒跺彴绋嬪簭锛岃岄潪windows鏈嶅姟鏂瑰紡鐨勩傛湇鍔″櫒鏂瑰紡鐩墠杩樻槸寮鍙戝皾璇曚腑锛孨ginx/Win32鍙互浣跨敤浠ヤ笅寮鍏虫潵绠$悊瀹冿細

  Nginx -s stop         蹇熷叧闂璑ginx锛屽彲鑳戒笉淇濆瓨鐩稿叧淇℃伅锛屽苟杩呴熺粓姝eb鏈嶅姟銆傦紙quick exit锛
  Nginx -s quit         骞崇ǔ鍏抽棴Nginx锛屼繚瀛樼浉鍏充俊鎭紝鏈夊畨鎺掔殑缁撴潫web鏈嶅姟銆傦紙graceful exit锛
  Nginx -s reload       鍥犳敼鍙樹簡Nginx鐩稿叧閰嶇疆锛岄渶瑕侀噸鏂板姞杞介厤缃岄噸杞姐傦紙changing configuration锛宻tart a new worker,quitting an old worker gracefully.)
  Nginx -s reopen       閲嶆柊鎵撳紑鏃ュ織鏂囦欢銆(reopenging log files)

鍙傝冭祫鏂

鏈枃鍘熷鏂囨。 Install鑻辨枃鏂囨。