Shigar da LAMP Software Suite akan Ubuntu

Pin
Send
Share
Send

Kunshin software ɗin da ake kira LAMP ya haɗa da Linux kernel OS, da sabar yanar gizo na Apache, MySQL database, da abubuwan PHP waɗanda aka yi amfani da injin yanar gizon. Na gaba, zamuyi bayani dalla-dalla yadda kafuwa da tsarin farko na wadannan abubuwan suka kara, muna daukar sabon salo na Ubuntu a matsayin misali.

Shigar da LAMP Software Suite a Ubuntu

Tunda yanayin wannan labarin ya riga ya nuna cewa kun sanya Ubuntu a kwamfutarka, za mu tsallake wannan mataki kuma ku ci gaba zuwa sauran shirye-shirye nan da nan, duk da haka zaku iya samun umarni kan batun abin so a gare ku ta hanyar karanta sauran labaranmu a hanyoyin da ke gaba.

Karin bayanai:
Sanya Ubuntu akan VirtualBox
Linux Gabatarwa daga flash drive

Mataki na 1: Sanya Apache

Bari mu fara da shigar da sabar yanar gizo na bude da ake kira Apache. Yana ɗaya daga cikin zaɓuɓɓuka masu kyau, saboda haka ya zama zaɓin yawancin masu amfani. A cikin Ubuntu, an sanya ta "Terminal":

  1. Bude menu kuma kaddamar da na'ura wasan bidiyo ko latsa haɗin maɓallin Ctrl + Alt + T.
  2. Haɓaka kayan ajiya naka na farko don tabbatar cewa kana da duk kayan aikin da ake buƙata. Don yin wannan, rubuta umarninsudo dace-samu sabuntawa.
  3. Dukkanin ayyuka ta hanyar sudo yana aiki tare da tushen tushe, don haka tabbatar da saka kalmar wucewa ta (bai bayyana ba lokacin shigar).
  4. Lokacin da aka gama, shigar dasudo dace-samu shigar apache2don ƙara Apache a cikin tsarin.
  5. Tabbatar da ƙara duk fayiloli ta zaɓi zaɓi D.
  6. Bari mu gwada aikin uwar garken yanar gizo ta gudanasudo apache2ctl saitawa.
  7. Syntax ɗin yakamata ya zama na al'ada, amma wani lokacin gargaɗi yana bayyana game da buƙatar ƙarawa Servername.
  8. Sanya wannan canjin duniya zuwa fayil din sanyi don gujewa gargadi na gaba. Gudun fayil ɗin da kanta ta hanyarsudo nano /etc/apache2/apache2.conf.
  9. Yanzu gudanar da wasan bidiyo na biyu, inda gudanar da umarniip addr show eth0 | ingin grep | awk '{buga $ 2; } '| sed 's //.*$//'don gano adireshin IP ko yankin yanki.
  10. A farkon "Terminal" gangara zuwa kasan ainihin fayil ɗin da aka buɗe da nau'inServerName + sunan yankin ko adireshin IPabin da kawai ka koya. Ajiye canje-canje ta hanyar Ctrl + O kuma rufe fayil ɗin sanyi.
  11. Gwada sake don tabbatar da cewa babu kurakurai, sannan a sake kunna gidan yanar gizo ta hanyarsudo systemctl sake kunnawa apache2.
  12. Sanya Apache zuwa kayanda ake buƙata idan ya zama dole domin ya fara da tsarin aiki ta amfani da umarnisudo systemctl kunna apache2.
  13. Ya rage kawai don fara sabar yanar gizo don bincika amincin aikinsa, yi amfani da umarninsudo systemctl fara apache2.
  14. Unchaddamar da mai binciken kuma je zuwalocalhost. Idan kun isa babban shafin Apache, to komai yana tafiya daidai, ci gaba zuwa mataki na gaba.

Mataki na 2: Sanya MySQL

Mataki na biyu shine ƙara bayanan MySQL, wanda kuma ake yi ta hanyar daidaitaccen wasan bidiyo ta amfani da umarnin da ke cikin tsarin.

  1. Fifikon shiga "Terminal" rubutasudo dace-samu shigar da MySQL-sabarkuma danna kan Shigar.
  2. Tabbatar da ƙarin sababbin fayiloli.
  3. Tabbatar da amintaccen amfani da yanayin MySQL, don haka samar da kariya tare da ƙari daban, wanda aka sanya tasudo mysql_secure_installation.
  4. Saita tsarin saiti na abubuwan buƙatun kalmar sirri ba shi da jagora guda ɗaya, tunda kowane mai amfani yana jagorantar su ta hanyar yanke shawarar kansu dangane da inganci. Idan kana son shigar da bukatun, shigar da na'ura wasan bidiyo y kan bukatar.
  5. Na gaba, kuna buƙatar zaɓar matakin kariya. Da farko, karanta bayanin kowane sigogi, sannan ka zaɓi wanda ya fi dacewa.
  6. Sanya sabon kalmar sirri don samar da tushen tushe.
  7. Bayan haka, zaku ga saitunan tsaro daban-daban, karanta su kuma karɓa ko ƙi, idan kun ga ya zama tilas.

Muna ba ku shawara ku fahimci kanku tare da bayanin wata hanyar shigarwa a cikin labarinmu daban, wanda zaku samu a mahaɗin da ke biye.

Duba kuma: MySQL Guide Installation Guide akan Ubuntu

Mataki na 3: Sanya PHP

Mataki na ƙarshe don tabbatar da aiki daidai na tsarin LAMP shine shigar da abubuwan PHP. Babu wani abu mai rikitarwa a cikin aiwatar da wannan tsari, kawai kuna buƙatar amfani da ɗayan umarnin da ke akwai, sannan kuma saita ƙara a kanta.

  1. A "Terminal" rubuta umarninsudo dace-samu shigar da php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0shigar da kayan aikin da ake buƙata idan kuna buƙatar ẹya 7.
  2. Wasu lokuta umarnin da ke sama ba ya aiki, saboda haka amfanisudo mai dacewa shigar da php 7.2-clikosudo yadda yakamata a kafa hhvmdon shigar da sabon samfurin da ya gabata 7.2.
  3. A ƙarshen tsarin, ka tabbata cewa an sanya taron madaidaiciya ta hanyar rubuta a cikin na'ura wasan bidiyophp -v.
  4. Gudanar da bayanai da aiwatar da sigar yanar gizo ana aiwatar da ita ta amfani da kayan aiki kyauta na PHPmyadmin, wanda kuma kyawawa ne don sanyawa yayin tsarin LAMP. Don farawa, shigar da umarnisudo dace-samu shigar da phpmyadmin php-mbstring php-gettext.
  5. Tabbatar da ƙari na sabbin fayiloli ta zaɓi zaɓi da ya dace.
  6. Saka sabar yanar gizo "Apache2" kuma danna kan Yayi kyau.
  7. Za a zuga ku don saita bayanan ta hanyar umarni na musamman, idan ya cancanta, zaɓi ingantacciyar amsa.
  8. Irƙiri kalmar sirri don rajista a kan sabar cibiyar bayanai, bayan hakan akwai buƙatar tabbatar da shi ta sake shigar da shi.
  9. Ta hanyar tsoho, ba za ku iya shigar da PHPmyadmin ba a madadin mai amfani da tushen shiga ko ta hanyar musayar TPC, don haka kuna buƙatar kashe mai amfani mai toshewa. Kunna haƙƙin tushen ta hanyar umarnisudo -i.
  10. Cire haɗin ta hanyar bugawaecho "sabunta mai amfani saita plugin =" inda Mai amfani = "tushe"; saukar da gata; "| mysql -u tushen -p mysql.

A kan wannan, za a iya la'akari da sakawa da kuma daidaitawa na PHP don LAMP cikin nasara.

Duba kuma: Jagorar Saukewar PHP akan Ubuntu Server

A yau mun taɓa shigarwa da kuma ainihin ƙa'idodin abubuwan LAMP don tsarin aikin Ubuntu. Tabbas, wannan ba duk bayanin da za'a iya bayarwa akan wannan batun ba, akwai lambobi da yawa waɗanda ke da alaƙa da amfani da yawancin yanki ko bayanan bayanai. Koyaya, godiya ga umarnin da ke sama, zaka iya shirya tsarinka don ingantaccen aikin wannan kunshin software.

Pin
Send
Share
Send