Ukufaka i-LAMP Software Suite ku-Ubuntu

Pin
Send
Share
Send

Iphakethe le-software elibizwa nge-LAMP lifaka i-Linux kernel OS, iseva yewebhu ye-Apache, i-database ye-MySQL, nezinto ze-PHP ezisetshenziselwa injini yesiza. Okulandelayo, sizokuchaza ngokuningiliziwe ukufakwa nokucushwa kokuqala kwalawa ongezo, sithathe inguquko yakamuva ye-Ubuntu njengesibonelo.

Ukufaka i-LAMP Software Suite ku-Ubuntu

Njengoba ukwakheka kwale ndatshana sekusho ukuthi une-Ubuntu efakwe ekhompyutheni yakho, sizokweqa lesi sinyathelo bese siqhubeka ngokushesha kwezinye izinhlelo, noma kunjalo ungathola imiyalo ngesihloko esikuthandayo ngokufunda ezinye izindatshana zethu kusixhumanisi esilandelayo.

Imininingwane engaphezulu:
Faka Ubuntu ku-VirtualBox
Ukuhamba nge-Linux kusuka ku-flash drive

Isinyathelo 1: Faka i-Apache

Ake siqale ngokufaka iseva yewebhu evulekile ebizwa nge-Apache. Ngenye yezinketho ezinhle kakhulu, ngakho-ke kuba ukukhetha kwabasebenzisi abaningi. Ku-Ubuntu, kufakwa "Isiginali":

  1. Vula imenyu bese uqala ikhonsoli noma cindezela inhlanganisela yokhiye I-Ctrl + Alt + T.
  2. Thuthukisa amakhosombe ohlelo lwakho kuqala ukuze uqiniseke ukuthi unazo zonke izinto ezidingekayo. Ukuze wenze lokhu, bhala umyaloukuvuselelwa kwesudo.
  3. Zonke izenzo nge sudo isebenza ngokufinyelela kwezimpande, ngakho-ke qiniseka ukuthi ucacisa i-password yakho (ayiveli uma ingena).
  4. Uma usuqedile, ngenasudo apt-get ukufaka i-apache2ukufaka i-Apache ohlelweni.
  5. Qinisekisa ukungeza wonke amafayela ngokukhetha inketho yokuphendula D.
  6. Ake sihlole ukusebenza kweseva yewebhu ngokusebenzasudo apache2ctl ukucushwa.
  7. I-syntax kufanele ibe yinto evamile, kepha kwesinye isikhathi kuvela isexwayiso mayelana nesidingo sokungeza I-Servername.
  8. Faka lokhu kuhluka komhlaba wonke kufayela lokumisa ukuze uvikele izexwayiso ezizayo. Qalisa ifayela uqobosudo nano /etc/apache2/apache2.conf.
  9. Manje sebenzisa ikhonsoli yesibili, lapho ugijimela khona umyaloip addr khombisa eth0 | grep inet | awk '{phrinta u- $ 2; } '| sed 's / /ukuthola ikheli lakho le-IP noma isizinda seseva.
  10. Okokuqala "Isiginali" shona phansi ezansi kwefayela elivuliwe ubhaleServerName + igama lesizinda noma ikheli le-IPukuthi usanda kufunda. Gcina izinguquko I-Ctrl + O bese uvala ifayela lokucushwa.
  11. Hlola futhi ukuze uqiniseke ukuthi awekho amaphutha, bese uqala kabusha iseva yewebhusudo systemctl qala kabusha apache2.
  12. Ngeza i-Apache kusithonjana uma kunesidingo ukuze iqale ngohlelo lokusebenza lisebenzisa umyalosudo systemctl inika amandla i-apache2.
  13. Kuhlala kuphela ukuqala iseva yewebhu ukubheka ukuqina kokusebenza kwayo, sebenzisa umyalosudo systemctl qala apache2.
  14. Qalisa isiphequluli bese uya kuindawo yasekhaya. Uma ufike ekhasini eliyinhloko le-Apache, khona-ke yonke into isebenza kahle, qhubekela esigabeni esilandelayo.

Isinyathelo 2: Faka i-MySQL

Isinyathelo sesibili ukufaka i-database ye-MySQL, nayo eyenziwa nge-console ejwayelekile kusetshenziswa imiyalo etholakala ohlelweni.

  1. Ukubekwa phambili ku "Isiginali" bhalasudo apt-get ufake mysql-serverbese uqhafaza Ngena.
  2. Qinisekisa ukungezwa kwamafayela amasha.
  3. Qiniseka ukuthi uvikela ukusetshenziswa kwemvelo ye-MySQL, ngakho-ke hlinzeka ngokuvikela ngesengezo esihlukile, esifakiwesudo mysql_secure_installation.
  4. Ukusetha izilungiselelo ze-plugin zezidingo zephasiwedi akunawo umyalo owodwa, ngoba umsebenzisi ngamunye uqondiswa izinqumo zakhe ngokuya ngokuqinisekiswa. Uma ufuna ukufaka izidingo, faka ikhonsoli y ngesicelo.
  5. Okulandelayo, udinga ukukhetha izinga lokuvikelwa. Okokuqala, funda incazelo yepharamitha ngalinye, bese ukhetha elifanele kunazo zonke.
  6. Setha iphasiwedi entsha ukuhlinzeka ukufinyelela kwezimpande.
  7. Okulandelayo, uzobona izilungiselelo ezahlukahlukene zokuphepha, uzifunde bese wamukela noma wenqaba, uma ubona kunesidingo.

Sikweluleka ukuthi uzijwayeze ngokuchaza enye indlela yokufaka kumbhalo wethu ohlukile, ozowathola kusixhumanisi esilandelayo.

Bheka futhi: Umhlahlandlela wokufakwa kwe-MySQL ku-Ubuntu

Isinyathelo 3: Faka i-PHP

Isinyathelo sokugcina sokuqinisekisa ukusebenza kahle kohlelo lwe-LAMP ukufaka izingxenye ze-PHP. Akukho lutho oluyinkimbinkimbi ekusebenzeni kwale nqubo, udinga nje ukusebenzisa imiyalo etholakalayo, bese ulungiselela isengezo ngokwayo.

  1. In "Isiginali" bhala umyalosudo apt-get ukufaka php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0ukufaka izinto ezidingekayo uma kwenzeka ufuna i-version 7.
  2. Kwesinye isikhathi umyalo ongenhla awasebenzi, ngakho-ke sebenzisaspt ukufaka i-php 7.2-khungunomasudo apt ukufaka hhvmukufaka inguqulo yakamuva etholakalayo 7.2.
  3. Ekupheleni kwenqubo, qiniseka ukuthi umhlangano ofanele wafakwa ngokubhala kukhonsoliphp -v.
  4. Ukuphathwa kweDatabase kanye nokuqaliswa kwesixhumi esibonakalayo sewebhu kwenziwa kusetshenziswa ithuluzi lamahhala le-PHPmyadmin, futhi elifiselekayo ukufakwa ngesikhathi sokucushwa kwe-LAMP. Ukuze uqalise, faka umyalosudo apt-get ufake phpmyadmin php-mbstring php-uthole.
  5. Qinisekisa ukungezwa kwamafayela amasha ngokukhetha inketho ezifanele.
  6. Cacisa iseva yewebhu "Apache2" bese uqhafaza KULUNGILE.
  7. Uzokwaziswa ukuthi ulungiselele i-database ngomyalo okhethekile, uma kunesidingo, khetha impendulo evumayo.
  8. Dala iphasiwedi yokubhaliswa kuseva yedatha, ngemuva kwalokho kuzodingeka ukuthi kuqinisekiswe ngokuyifaka kabusha.
  9. Ngokuzenzakalelayo, ngeke ukwazi ukufaka i-PHPmyadmin egameni lomsebenzisi ngokufinyelela kwezimpande noma ngokusebenzisa i-TPC, ngakho-ke udinga ukuvimbela ukusetshenziswa kokuvinjwa. Yenza kusebenze amalungelo ezimpande ngomyalosudo -i.
  10. Nqamula ngokuthayiphai-echo "buyekeza i-plugin yomsebenzisi =" lapho uMsebenzisi = "izimpande"; amalungelo agqamile; "| mysql -u izimpande -p mysql.

Kulokhu, ukufakwa nokulungiswa kwe-PHP ye-LAMP kungabhekwa njengokuqediwe ngempumelelo.

Bheka futhi: Umhlahlandlela wokufakwa kwe-PHP ku-Ubuntu Server

Namuhla sithinte ekufakweni nasekuhlelweni okuyisisekelo kwezinto ze-LAMP zohlelo lobuntu lwe-Ubuntu. Vele, lokhu akuyona yonke imininingwane enganikezwa ngalesi sihloko, kukhona ama-nuances amaningi ahlotshaniswa nokusetshenziswa kwezizinda eziningi noma imininingwane yedatha. Kodwa-ke, ngenxa yemiyalo engenhla, ungalungisa kalula uhlelo lwakho ukuze lisebenze kahle leli phakethe le-software.

Pin
Send
Share
Send