Kukhazikitsa pulogalamu ya LAMP Software Suite pa Ubuntu

Pin
Send
Share
Send

Phukusi la mapulogalamu lotchedwa LAMP limaphatikizapo Linux kernel OS, seva ya Apache, seva ya MySQL, ndi zida za PHP zogwiritsidwa ntchito pa injini ya tsamba. Chotsatira, tifotokoza mwatsatanetsatane kukhazikitsa ndi kusintha koyambirira kwa zowonjezera izi, titenga mtundu waposachedwa wa Ubuntu monga chitsanzo.

Kukhazikitsa LAMP Software Suite ku Ubuntu

Popeza mawonekedwe a nkhaniyi akutanthauza kuti muli ndi Ubuntu woyika pakompyuta yanu, tidzadumpha sitepe iyi ndikupitilira mapulogalamu ena, komabe mutha kupeza malangizo pazomwe mungasangalale nazo powerenga zolemba zathu zotsatirazi.

Zambiri:
Ikani Ubuntu pa VirtualBox
Maulendo apamwamba a Linux kuchokera pagalimoto yaying'ono

Gawo 1: Ikani Apache

Tiyeni tiyambe ndi kukhazikitsa seva yotseguka yotchedwa Apache. Ndi imodzi mwazabwino kwambiri, chifukwa chake imakhala kusankha kwa ogwiritsa ntchito ambiri. Mu Ubuntu, zimayikidwa "Pokwelera":

  1. Tsegulani menyu ndikuyambitsa kontena kapena akanikizani chophatikiza Ctrl + Alt + T.
  2. Sinthani malo anu osungira kuti mukhale ndi zonse zofunikira. Kuti muchite izi, lembani lamulokukonda kwambiri.
  3. Zochita zonse kudzera wokonda imayendera ndi kulowa kwa mizu, onetsetsani kuti mwatchera dzina lanu lolowera (sizimawonekera mukalowa).
  4. Mukamaliza, lowanisudo apt-kukhazikitsa apache2kuwonjezera Apache kudongosolo.
  5. Tsimikizani kuwonjezera mafayilo onse posankha yankho D.
  6. Tiyeni tiyeze momwe seva yolumikizira intaneti ikuyenderasudo apache2ctl sintha.
  7. Maphatikizidwe amayenera kukhala abwinobwino, koma nthawi zina chenjezo limawonekera pakufunika kowonjezera Servername.
  8. Onjezani kusinthaku kwapadziko lonse ndi fayilo yosinthika kuti mupewe machenjezo amtsogolo. Yendetsani fayiloyo yokhasudo nano /etc/apache2/apache2.conf.
  9. Tsopano yendetsani chogwirizira chachiwiri, komwe mumayendetsere lamuloip addr yowonetsa eth0 | grep zolowera | awk '{kusindikiza $ 2; } '| sed 's / /kuti mudziwe adilesi yanu ya IP kapena seva ya seva.
  10. Poyamba "Pokwelera" pita pansi pansi pa fayilo lotseguka ndikulembaServerName + dzina lachifumu kapena adilesi ya IPkuti mwangophunzira. Sungani zosintha kudzera Ctrl + O ndikatseka fayilo yosinthira.
  11. Yesaninso kuti muwonetsetse kuti palibe zolakwika, kenako kuyambitsanso seva yanusudo systemctl restart apache2.
  12. Onjezani Apache ku autoload ngati kuli kofunikira kotero kuti ikuyamba ndi opareshoni pogwiritsa ntchito lamulosudo systemctl imapangitsa apache2.
  13. Zimangoyambitsa seva ya intaneti kuti muwone ngati kayendetsedwe ka ntchito yanu, gwiritsani ntchito lamulosudo systemctl amayamba apache2.
  14. Tsegulani msakatuli ndikupita kukhalid. Ngati mwafika pa tsamba lalikulu la Apache, ndiye kuti zonse zikuyenda bwino, pitani ku sitepe lotsatira.

Gawo 2: Ikani MySQL

Gawo lachiwiri ndikuwonjezera database ya MySQL, yomwe imachitidwanso kudzera mu console yokhazikika pogwiritsa ntchito malamulo omwe akupezeka mu dongosololi.

  1. Kuyika patsogolo "Pokwelera" lembanisudo apt-kukhazikitsa seva-sevandipo dinani Lowani.
  2. Tsimikizirani kuwonjezera kwamafayilo atsopano.
  3. Onetsetsani kuti mukuteteza zachilengedwe za MySQL, choncho perekani chitetezo ndi pulogalamu yowonjezera, yomwe imayikidwasudo mysql_secure_installation.
  4. Kukhazikitsa zoikamo mapulogalamu azinsinsi sizikhala ndi malangizo amodzi, popeza wogwiritsa ntchito aliyense amatsogozedwa ndi zosankha zawo malinga ndi chitsimikiziro. Ngati mukufuna kukhazikitsa zofunika, lowetsani cholumikizira y mukapempha.
  5. Chotsatira, muyenera kusankha mtundu wa chitetezo. Choyamba, werengani malongosoledwe amtundu uliwonse, kenako sankhani yoyenera kwambiri.
  6. Khazikitsani mawu achinsinsi atsopano kuti mupereke mizu.
  7. Kenako, muwona zosintha zingapo, muziwerenga ndikuvomera kapena kukana, ngati zikufunika.

Tikukulangizani kuti mudziwe bwino momwe mungafotokozere njira ina yokhazikitsa mu nkhani yathu ina, yomwe mupezeko pa ulalo wotsatirawu.

Onaninso: Upangiri Wanga wa MySQL pa Ubuntu

Gawo 3: Ikani PHP

Gawo lomaliza lowonetsetsa kuti magwiridwe antchito a LAMP ndi kukhazikitsa zida za PHP. Palibe chosokoneza pakukhazikitsa njirayi, mumangofunika kugwiritsa ntchito imodzi mwalamulo, ndikusintha zowonjezera zokha.

  1. Mu "Pokwelera" lembani lamulosudo apt-simani php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0kukhazikitsa zinthu zofunika ngati mukufuna mtundu 7.
  2. Nthawi zina lamulo lomwe lili pamwambapa silikugwira ntchito, choncho gwiritsani ntchitosudo apt kukhazikitsa php 7.2-entkapenawokonda kukhazikitsa hhvmkukhazikitsa mtundu waposachedwa wa 7.2.
  3. Pamapeto pa njirayi, onetsetsani kuti msonkhano wolondola unayikidwa polemba mu cholemberaphp -v.
  4. Kuwongolera kwa database ndi kukhazikitsa mawonekedwe awebusayiti kumachitika pogwiritsa ntchito chida chaulere cha PHPmyadmin, chofunikiranso kukhazikitsa pakukhazikitsa kwa LAMP. Kuti muyambe, ikani lamulosudo apt-kukhazikitsa phpmyadmin php-mbstring php-kupeza.
  5. Tsimikizirani kuwonjezera kwamafayilo atsopano posankha njira yoyenera.
  6. Fotokozerani seva yapaintaneti "Apache2" ndipo dinani Chabwino.
  7. Mudzauzidwa kuti musunthire database mwalamulo lapadera, ngati kuli koyenera, sankhani yankho labwino.
  8. Pangani mawu achinsinsi polembetsa pa seva ya database, pambuyo pake adzafunika kutsimikiziridwa ndikuyambiranso.
  9. Mwakusintha, simudzatha kulowa PHPmyadmin m'malo mwa wogwiritsa ntchito mizu kapena kudzera pa malo a TPC, chifukwa chake muyenera kuletsa zofunikira kutilepheretsa. Yambitsani ufulu wa mizu kudzera mwa lamulowokonda -i.
  10. Kanikizani mwa kulembaecho "wosuta seti ya plugin =" pomwe mtumiaji = "muzu"; mwayi wosangalatsa; "| mysql -uzu -p mysql.

Pamenepa, kukhazikitsa ndi kusintha kwa PHP kwa LAMP kuonedwa kuti kumatha bwino.

Onaninso: Kuwongolera Kukhazikitsa kwa PHP pa Ubuntu Server

Lero tidayikapo pa kukhazikitsa ndi kukhazikitsa koyambirira kwa zida za LAMP ku Ubuntu. Zachidziwikire, izi sizomwe zidziwitso zonse zomwe zingaperekedwe pamutuwu, pali zambiri zamaganizidwe zokhudzana ndi kugwiritsa ntchito madilesi angapo kapena madongosolo ambiri. Komabe, chifukwa cha malangizo omwe ali pamwambapa, mutha kukonzekera dongosolo lanu mosavuta kuti pulogalamu iyi ipangike.

Pin
Send
Share
Send