Rov pib dua Apache ntawm Ubuntu, RedHat, Gentoo thiab lwm yam Linux Distros
Yog hais tias koj yog hosting koj lub website rau ntawm ib qhov chaw qhib, nws yog feem ntau tias qhov platform no yog Apache. Yog hais tias qhov no yog qhov teeb meem, thiab koj yog hosting nrog ib tug neeg rau zaub mov Apache, ces thaum koj nyob nraum ua haujlwm rau editing Apache httpd.conf cov ntaub ntawv lossis lwm configuration file (xws li muab ib tus tswv tsev tshiab virtual), koj yuav tsum tau Updated 10/22/07 / f.Triplett Apache kom koj cov kev hloov yuav siv tau. Qhov no yuav zoo li ntshai, tab sis luckily qhov no yooj yim heev ua.
Qhov tseeb, koj tuaj yeem ua tau li ntawm ib feeb (tsis suav lub sijhawm uas nws yuav nyeem cov ntawv no kom tau cov kauj ruam ntawm cov lus qhia qhia).
Pib Tau
Mus Updated 10/22/07/07 / f.Triplett koj cov neeg siv Internet Linux Apache, qhov zoo tshaj plaws yog siv qhov init.d command. Qhov kev hais no muaj nyob rau ntau qhov kev faib ntawm Linux nrog Red Hat, Ubuntu thiab Gentoo. Ntawm no yog li cas koj yuav ua li no:
- Tus ID nkag mus rau koj lub web server siv SSH los yog telnet thiab xyuas kom tseeb tias koj qhov system muaj qhov init.d command. Nws feem ntau pom muaj nyob rau hauv / etc directory, ces sau cov directory:
ls / etc / kuv *
- Yog tias koj cov neeg siv kev pabcuam siv init.d, koj yuav tau txais ib daim qhia txog cov ntaub ntawv initialization hauv cov ntawv teev npe uas teev ntawd. Saib apache los sis apache2 hauv daim nplaub tshev tom ntej. Yog tias koj muaj init.d, tab sis tsis txhob 't muaj Apache initialization ntaub ntawv, mus rau seem ntawm qhov tsab xov xwm nrog lub nqe uas nyeem \ "Restarting koj tus neeg rau zaub mov tsis muaj Init.d \", txwv tsis pub koj tseem.
- Yog tias koj muaj init.d thiab Apache initialization ntaub ntawv, ces koj tuaj yeem kho Apache siv qhov kev ua no:
/etc/init.d/apache2 reload
Koj yuav tsum tau sudo nyob rau hauv raws li hauv paus tus neeg siv khiav qhov kev hais kom ua.
Qhov Kev Xaiv Cov Hloov
Siv qhov kev xaiv kom rov zoo dua yog txoj kev zoo tshaj los qhib koj cov neeg ua hauj lwm Apache, vim nws ua rau cov neeg khiav dej num khiav (cov txheej txheem tsis raug tua thiab pib dua). Xwb, nws cia li reloads httpd.conf ntawv, uas feem ntau yog txhua yam koj xav ua nyob rau hauv no lom lawm.
Yog qhov kev xaiv rov qab tsis ua haujlwm rau koj, koj tuaj yeem sim siv cov lus hauv qab no:
- /etc/init.d/apache2 Updated 10/22/07/07 / f.Triplett - cov lus txib no tua cov txheej txheem neeg rau zaub mov thiab rov qab pib dua
- /etc/init.d/apache2 nres - cov lus txib no tua cov txheej txheem neeg rau zaub mov
- /etc/init.d/apache2 pib - qhov hais kom ua no pib rau cov neeg rau zaub mov (thiab yuav muab ib qho lus yuam kev yog tias tus neeg rau zaub mov twb khiav lawm)
Rov Qhib Koj Tus Neeg Txheeb Ze Tsis Muaj Init.d
Teb zoo! Lus hauv no teb OK, li no qhov twg peb thov koj hla mus yog tias koj cov neeg rau zaub mov tsis muaj init.d. Yog hais tias qhov no yog koj, tsis txhob poob siab, koj tseem muaj peev xwm pib dua koj cov neeg rau zaub mov. Koj tsuas tau ua nws manually nrog cov lus txib apachectl. Ntawm no yog cov kauj ruam rau qhov scenario no:
- Kev nkag mus rau koj lub web server cav siv SSH los yog telnet
- Khiav ntawm qhov kev pab cuam tswj fwm apache:
apachectl graceful
Koj yuav tsum tau sudo nyob rau hauv raws li hauv paus tus neeg siv khiav qhov kev hais kom ua.
Lub apachectl graceful hais kom qhia Apache hais tias koj xav mus Updated 10/22/07 / f.Triplett tus neeg rau zaub mov gracefully tsis muaj aborting sib txuas qhib. Nws yuav kuaj xyuas cov ntaub ntawv ua ntej yuav pib ua haujlwm pib dua kom ntseeg tau tias Apache tsis tuag.
Yog apachectl graceful tsis pib koj cov neeg rau zaub mov, nws muaj ob peb lwm yam koj sim tau.
- apachectl Updated 10 \ / 22 \ | Yog hais tias tus neeg rau zaub mov tsis khiav nws pib. Qhov kev hais no tseem sau txog kev ntsuas kom paub tseeb tias Apache yuav tsis tuag thaum nws rov ua haujlwm.
- apachectl nres kom nres lub Apache neeg rau zaub mov
- apachectl pib pib Apache neeg rau zaub mov (yuav muab ib qho lus yuam kev yog tias Apache khiav)
- apachectl configtest los ntsuam xyuas cov ntaub ntawv configuration syntax.
Cov lus qhia rau Restarting koj tus neeg rau zaub mov Apache:
- init.d reload thiab apachectl graceful leej reload cov ntaub ntawv configuration thiab gracefully Updated 10/22/07 / f.Triplett qhov web server. Cov kev sib txuas tam sim no raug tso cai. Qhov no yog qhov kev xav tau zoo tshaj thiab nws yuav tsum yog qhov koj sim ua ntej.
- init.d restart thiab apachectl restart reloads cov ntaub ntawv configuration thiab restarts. Cov kev sib txuas tam sim no raug kaw tam sim ntawd.
- Yog hais tias tus neeg rau zaub mov tsis khiav, cov lus txib no yuav pib.
- Yog hais tias ob qho no tsis ua raws li cov lus txib no, koj yuav tsum tua koj tus neeg ua hauj lwm Apache (kev siv sijhawm rau luv luv) nrog init.d lossis apachectl nres hais kom ua, tos tsawg 10 vib nas this thiab tom qab pib init.d pib pib apachectl
- Yog tias qhov ntawd tsis ua haujlwm, koj yuav tsum tau khiav ntawm koj cov ntaub ntawv teev kom paub tseeb tias tsis muaj teebmeem nrog lawv los ntawm kev khiav haujlwm apachectl graceful