I-WordPress ngaphezulu kwe-Lighttpd + APC ku-Squeeze (I)

amalambu alula ne-wordpress-logo

Sanibonani bangani! Ngikulethela isiphakamiso sokuthi ungayishicilela kanjani iBlog ngokususelwa ku-WordPress, ne-Lighty njengeseva yekhasi lewebhu, i-Spawn-FastCGI, i-PHP, i-APC Alternative PHP Cache (i-Alternative PHP Cache), nakho konke ku-Debian Squeeze. Ngiyacacisa ukuthi ukuhumusha engikwenzayo kusuka esiNgisini kuya kusiSpanish kukhululekile kimi futhi kungenzeka kunganembi ngokuphelele ngokombono wolimi noma wesemantic. Ngokwami, zanele kimi.

Madoda, le ndatshana imane nje “Isango lokungena”Emhlabeni othakazelisayo wokusiza amakhasi e-web amile kanye / noma ashukumisayo. Angiyena uchwepheshe kumaseva wewebhu. Kodwa-ke, abaningi sebevele bangibuze ukuthi iyiphi i-server oyithandayo, uFederico, neNginx, i-Lighty noma i-Apache? Ngihlala ngikuphendula ngakho ngakho konke lokhu okuthathu. Ngamunye unobuhle bawo futhi i-Apache yi-Apache. Kokuthunyelwe okuzayo sizobhekana nezixazululo ezinjengalezi ngeNginx ne-Apache. Ngendlela, kunamahemuhemu ku-www Village ngokuphela kukaLighty, futhi iqiniso ukuthi iDebian 7 isayigcina ezinqolobaneni zayo. Ngokuthile, akunjalo?

Sizobona:

  • Izincazelo zabaqalayo
  • Isixazululo Esinconyiwe sika-Lighty
  • Isixazululo sizobhekana naso
  • Idatha yesampula yedatha
  • Ukufaka amaphakheji adingekayo
  • Ukusetha nokuhlola

Izincazelo eziwusizo zabaqalayo

Amaseva wewebhu: Ngubuchwepheshe obunezinhlelo zekhompiyutha ezingacubunguli ezicubungula izinhlelo zokusebenza ezenza ukuxhumana okubhidlangile kanye / noma okungahambelani nokuvumelanisa noma ukuvumelanisa neklayenti, okwenza noma kudlulise impendulo kunoma yiluphi ulimi noma uhlelo lokusebenza lwecala lamakhasimende. […] Izinsizakalo zeWebhu zivele ngesidingo sokumisa ukuxhumana phakathi kwamapulatifomu ahlukahlukene (i-PC, i-Mainframe, i-Mac, njll.) Nezilimi zokuhlela (i-PHP, i-C, i-Java, njll.). Imizamo yangaphambilini yayenziwe ukudala amazinga kepha yehluleka noma ayiphumelelanga ngokwanele, eminye yayo i-DCOM ne-CORBA, njengoba incike ekusetshenzisweni komthengisi weDCOM - Microsoft, noCORBA - ORB. […] Naphezu kokunciphisa ukusetshenziswa kwezinsizakalo zeWebhu kuPhrothokholi ye-HTTP, izinsizakalo zeWebhu zazingakhelwanga umthetho olandelwayo othile, okusho ukuthi, akukho lutho olwavimbela ukusetshenziswa kwe-SOAP kwezinye izinqubo ze-Intanethi (i-SMTP, i-FTP, njll.). I-HTTP isetshenziswa kakhulu ngoba iyinkqubo esetshenziswa kabanzi futhi ivinjelwe izingcingo zomlilo (amachweba afana ne-FTP ngokuvamile avinjelwe, kepha kungenzeka ukuthi i-HTTP ivinjelwe).

I-Lighttpd: Iseva yeWebhu yezinhlelo zokusebenza ze-Unix / Linux ne-Microsoft Windows. Futhi wazi njenge Kuyakhanya, a okunye kuseva yewebhu Apache. Idizayinelwe ukuphepha, ukushesha (ngokushesha impela empeleni), ukuthobela izindinganiso, nokuvumelana nezimo. Ngokukhethekile yakhelwe ukuthatha imithwalo esindayo ngaphandle kokulahlekelwa ibhalansi usebenzisa i-RAM encane ne-CPU encane. Inikeza ngesivinini sokuphendula okuphezulu. Amanye amasayithi ayisebenzisayo yi-YouTube, iWikipedia namanye, asekela ithrafikhi enkulu. Isatshalaliswa ngaphansi kwelayisense le-BSD.

De WikipediaCGIIsixhumi esibonakalayo sokufaka esijwayelekile (ngesiNgisi Isango elijwayelekile, efushanisiwe i-CGI) ubuchwepheshe obubalulekile kwiWorld Wide Web evumela iklayenti (isiphequluli sewebhu) ukuthi icele idatha kuhlelo olusebenza kuseva yewebhu. I-CGI icacisa indinganiso yokudlulisa idatha phakathi kweklayenti nohlelo. Kuyindlela yokuxhumana phakathi kwesiphakeli sewebhu nohlelo lokusebenza lwangaphandle imiphumela yalo yokugcina yokwenza izinto ze-MIME. Izinhlelo zokusebenza ezisebenza kuseva zibizwa ngama-CGIs.

I-FastCGI umthetho olandelwayo wokuxhuma izinhlelo zokusebenzisana neseva yewebhu. I-FastCGI iyinhlobonhlobo ye-Common Gateway Interface eyaziwayo (CGI noma i-Common Input Interface). Inhloso enkulu ye-FastCGI ukunciphisa umthwalo ohambisana nokuxhuma iseva yewebhu nezinhlelo Common Gateway Interface, evumela iseva ukuthi inikeze izicelo eziningi ngasikhathi sinye.

Spawn, kuComputing kubhekisa kumsebenzi olayisha futhi usebenzise inqubo entsha yengane noma yengane. Inqubo yomzali noma yomzali ingalinda ukuthi inqubo yengane iqede, noma ingaqhubeka isebenze ngokuzikhandla. Ukudala izinqubo zezingane ezintsha kudinga inkumbulo eyanele ukwenza inqubo yomzali nenqubo yengane, noma izinqubo eziningi zezingane.

Isixazululo esinconyiwe emibhalweni ye-Official Wiki ye- I-Lighttpd ngokusebenza okuphezulu

Uma sifunda umqulu Amadokhumenti_ModFastCGI yesiza esishiwo ngenhla, kunesigaba okuthi, ngasohlangothini lwami, sihunyushwe ngokukhululeka ngeSpanishi, sithi:

Ukusabalalisa Kwangaphandle: Ukuqalisa izinqubo zokusabalalisa ze-FastCGI ngqo kuseva yekhasi lewebhu kunezinkinga ezithile ezifana nalezi:

  • Inqubo ye-FastCGI ingaqhutshwa kuseva yendawo kuphela.
  • Inemvume efanayo neseva yekhasi lewebhu.
  • Inenkomba efanayo eyisisekelo njengeseva yekhasi lewebhu.

Lapho sisebenzisa iseva I-FastCGI Hlukanisa -okanye Ngaphandle- ukuze sikhiphe umthwalo othile kuseva yewebhu, kufanele silawule inqubo ye-FastCGI ngohlelo lwangaphandle olufana ne- "umgudu-fcgi”. Uhlelo lwe- "spawn-fcgi" lusetshenziselwa ukuqala inqubo ye-FastCGI endaweni yalo, lungisa i- I-ID Yomsebenzisiiqembu-id, bese ushintshela kolunye umkhombandlela wezimpande (chroot).

Ngicacisa ukuthi ukuhunyushwa kwe- Spawn njengebizo "iqanda lokudla kwasolwandle”, Ngenkathi njengesenzo, Ukuzalela kusho okungaphezulu noma okuncane "kuzala ngaphandle”. AmaNgisi ayahlekisa uma esebenzisa lelo gama ekwenzeni ikhompyutha, akunjalo?

Izisekelo zezinhloso ezisebenzayo ngukuthi, ngesisombululo esihlongozwayo emibhalweni, inqubo ye-FastCGI kanye nezinqubo eziningi zesibili noma izingane (izinqubo zezingane) njengoba kudingeka kuzokwenziwa kuseva eyodwa noma ngaphezulu zangaphandle kwiseva yekhasi lewebhu. Lokho kwenziwa kuseva ehlukile kunaleyo esiyisebenzisa njengeseva yewebhu, nakanjani kuzobekwa umthwalo ophansi. Futhi ekugcineni, ukusebenzisa iseva yangaphandle ye-FastCGI, inqubo ye-FastCGI kufanele iqalwe futhi ilawulwe uhlelo umgudu-fcgi.

Ukusabalalisa kwangaphandle kungokwalabo abadinga ukufaka iseva eyodwa noma amaningi futhi bathathe inombolo enkulu yezicelo, njengakwisimo se-Internet Access Provider (ISP), noma amasayithi afana ne- blog.fromlinux.net, njll. Ukuchaza leso sixazululo ngokuningiliziwe kuphele ngokuphelele kokuthi Singafinyelela.

Isixazululo esizokhuluma ngaso eposini

Yiseva eyodwa kuphela ezokwamukela zonke izinsizakalo ezidingekayo. Iyasebenza futhi ilungele isiza esisebenza kancane, njenge-Enterprise LAN. Indlela echaziwe ingasebenza njengesiqondisi kulabo abadinga ukutholakala okukhulu nokuphepha.

Idatha yesampula yedatha

Igama: web.amigos.cu Ikheli le-IP: 192.168.10.20 Isizinda: amigos.cu

Vele, endaweni yokukhiqiza - futhi nokuhlola noma ekhaya - kufanele sibe namarekhodi DNS ngqo nokuguqula okubhekisele kuseva yethu.

Ukufaka amaphakheji adingekayo

Njengomsebenzisi izimpande senza:

ukufaneleka ukufaka i-lighttpd lighttpd-doc php5-cgi php5-gd ukufaneleka ukufaka i-mysql-server mysql-iklayenti php5-mysql

Amafayela wokumiswa okukhanyayo afakiwe ku- / njll / lighttpd. Uhlelo spwan-fcgi ifaka ngokuzenzakalela. Amafayela wephakheji yemibhalo angatholakala ku- / usr / share / doc / lighttpd-doc. Sincoma ngokuqinile ukufunda imibhalo, ebhalwe ngesiNgisi. Ngesikhathi sokufakwa kwephakeji i-mysql-server, basicela iphasiwedi yomsebenzisi izimpande ye-MySql. Sincoma ukusebenzisa iphasiwedi efanayo osuyimemezelile ngalowo msebenzisi.

Ukusetha nokuhlola

Njengoba senziwe ngokufakwa kokusekelwa kweWordPress, kufanele siqale ngokucushwa nokuhlolwa.

Sinika amandla amamojula alula:

i-lighttpd-eyenza-mod fastcgi-php service elula-vhost yokuqalisa kabusha kwe-lighttpd

Sihlola ukuthi iseva yethu iyasebenza yini. Sivula isiphequluli bese sibhala i-URLhttp://web.amigos.cu, futhi okungenani sizokwazi ukubhala uhlu lwemibhalo / var / www.

Index of /

NAME KUGCINYIWE NGOKUGCINA SIZE UHLOBO
Umhlahlandlela Wabazali /                  -            Directory
index.lighttpd.html                    2013-Jan-19 18:16:41               3.5K            umbhalo / html
Sinika amandla amamojula we-mod_rewrite ne mod_fast_cgi kufayela lokumisa elikhanyayo eliyinhloko /etc/lighttpd/lighttpd.conf:
nano /etc/lighttpd/lighttpd.conf

Sisusa ukuphawula noma uphawu lwe-hash # yini ephambi kwe- "Mod_rewrite" futhi sengeza ngezansi kwalowo mugqa "Mod_fastcgi", ukuze ukuqala kwefayela kube kanjena:

i-server.modules = ("mod_access", "mod_alias", "mod_compress", "mod_redirect", "mod_rewrite", "mod_fastcgi",)

Sibheka ukuthi i-PHP isebenza kahle. Ukwenza lokhu sakha ifayela (okwesikhashana) enkombeni / var / www:

nano /var/www/index.php

futhi okuqukethwe kwefayela langaphambilini kuzoba kuphela:


Ngemuva kwalokho siqala kabusha insiza:

ukuqala kabusha kwe-lighttpd service

Uma sikhomba kusiphequluli sethu ku http://web.amigos.cu, sizobona ikhasi lolwazi le-PHP Version 5.3.3-7. Ngakho-ke, konke kusebenza ngokufanele.

Kuyathakazelisa kakhulu ukwazi izinguquko ekucushweni okuLula ngemuva kokunika amandla imodyuli mod_fastcgi. Ngokusebenzisa ngaphansi /etc/lighttpd/conf-enabled/15-fastcgi-php.conf, singathola. Qhathanisa ukucushwa okufundwayo naleyo esemibhalo yephakheji I-lighttpd-doc.

Manje kufanele sitshele uLighty ukuthi iyiphi inkomba okufanele iqondise kuyo ithrafikhi nge-port 80, ngokumisa i-Virtual Host. Amanani esizowashintsha kufayela /etc/lighttpd/conf-enabled/10-simple-vhost.confZingezakho futhi zizophendula kuzici zokufakwa ngakunye. Sizokwamukela amanani wesikhombimsebenzisi sempande yeseva, kanye nomkhombandlela wezimpande zedokhumenti, okunconywa nguLighty ngokuzenzakalela futhi sizoguqula kuphela igama le-FQDN lomphathi obonakalayo.

nano /etc/lighttpd/conf-enabled/10-simple-vhost.conf

Futhi okuqukethwe kokugcina kwefayela kufanele kube (khumbula ukukuvumelanisa nezidingo zakho):

# /usr/share/doc/lighttpd-doc/simple-vhost.txt server.modules + = ("mod_simple_vhost") # # Impande yedokhumenti yomsingathi obonakalayo ingumbhalo-impande = ## elula-vhost.server-root + $ HTTP ["umphathi"] ​​+ simple-vhost.document-root simple-vhost.server-root = "/ srv" simple-vhost.document-root = "htdocs" # # umphathi ozenzakalelayo uma kungekho mphathi othunyelwe elula -vhost.default-host = "web.amigos.cu"

Ngemuva kokulondoloza ushintsho, siqhubeka nokwakha izinkomba ezidingekayo ngokuya ngalokho okwashiwo phambilini. Uhla lwemibhalo / srv yadalwa ngesikhathi sokufakwa kwe-Squeeze, ngakho-ke asidingi ukuyakha:

mkdir -p /srv/web.amigos.cu/htdocs

Njengoba sesivele simemezele kahle umphathi ophelele kanye nomkhombandlela ohambisana negama lethu lesizinda, singakwazi ukuhambisa ngamafayela enziwe ku- / var / www, bese sakha okusha. index.php inkambiso eyengeziwe enkombeni / htdocs o isiqondisi sezimpande semibhalo yokubamba ebonakalayo:

rm /var/www/index.* nano /srv/web.amigos.cu/htdocs/index.php

Sifaka okuqukethwe okulandelayo kufayela langaphambilini:

Sanibonani bangani! Impela konke kukhombisa ukuthi KULUNGILE

Songa izinguquko bese siqala kabusha insiza:

ukuqala kabusha kwe-lighttpd service

Masivuselele isiphequluli sethu futhi sihlole ukuthi ikhasi elibonisiwe liguquliwe futhi manje liyakhombisa, ngaphezu kokukhishwa komyalo phpinfo (), ukubingelela. Ngeke kudingeke ukuqala kabusha insiza ngokuzayo uma siguqula okuqukethwe kwe-index.php noma elinye ikhasi lewebhu. Lo msebenzi uzokwenziwa kuphela uma siguqula ukucushwa kwe-Lighty.

Futhi Halala Bangani!. Sesivele sine-Debian 6.0 Squeeze ngeseva yekhasi lewebhu le-Lighttpd elilungiselelwe ukusebenza nolimi lwe-PHP5 ne-MySql njengeseva yedathabheyisi. Futhi sinokulungiswa kwefayela le-Lighty Vhost elifanele ukuphatha izizinda eziningi.

Ukuqhubeka ...

Futhi-ke, nginjani? UMnu WordPress uzobuza. Silandele ku II ingxenye kanye ne- end nokuphela kwalesi sihloko.

Screenshot_lighttpd


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-3, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   eliotime3000 kusho

    Halala. Ngizoyisebenzisa kumshini wami obonakalayo.

    1.    phico kusho

      Ngiyabonga kakhulu ngokuphawula kwakho

  2.   Daniel kusho

    Nkulunkulu yeka ideskithophu enhle kangako ye-debian yakho ongasho konke okusebenzisele leso sihloko ngicela?