Ho kenya LAMP Software Suite ho Ubuntu

Pin
Send
Share
Send

Sephutheloana sa software se bitsoang LAMP se kenyelletsa Linux kernel OS, seva ea marang-rang ea Apache, database ea MySQL, le likarolo tsa PHP tse sebelisoang enjine ea sebaka. Kamora moo, re tla hlalosa ka botlalo ho kenyelletsa le tlhophiso ea pele ea litlatsetso tsena, ho nka mofuta oa morao-rao oa Ubuntu e le mohlala.

Ho kenya LAMP Software Suite ho Ubuntu

Kaha sebopeho sa sengoloa sena se se se bolela hore o na le Ubuntu k'homphieutheng ea hau, re tla tlola mohato ona ebe re tsoela pele ho fihlela mananeo a mang, leha ho le joalo, o ka fumana litaelo ka sehlooho se u khahlang ka ho bala lingoliloeng tsa rona tse ling ho lihokela tse latelang.

Lintlha tse ling:
Kenya Ubuntu ho VirtualBox
Linux e tsamaea ho tloha ho drive e khanyang

Mohato oa 1: Kenya Apache

Ha re qale ka ho kenya seva e bulehileng ea webo e bitsoang Apache. Ke e 'ngoe ea likhetho tse ntle, kahoo e fetoha khetho ea basebelisi ba bangata. Ho Ubuntu, e kenngoa "Mokhatlo oa" terminal ":

  1. Bula menyu 'me u hlahise khokahano kapa tobetsa konopo ea konopo Ctrl + Alt + T.
  2. Ntlafatsa lits'oants'o tsa hau tsa tsamaiso pele ho etsa bonnete ba hore u na le likarolo tsohle tse hlokahalang. Ho etsa sena, ngola taelosudo apt-fumana ntjhafatso.
  3. Ketso tsohle ka sudo e tsamaea le phihlello ea motso, ka hona etsa bonnete ba ho hlakisa password ea hau (ha e hlahe ha e kenella).
  4. Ha u qetile, kenasudo apt-kenya kenya apache2ho eketsa Apache tsamaisong.
  5. Netefatsa ho eketsa lifaele tsohle ka ho khetha khetho ea karabo D.
  6. Ha re lekeng ts'ebetso ea seva ea webo ka ho sebetsasudo apache2ctl haeba.
  7. Syntax e lokela ho ba e tloaelehileng, empa ka linako tse ling ho hlaha temoso mabapi le tlhoko ea ho eketsa Servername.
  8. Kenya sena se fapaneng lefatšeng ka bophara faeleng ea tlhophiso ho qoba litemoso tsa nako e tlang. Tsamaisa faele ka boeonasudo nano /etc/apache2/apache2.conf.
  9. Joale matha khokahano ea bobeli, moo u tsamaisang taeloip addr bontsa eth0 | grep inet | awk '{hatisang $ 2; } '| sed 's / 39 /ho tseba aterese ea hau ea IP kapa domain name.
  10. Pele "Mokhatlo oa" terminal " theoha tlase botebong ba file le mofutaServerName + lebitso la domain kapa aterese ea IPhore o sa tsoa ithuta. Boloka liphetoho ka Ctrl + O ebe o koala faele ea tlhophiso.
  11. Lekola hape ho netefatsa hore ha ho na liphoso, ebe u qala seva ea webo hapesudo systemctl restart apache2.
  12. Kenya Apache ho autoload ha ho hlokahala e le hore e qala ka sistimi e sebelisang taelosudo systemctl e thusa apache2.
  13. E sala feela ho qala seva ea webo ho lekola botsitso ba ts'ebetso ea eona, sebelisa taelosudo systemctl qala apache2.
  14. Qolla sebatli ebe u ea hohomehost. Haeba u fihlile leqepheng la mantlha la Apache, joale ntho e 'ngoe le e' ngoe e sebetsa ka nepo, fetela mohato o latelang.

Mohato oa Bobeli: Kenya MySQL

Mohato oa bobeli ke ho kenyelletsa database ea MySQL, eo hape e etsoang ka khomphutha e tloaelehileng ho sebelisa litaelo tse fumanehang tsamaisong.

  1. Bohlokoa ka ho "Mokhatlo oa" terminal " ngolasudo apt-kenya hlomamisa seva ea kaebe u tobetsa Kena.
  2. Netefatsa tlatsetso ea lifaele tse ncha.
  3. Etsa bonnete ba ho boloka ts'ebeliso ea tikoloho ea MySQL, ka hona fana ka ts'ireletso ka keketso e ikhethileng, e kentsoengsudo mysql_secure_installation.
  4. Ho beha li-plugins bakeng sa litlhoko tsa password ha ho na taelo e le 'ngoe, hobane mosebelisi e mong le e mong o tataisoa ke liqeto tsa hae ho latela netefatso. Haeba u batla ho kenya litlhokahalo, kenya khokahano y ka kopo.
  5. E latelang, o hloka ho khetha boemo ba ts'ireletso. Pele, bala litlhaloso tsa parame e 'ngoe le e' ngoe ebe u khetha e loketseng ka ho fetisisa.
  6. Seta phasewete e ncha ho fana ka phihlello ea metso.
  7. Ka mor'a moo, u tla bona li-setting tse fapaneng tsa ts'ireletso, u li bale 'me u li amohele kapa u hana ha u bona ho hlokahala.

Re u eletsa hore u ithute ka litlhaloso tsa mokhoa o mong oa ho kenya moqolong oa rona o arohaneng, oo u tla o fumana ho sehokela se latelang.

Bona hape: Tataiso ea ho kenya MySQL ho Ubuntu

Mohato oa 3: Kenya PHP

Mohato oa ho qetela oa ho netefatsa ts'ebetso e nepahetseng ea sisteme ea LAMP ke ho kenya likarolo tsa PHP. Ha ho na letho le rarahaneng ts'ebetsong ea ts'ebetso ena, o hloka feela ho sebelisa e 'ngoe ea litaelo tse teng, ebe o hlophisa tlatsetso ka boeona.

  1. Ho "Mokhatlo oa" terminal " ngola taelosudo-apt-php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0ho kenya likarolo tse hlokahalang haeba u hloka mofuta oa 7.
  2. Ka linako tse ling taelo e kaholimo ha e sebetse, ka hona sebelisakenya spp 7.2-cmkapasudo apt kenya hhvmho kenya mofuta oa morao-rao o fumanehang 7.2.
  3. Qetellong ea ts'ebetso, etsa bonnete ba hore kopano e nepahetseng e kentsoe ka ho ngola khokahanongphp -v.
  4. Tsamaiso ea database le ho kenngwa tshebetsong sebopeho sa webo e etsoa ho sebelisoa sesebelisoa sa mahala sa PHPmyadmin, seo hape se lakatsehang ho se kenya nakong ea tlhophiso ea LAMP. Ho qala, kenya taelosudo apt-kenya kenya phpmyadmin php-mbstring php-getocol.
  5. Netefatsa tlatsetso ea lifaele tse ncha ka ho khetha khetho e nepahetseng.
  6. Hlalosa seva ea webo "Apache2" ebe u tobetsa Ho lokile.
  7. U tla khothalletsoa ho hlophisa database ka taelo e ikhethang, haeba ho hlokahala, khetha karabo e ntle.
  8. Etsa phasewete ea ho ingolisa seva ea database, ka mor'a moo e tla hloka ho netefatsoa ka ho e kenya hape.
  9. Ka phoso, u ke ke ua khona ho kenya PHPmyadmin molemong oa mosebelisi ea nang le phihlello ea metso kapa ka marang-rang a TPC, kahoo o hloka ho thibela ts'ebeliso ea thibelo. Kenya tšebetsong litokelo tsa motso ka taelosudo -i.
  10. Qolla ka ho thaepaecho "ntlafatso ea mosebelisi e behe =" moo mosebelisi = "motso"; litokelo tse fetelletseng; "| mysql -u motso -p mysql.

Ho sena, ho kenngwa le ho hlophisoa ha PHP ea LAMP ho ka nkoa ho phethelitsoe ka katleho.

Bona hape: Tataiso ea ho kenya UPP ho Ubuntu Server

Kajeno re amehile ka ho kenya le ho hlophisoa ha mantlha ha likarolo tsa LAMP bakeng sa ts'ebetso ea Ubuntu e sebetsang. Ehlile, sena ha se leseli lohle le ka fanoang ka taba ena, ho na le lintlha tse ngata tse amanang le ts'ebeliso ea libaka tse ngata kapa datha. Leha ho le joalo, ka lebaka la litaelo tse boletsoeng ka holimo, o ka lokisa sistimi ea hau habonolo bakeng sa ts'ebetso e nepahetseng ea sephutheloana sena sa software.

Pin
Send
Share
Send