I-HowTo: Insiza ye-FTP isebenzisa i-database ye-MySQL

Ngaphandle kokungaqiniseki okungahle kuzungeze i-MySQL, mathupha ngisakhetha ukusebenza nale DB ukusebenzisa enye. Anginalutho oluphikisana noPostgre, ngivele ngasebenzisa i-MySQL impilo yami yonke, futhi kuze kube manje anginaso isizathu sokucabanga kabusha ngokusetshenziswa kwayo.

Okwamanje ngizokufundisa ukuthi ungayifaka kanjani iseva ye-FTP, kepha hhayi lokho kuphela, ngizokufundisa ngendlela engeyona inkimbinkimbi, ukuthi abasebenzisi, amaphasiwedi nenye idatha yomsebenzisi igcinwe ku-database ye-MySQL, hhayi kuma-akhawunti yendawo.

Kungani lokhu kunje?

Kulula, ngoba lapho kwenziwa ibhekhaphu, ukufaka kabusha iseva noma olunye uguquko olubalulekile, ukuhambisa insiza kungaba lula njengokukopisha ifayela lokumisa, nokuthumela i-database ye-MySQL ku-FTP.

Ukufeza lokhu sizosebenzisa I-Pure-FTPd, kahle ... asiqale 🙂

Ukufaka insiza ye-FTP nge-Pure-FTPd

1. Into yokuqala okufanele uyenze ukufaka iphakheji: okumsulwa-ftpd-mysql

Ku-distros njenge Debian noma okuphuma kokunye: ukufaneleka ukufaka i-pure-ftpd-mysql

2. Uma isifakiwe, insiza yaqalwa kepha kufanele siyimise, ukuyimisa kuzinhlelo ezinjengeDebian noma okuphuma kuyo kwanele nge:

/etc/init.d/pure-ftpd-mysql stop

Kodwa-ke, ngikushiya umugqa ozomisa insiza noma ngabe usebenzisa yiphi i-distro:

ps ax | grep pure | grep -v grep | awk '{print $1}' | xargs kill

Uma ufuna ukuqonda lo mugqa ngokuningiliziwe, funda Lesi sihloko

Ilungiselela izimo kuseva ye-MySQL

Ngivele ngichazile kungekudala ukuthi ungadala kanjani i-database, umsebenzisi futhi unikeze izimvume kulowo msebenzisi ku-database: Abasebenzisi nezimvume ku-MySQL

Ake siqhubekele phambili sizokwenzenjani lapha? ...

1. Sizokwakha i-database yebo, kepha okokuqala sifinyelela i-MySQL:

mysql -u root -p

Lapha bafaka iphasiwedi yezimpande futhi bazokwazi ukufinyelela ukuphela kwe-MySQL.

2. Uma sesingaphakathi kwe-MySQL siqhubeka nokwakha i-database umagfdb:

CREATE DATABASE myftpdb;

Qaphela isemicolon «;»Ekupheleni komugqa.

3. Manje sizokwakha umsebenzisi umabhebhana futhi sizonikeza izimvume zokusebenzisa umsebenzisi ku-database esisanda kuyidala, lo msebenzisi uzoba ne-password igama eliyiphutha:

CREATE USER 'myftpuser'@'localhost' IDENTIFIED BY 'myftppassword';
GRANT ALL PRIVILEGES ON myftpdb.* TO 'myftpuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES ;

4. Silungile, sidale i-database, umsebenzisi futhi setha izimvume. Manje kufanele singenise i-database ezenzakalelayo (noma ehlanzekile) ukuze lokhu kuphelele. Ukuze senze lokhu, ake siqale ukuphuma ku-MySQL:

exit;

Manje ake silande i-database ezenzakalelayo engikunikeza yona:

Landa i-DB ngokuzenzakalela

Noma kuseva sebenzisa umugqa olandelayo:

wget http://ftp.desdelinux.net/myftpdb.sql

Silungile, sesivele sinayo kuseva yethu, manje kusele kuphela ukungenisa idatha yakho:

mysql -u root -p myftpdb < myftpdb.sql

Futhi ngomumo!

Futhi bangasebenzisa uhlelo oluthile lwewebhu njenge Umphathi o I-PHPMyAdmin ukungenisa i-database, ngiyishiya ukunambitha.

5. Futhi konke lokhu ukuthi kube nemibandela ye-MySQL yethu elungile.

Ukuxhumanisa i-FTP ne-MySQL

Yebo, sesivele sinesevisi ye-FTP efakiwe, insiza ye-MySQL ifakiwe futhi ne-database yethu isethwe ... manje sidinga nje, ujoyine insiza ye-FTP nge-MySQL.

1. Okokuqala kufanele silande ifayili lokumisa esizolisebenzisela okungenhla. Esigungwini se-server ake sibeke umugqa olandelayo:

cd /etc/pure-ftpd/ && wget http://ftp.desdelinux.net/pure-ftpd-mysql.conf

2. Manje siqala insiza ye-FTP ukuyitshela ukuthi isebenzise ukuqinisekisa abasebenzisi be-MySQL, futhi sizokhombisa nokuthi yiliphi ifayela lokumisa elizolisebenzisa ukuxhuma kwi-MySQL:

pure-ftpd-mysql -l mysql:/etc/pure-ftpd/pure-ftpd-mysql.conf

Futhi voila 😀

Lokhu kwanele ukufaka iseva yethu ye-FTP eqinisekisa nge-database ye-MySQL.

Uma ufuna ukuthi noma nini lapho iseva iqala ngokuzenzekelayo iqala insiza ye-FTP, kufanele ufake ifayili /etc/rc.local umugqa esiwusebenzisa ukwenza i-FTP, okungukuthi, sifaka /etc/rc.local lokhu:

pure-ftpd-mysql -l mysql:/etc/pure-ftpd/pure-ftpd-mysql.conf

Ngendlela, ungangena kwi-FTP usebenzisa noma isiphi isiphequluli, kanye namakhasimende we-FTP afana neFayilezilla ... hhayi lokho kuphela, usebenzisa iziphequluli zamafayela ezinjengeNautilus, iDolphin noma i-PCManFM futhi ungalanda futhi ulayishe amafayela 😀

Umsebenzisi wokuhlola oku-database

Usuario: umhloli

Iphasiwedi: igama lokungena

Ungabaphatha kanjani abasebenzisi be-FTP?

Yebo, uma ubheka ukuthi iyi-database ye-MySQL, njengoba ngishilo ngenhla ... ukusebenzisa i-PHPMyAdmin noma i-Adminer kuzokwanela. Vele usebenzise uhlelo lwakho lokusebenza oluthandayo ukuphatha i-database, equkethe itafula elilodwa: abasebenzisi ... futhi kukhona abasebenzisi, nasi isithombe-skrini: Uma ufuna ukudala umsebenzisi omusha, ungaphindaphinda noma uhlanganise ulayini okhona bese ushintsha idatha engahluka phakathi kwabo bobabili abasebenzisi, lapha ngikukhombisa isithombe-skrini: Hhayi ... akukho okunye okuzofakwa 🙂

Ngiyethemba ukuthi lokhu kuwusizo kuwe futhi uyazi, noma yimiphi imibuzo noma iziphakamiso ungazise.

Phendula ngokucaphuna

P.S: Kulesi sifundo sisebenzisa amaphasiwedi agcinwe ku-database ngombhalo ocacile, uma ufuna ukuphepha okwengeziwe ngincoma ukuthi uzame md5 😉


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-28, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   I-LiGNUxero kusho

    KUHLE KAKHULU!!! Emasontweni ambalwa edlule bengifaka lokhu kepha nge-vsftpd futhi angiqiniseki ngakho-ke ngizozama lokhu ukubona ukuthi kunjani. Ngiyabonga

    1.    KZKG ^ Gaara kusho

      Ngiyabonga mngani.
      I-vsftpd angikhumbuli ukuthi ngigcine nini ukuyisebenzisa ... kuzoba yiminyaka embalwa manje, ... uma ngake ngayisebenzisa i-HAHA. Okwamanje ngePureFTPd ngingaphezu kokujabula 😀

  2.   kufanelekile kusho

    Umnikelo omuhle kakhulu!

    1.    KZKG ^ Gaara kusho

      Ngiyabonga compa 😀
      Wenza lokho ongakwenza lol….

  3.   IComputer Guardian kusho

    Uuumm, kuyathakazelisa ... ngidlulisele i-IP ye-DB engifuna ukuba nayo lelo qoqo labasebenzisi namaphasiwedi asondele 😉

    Ungabi mubi ndoda

    1.    KZKG ^ Gaara kusho

      Angiqondanga hehehe… ukhuluma ngani i-IP ne-DB?
      Uma usho ukuthi le datha engiyibeke esifundweni ingaba futhi kuseva, yebo ukhona lapho uqinisile ... bakusevisi ye-FTP kwi-PC ebonakalayo kukhompyutha yami ephathekayo, ine-firewall enhle kakhulu (iptables) ngakho … HAHAHAHAHA impela ungabi mubi LOL !!!

  4.   IComputer Guardian kusho

    UJoroña yini a joroña…. Kuzoba nzima kakhulu kunalokho kubonakala kusizakala ngobuthakathaka obuthile bese kuthatha leyo datha 😉

  5.   I-Algabe kusho

    Inohlonze impela!! 🙂

    1.    KZKG ^ Gaara kusho

      Siyabonga 🙂
      Yilokhu engizama ukukuhlukanisa nakwezinye izingosi ... ukuthi sizama ukungabeki izindaba ezingaka kepha njengezihloko zobuchwepheshe 😀

  6.   I-Giskard kusho

    Kushesha kangakanani lokhu kuqhathaniswa neSamba? (inethiwekhi yendawo kuphela)

    1.    I-LiGNUxero kusho

      ukuthi i-samba ne-ftp yizinto ezi-2 ezihlukile, i-ftp iyinkqubo elandelwayo futhi i-smb ukwenza lula ukwabelana phakathi kwe-win ne-linux.
      Uma ufuna ukusebenza kunethiwekhi, sebenzisa isevisi ye-FTP, ngaphandle kwalokho sebenzisa i-samba ngaphandle kwezinkinga

      1.    KZKG ^ Gaara kusho

        Impela.
        Masithi i-FTP ibucayi kakhulu kuneSamba, okungenani ngokombono wami kunjalo.

        Angikaze ngenze amabhentshi nhlobo, kepha mhlawumbe i-FTP iyashesha kancane.

        1.    I-Giskard kusho

          Ngiyabonga. Ngisebenzisa iSamba ukuze kukhonsoli yami ye-Wii (ngisebenzisa i-wiimc) ngibuke ama-movie nochungechunge engilulanda kukhompyutha yami. Kepha i-wiimc ingaxhuma futhi kuseva ye-ftp. Ngisebenzise iSamba ngoba iyona elula kunazo zonke, kepha ngangihlale ngijabule uma izoshesha nge-ftp. Kuzofanele ngizame.

          1.    KZKG ^ Gaara kusho

            Hhayi-ke, ungavele ubeke i-Apache ku-PC yakho, ngakho-ke i-Wii izoxhuma, kufanele isheshe kune-samba ... futhi kube lula ukumisa kune-FTP 😀

          2.    I-Giskard kusho

            I-wiimc (i-Wii Media Player) yamukela kuphela ukuxhumana kwe-Samba ne-FTP.

  7.   Insimbi enkulu kusho

    Kuhle kakhulu. Lolu hlobo lwe-athikili (kanye nesayithi lilonke) lidinga kuphela okuthile ukwenza yonke into iphelele; isifanekiso seCSS ukuze sikwazi ukuphrinta izindatshana ku-PDF noma ephepheni.

  8.   I-LiGNUxero kusho

    Angazi noma kuzoba okwami ​​yini, kepha inkinga enkulu yalokhu ukuthi abasebenzisi bangangena kuzo zonke izinkomba noma ngabe ngibanikeza umkhombandlela othize onjenge- "/ var / www / user_site" uma bexhuma nge-ftp bona ukufinyelela kunoma yikuphi kusuka ku-pc ¬¬ yami
    akuphephile lokho haha

  9.   I-LiGNUxero kusho

    NAKHU!!!
    Ukuvimbela abasebenzisi esibakhelayo ukuthi bakwazi ukuzulazula kulo lonke uhlelo lwethu, kufanele sengeze ipharamitha "-A" lapho sethula okumsulwa ...

    Ngakho-ke esikufaka ku /etc/rc.local oyifaka esifundweni yilokhu
    okumsulwa-ftpd-mysql -l mysql: /etc/pure-ftpd/pure-ftpd-mysql.conf

    futhi kufanele ubeke okunye esikhundleni salokhu:
    i-pure-ftpd-mysql -A -l mysql: /etc/pure-ftpd/pure-ftpd-mysql.conf

    Ingabe uyaziswa? ... Lo mugqa omusha unepharamitha engu -A yokukhawulela umkhombandlela kuphela esiwunika wona hhayi okunye, ungawakha kepha awukwazi ukukhuphuka.

    D: le-pure-fptd enhle

    1.    KZKG ^ Gaara kusho

      Siyabonga ngethiphu 😀

  10.   Roberto kusho

    Sawubona, kungenzeka ukusebenzisa ama-quotas kulokhu kuqaliswa kwe-MySQL ne-FTP, njengamanje ngine-ftp server ene-vsftpd futhi anginankinga ne-quotas, kepha ukuba ngumsebenzisi we-virtual (owenziwe ku-mysql) ngabe izilinganiso zizosebenza? okwesibili kulapho amafayela alayishwe abasebenzisi agcinwa khona, okungukuthi, okuyizinkomba zomsebenzisi ngamunye.

    1.    KZKG ^ Gaara kusho

      Ngokombono, ungasebenzisa ama-quotas, empeleni i-database inezinkambu ezenzelwe yona, futhi ifayili lokumiswa kwensiza ye-FTP linemibuzo esethelwe lokhu, empeleni angikakuhlolisanga lokhu

      Mayelana nokuthi abasebenzisi bazowabeka kuphi amafayela, uwachaza enkambeni yesi-5, bona isithombe-skrini: https://blog.desdelinux.net/wp-content/uploads/2012/09/phpmyadmin-screenshot-nuevo-usuario.jpg

  11.   Roberto kusho

    Ngiyabonga kakhulu ngokuphawula kwakho, ngizohlola lolu hlelo kuseva yokuhlola bese ngiphawula ngemiphumela, ngithemba ukuthi ngiyakwazi ngoba kuyindlela enhle yokwenza konke kuhleleke, futhi nge-RAID unohlelo lokulondoloza oluzinzile: D.

    1.    KZKG ^ Gaara kusho

      Ngiyabonga ngokuphawula 🙂

  12.   Roberto kusho

    Nginombuzo, sengivele ngikwazile ukufaka i-pure-ftp nge-mysql ne-quotas, inkinga manje ukuthi ngingayimisa kanjani i-akhawunti etafuleni le-mysql uqobo, ngaphandle kokuguqula iphasiwedi yomsebenzisi noma amafayela alayishiwe.

    1.    KZKG ^ Gaara kusho

      Ngingacabanga ngezindlela ezimbili, okulula kakhulu ukuguqula inani le- Isimo kusuka ku-1 kuye ku-0, ngombono uma kuku-0 i-akhawunti ayisebenzi, zama lokhu bese ungitshela 🙂

  13.   Birkhoff kusho

    URoberto, ukwazile kanjani ukusetha imali usebenzisa lesi sikhungo? Sicela wabelane ngolwazi.
    Ukungena okuhle kakhulu !!

    1.    URobertoSotelo kusho

      Birkhoff, kubhulogi lami siqu ngidale isihloko ngalokho, ngishiya isixhumanisi ukuze usibuyekeze:

      http://aprendelinux.net/instalar-servidor-ftp-pure-ftp-con-cuentas-virtuales-en-mysql/

  14.   UKlaus kusho

    Ukubingelela:

    Ngizama ukulandela yonke into kepha ngithola iphutha 501 futhi ngaphezu kwakho konke ukubhekisa eqinisweni lokuthi iphasiwedi ayilungile lapho ngazi ukuthi kulungile