InstallJa
銈ゃ兂銈广儓銉笺儷 | 銉€偢銉ャ兗銉 | 銈€儔銈兂 | 瑷畾 | 銈炽儫銉ャ儖銉嗐偅 | 銇濄伄浠栥伄鎯呭牨婧
Contents |
[edit] 銉愩偆銉娿儶銉儶銉笺偣
[edit] Linux銈凚SD鍚戙亼銇儞銉儔娓堛伩銉戙儍銈便兗銈
Linux銈凚SD銇銇忋伄銉囥偅銈广儓銉儞銉ャ兗銈枫儳銉炽仹銇疦ginx銇屻儜銉冦偙銉笺偢銉儩銈搞儓銉伀鍚伨銈屻仸銇娿倞銆侀氬父銇偨銉曘儓銈︺偋銈€偆銉炽偣銉堛兗銉墜娉曘仹銈ゃ兂銈广儓銉笺儷銇欍倠浜嬨亴銇с亶銇俱仚銆(Debian銇亰銇戙倠apt-get銈勩丟entoo銇亰銇戙倠emerge銆丗reeBSD銇亰銇戙倠ports銆丗edora 銇 yum銆乂ine Linux 銇 apt-get 銇仼锛
銇熴伨銇亾銈屻倝銇儜銉冦偙銉笺偢銇彜銇勩倐銇仹銇傘仯銇熴倞銇欍倠銇撱仺銇屻亗銈嬨伄銇ф皸銈掋仱銇戙仸銇忋仩銇曘亜銆傛渶鏂般伄姗熻兘銈勩儛銈颁慨姝g増銈掓眰銈併倠銇倝銆併偨銉笺偣銈炽兗銉夈亱銈夈儞銉儔銇欍倠銇撱仺銈掋亰鍕с倎銇椼伨銇欍
[edit] 銈儠銈c偡銉c儷 Red Hat/CentOS 鐢ㄣ儜銉冦偙銉笺偢
nginx 銇 yum 銉儩銈搞儓銉倰杩藉姞銇欍倠銇伅銆/etc/yum.repos.d/nginx.repo 銉曘偂銈ゃ儷銈掍綔鎴愩仐銆佷互涓嬨伄銇勩仛銈屻亱銇ō瀹氥倰璨笺倞銇ゃ亼銇︺亸銇犮仌銇:
CentOS:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
RHEL:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ gpgcheck=0 enabled=1
[edit] 銈儠銈c偡銉c儷 Debian/Ubuntu 鐢ㄣ儜銉冦偙銉笺偢
/etc/apt/sources.list 銇互涓嬨伄銇勩仛銈屻亱銇 apt-line 銈掕拷鍔犮仐銇︺亸銇犮仌銇:
Ubuntu 10.04:
deb http://nginx.org/packages/ubuntu/ lucid nginx deb-src http://nginx.org/packages/ubuntu/ lucid nginx
Debian 6:
deb http://nginx.org/packages/debian/ squeeze nginx deb-src http://nginx.org/packages/debian/ squeeze nginx
[edit] Ubuntu PPA
鏈鏂般伄瀹夊畾鐗 Nginx 銇 LaunchPad 涓娿伄 Nginx PPA 銇嬨倝鍙栧緱銇с亶銇俱仚銆
浠ヤ笅銇墜闋嗐倰瀹熻銇欍倠銇伅 root 妯╅檺銇屽繀瑕併仹銇欍
Ubuntu 10.04 浠ヤ笂:
sudo -s nginx=stable # use nginx=development for latest development version add-apt-repository ppa:nginx/$nginx apt-get update apt-get install nginx
銈傘仐 add-apt-repository 銇屽瓨鍦ㄣ仐銇亜銇ㄣ亜銇嗐偍銉┿兗銇岀櫤鐢熴仐銇熷牬鍚堛伅銆乸ython-software-properties 銈掋偆銉炽偣銉堛兗銉仚銈嬪繀瑕併亴銇傘倞銇嬨倐銇椼倢銇俱仜銈撱
銇濄伄浠栥伄 Debian/Ubuntu 銉欍兗銈广伄銉囥偅銈广儓銉儞銉ャ兗銈枫儳銉炽倰銇婁娇銇勩伄鍫村悎銇 lucid 鐗堛伄 PPA 銈掋亰瑭︺仐銇忋仩銇曘亜銆傚銇忋伄鍫村悎銆併亾銇儜銉冦偙銉笺偢銇彜銇勭挵澧冦仹銈傚嫊浣溿仐銇俱仚銆
sudo -s nginx=stable # use nginx=development for latest development version echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu lucid main" > /etc/apt/sources.list.d/nginx-$nginx-lucid.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C apt-get update apt-get install nginx
[edit] 銈儠銈c偡銉c儷 Win32銉愩偆銉娿儶
0.8.50 銇嬨倝 Nginx 銇 銈儠銈c偡銉c儷 Windows 銉愩偆銉娿儶 銇岀敤鎰忋仌銈屻仸銇勩伨銇欍
Windows 銉愩兗銈搞儳銉炽伅鐝剧姸銇с伅銉愩偆銉娿儶銇伩銇ф彁渚涖仌銈屻仸銇勩伨銇欍傘亾銈屻伅鐝剧姸銇竴閮ㄣ伄 Wine 銉勩兗銉仾銇┿倰銉撱儷銉夈儣銉偦銈广伀鍒╃敤銇椼仸銇勩倠銇熴倎銇с仚銆 浠婂緦銉撱儷銉夈儣銉偦銈广亴銈儶銉笺兂銈€儍銉椼仌銈屻仧鏅傜偣銇с併偨銉笺偣銈炽兗銉夈倐鎻愪緵銇曘倢銇俱仚銆 Igor 銇従鍦ㄣ伄銉撱儷銉夈偡銈广儐銉犮仹銇儞銉儔鍟忛銈掋偟銉濄兗銉堛仚銈嬩簣瀹氥伅銇傘倞銇俱仜銈撱
銈ゃ兂銈广儓銉笺儷:
cd c:\ unzip nginx-0.x.x.zip ren nginx-0.x.x nginx cd nginx start nginx
鍒跺尽:
nginx -s [ stop | quit | reopen | reload ]
鍟忛銇屻亗銇c仧鍫村悎銇 c:\nginx\logs\error.log 銇俱仧銇偆銉欍兂銉堛儹銈般倰鍙傜収銇椼仸銇忋仩銇曘亜銆
銇亰銆並evin Worthington銇屾渶鏂般伄闁嬬櫤銉栥儵銉炽儊銇Windows鐗堛倰淇濆畧銇椼仸銇勩伨銇欍
[edit] 銈姐兗銈广偝銉笺儔銉儶銉笺偣
Nginx 銇伅瀹夊畾鐗 (1.2.x)銆闁嬬櫤鐗 (1.y.x)銇鏃у畨瀹氱増 (1.0.x)銇 3 绋銇儛銉笺偢銉с兂銇屻亗銈娿伨銇欍 闁嬬櫤鐗堛儢銉┿兂銉併伕銇柊姗熻兘銈勩儛銈般儠銈c儍銈偣銇仚銇愩伀閬╃敤銇曘倢銇俱仚銇屻佹柊銇椼亜銉愩偘銇屽銇堛倠鍫村悎銈傘亗銈娿伨銇欍 闁嬬櫤鐗堛仹銇儛銈般儠銈c儍銈偣銇屽畨瀹氥仚銈嬨仺銆佸畨瀹氱増銉栥儵銉炽儊銇鏇淬亴銉愩儍銈儩銉笺儓銇曘倢銇俱仚銆 鏂版鑳姐伅蹇呫仛銇椼倐銉愩儍銈儩銉笺儓銇曘倢銈嬨仺銇檺銈娿伨銇涖倱銆
閫氬父銇畨瀹氱増銉儶銉笺偣銈掑埄鐢ㄣ仌銈屻倠銇撱仺銈掋亰銇欍仚銈併仐銇俱仚銆傘仐銇嬨仐銆侀氬父銇枊鐧虹増銉栥儵銉炽儊銈傚悓銇樸倛銇嗐伀瀹夊畾銇椼仸銇勩伨銇欍傝┏銇椼亸銇FAQ 銈掑弬鐓с仐銇︺亸銇犮仌銇勩
-
[edit] 瀹夊畾鐗
Nginx 1.2.0
2012骞4鏈23鏃
澶夋洿灞ユ -
[edit] 闁嬬櫤鐗
Nginx 1.1.19
2012骞4鏈12鏃
澶夋洿灞ユ -
[edit] Subversion
svn.nginx.org/nginx
瀹熼〒鐨勩仾鏂版鑳姐仺
銉愩偘淇銈掑惈銇裤伨銇
[edit] Nginx銈掋偨銉笺偣銈炽兗銉夈亱銈夈儞銉儔銇欍倠
銈姐兗銈广偝銉笺儔銈掑睍闁嬨仐銇熷緦銇亾銈屻倝銇偝銉炪兂銉夈倰銈裤兗銉熴儕銉亱銈夊疅琛屻仐銇俱仚銆
./configure make sudo make install
銉囥儠銈┿儷銉堛仹銇丯ginx銇/usr/local/nginx銇偆銉炽偣銉堛兗銉仌銈屻伨銇欍傘亾銈屻倰澶夋洿銇欍倠鍫村悎銈勪粬銇偑銉椼偡銉с兂銇仱銇勩仸銇 銈炽兂銉戙偆銉偑銉椼偡銉с兂銈掑弬鐓с仐銇︺亸銇犮仌銇勩
銇俱仧銆銈点兗銉夈儜銉笺儐銈c儮銈搞儱銉笺儷銇竴瑕銈傚弬鐓с仐銇︺亸銇犮仌銇勩傘亾銈屻倝銇疦ginx銇偝銉炽儜銈ゃ儷鏅傘伀涓绶掋伀銉撱儷銉夈仚銈嬪繀瑕併亴銇傘倞銇俱仚銆