Ukudala i-FTP Server ku-Linux

Pin
Send
Share
Send

Ukudlulisa ifayela kunethiwekhi kwenziwa ngokubonga kuseva ye-FTP elungiselelwe kahle. Isivumelwano esinjalo sisebenzisa i-TCP ekwakhiweni kweseva yamakhasimende futhi sisebenzisa ukuxhumana okuhlukahlukene kwenethiwekhi ukuqinisekisa ukudluliswa kwemiyalo phakathi kwezindawo ezixhumekile. Abasebenzisi abaxhumeke ekusingatheni okuthile babhekene nesidingo sokusetha iseva ye-FTP yomuntu siqu ngokuya ngezidingo zenkampani enikezela ngezinsizakalo zokulungiswa kwesiza noma enye isoftware. Okulandelayo, sizobonisa indlela yokwakha isiphakeli esinje ku-Linux sisebenzisa enye yezinsiza njengesibonelo.

Dala iseva ye-FTP ku-Linux

Namuhla sizosebenzisa ithuluzi elibizwa ngeVSftpd. Izinzuzo zeseva ye-FTP enjalo ukuthi isebenza kumasistimu amaningi ngokuzenzakalela, igcina amakhodi asemthethweni wokusatshalaliswa okuhlukahlukene kweLinux, futhi kulula ukukulungisa ukuze lisebenze kahle. Ngendlela, le FTP isetshenziswa ngokusemthethweni ku-Linux kernel, futhi izinkampani eziningi zokubamba zincoma ukufaka i-VSftpd. Ngakho-ke, ake sinake ukufakwa kwesinyathelo-nesinyathelo kanye nokuhlelwa kwezakhi ezidingekayo.

Isinyathelo 1: Faka i-VSftpd

Ngokuzenzakalelayo, yonke imitapo yolwazi edingekayo ye-VSftpd ayifakiwe kokusatshalaliswa, ngakho-ke udinga ukuyilanda ngesandla ngokusebenzisa ikhonsoli. Kwenziwa kanje:

  1. Vula "Isiginali" noma iyiphi indlela elula, isibonelo, ngokusebenzisa imenyu.
  2. Abanikazi bezinguqulo ze-Debian noma ze-Ubuntu badinga ukubhalisa umyalosudo apt-get ukufaka vsftpd. I-CentOS, Fedora -ukufaka vsftpd, ne-Gentoo -ukuphuma vsftpd. Ngemuva kokwethula, chofoza Ngenaukuqala inqubo yokufaka.
  3. Qinisekisa i-akhawunti yakho nge-password efanele.
  4. Lindela ukuqeda ukufaka amafayela amasha ohlelweni.

Sidonsela ukunaka kwabanikazi beCSOS abasebenzisa iseva ebonakalayo ebonakalayo kunoma yikuphi ukusingathwa. Uzodinga ukubuyekeza imodyuli ye-OS kernel, ngoba ngaphandle kwale nqubo kuzovela iphutha elibucayi ngesikhathi sokufakwa. Faka imiyalo elandelayo ngokulandelana:

ukubuyekeza yum
rpm -Uvh //www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
ukufaka yum-plugin-harakaestmirror
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-3.15.6-1.el7.elrepo.x86_64.rpm
ukufaka i-kernel-ml-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum ukufaka kernel-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
ukufaka i-kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-headers-3.15.6-1.el7.elrepo.x86_64.rpm
ukufaka i-kernel-ml-headers-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum ukufaka i-kernel-ml-zana-libs-3.15.6-1.el7.elrepo.x86_64.rpm
ukufaka i-kernel-ml-amathuluzi-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum ukufaka i-kernel-ml-zana-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.net ter.net/elrepo/kernel/el7/x86_64/RPMS/perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum ukufaka i-perf-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mir amaphu.neterra.net/elrepo/kernel/el7/x86_64/RPMS/python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
ukufaka i-python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum --enablerepo = elrepo-kernel ukufaka kernel-ml

Ngemuva kokuqeda le nqubo, sebenzisa ifayela lokucushwa nganoma iyiphi indlela elula./boot/grub/grub.conf. Shintsha okuqukethwe ngaphakathi ukuze ekugcineni imikhawulo elandelayo ibe namanani afanele:

okuzenzakalelayo = 0
ukuphela = 5
isihloko vmlinuz-4.0.4-1.el7.elrepo.x86_64
impande (hd0.0)
kernel /boot/vmlinuz-4.0.4-1.el7.elrepo.x86_64 console = hvc0 xencons = tty0 izimpande = / dev / xvda1 ro
initrd /boot/initramfs-4.0.4-1.el7.elrepo.x86_64.img

Ngemuva kwalokho kufanele uqalise kabusha iseva ezinikezele bese uqhubekela ekufakweni kweseva ye-FTP ngqo ekhompyutheni.

Isinyathelo 2: Ukusethwa Kweseva Yokuqala yeFTP

Ngokubambisana nohlelo, ifayela layo lokucushwa lalandwa kwikhompyutha, kusukela lapho iseva ye-FTP isebenza khona. Zonke izilungiselelo zenziwa kuphela ngokulandela izincomo zokusingathwa noma okuthandayo. Singabonisa kuphela ukuthi leli fayela livulwa kanjani nokuthi imiphi imingcele okufanele inakwe.

  1. Kumasistimu wokusebenza we-Debian noma Ubuntu, ifayela lokucushwa lisebenza kanjena:sudo nano /etc/vsftpd.conf. Ku-CentOS nakuFedora, kusendleleni/etc/vsftpd/vsftpd.confnase-Gentoo -/etc/vsftpd/vsftpd.conf.example.
  2. Ifayela uqobo liyavela kukhonsoli noma kumhleli wombhalo. Sicela uqaphele amaphuzu ngezansi. Kufayela lakho lokucushwa, kufanele babe namanani afanayo.

    okungaziwa_Angaziwa = CHA
    wendawo_enable = YES
    bhala_ngasebenza = YEBO
    chroot_local_user = YES

  3. Yenza konke ukuhlela ngokwakho, futhi emva kwalokho, ungakhohlwa ukusindisa izinguquko.

Isinyathelo 3: Ukungeza Umsebenzisi Othuthukile

Uma ungeke usebenze neseva ye-FTP nge-akhawunti yakho eyinhloko noma ufuna ukunikeza abanye abasebenzisi, amaphrofayli enziwe kumele abe namalungelo wokuphamba ukuze ukufinyelela kosizo lwe-VSftpd kungabangeli amaphutha anqatshelwe.

  1. Gijima "Isiginali" bese ufaka umyaloumsebenzisi we-sudo adduser1kuphi umsebenzisi1 - Igama le-akhawunti entsha.
  2. Setha iphasiwedi yakho, bese uyiqinisekisa. Ngaphezu kwalokho, sincoma ngokuqinile ukuthi ukhumbule umkhombandlela wasekhaya we-akhawunti; ngokuzayo, kungadingeka ukuthi uyithole ngokusebenzisa ikhonsoli.
  3. Gcwalisa imininingwane eyisisekelo - igama eliphelele, inombolo yegumbi, izinombolo zocingo nolunye ulwazi, uma kudingeka.
  4. Ngemuva kwalokho, nikeza umsebenzisi amalungelo athuthukile ngokufaka umyalosudo adduser user1 sudo.
  5. Dala umkhombandlela ohlukile womsebenzisi wokugcina amafayela akhesudo mkdir / home / user1 / amafayela.
  6. Okulandelayo, dlulela kufolda yakho yasekhayacd / ikhayabese wenza lapho umsebenzisi omusha abe ngumnikazi wesikhombi sakho ngokuthayiphaimpande ye-chown: izimpande / ikhaya / umsebenzisi1.
  7. Qala kabusha iseva ngemuva kokwenza zonke izinguqukosudo service vsftpd ukuqala kabusha. Ukusatshalaliswa kwe-Gentoo kuphela lapho umsebenzi uqala kabusha/etc/init.d/vsftpd ukuqala kabusha.

Manje usungenza zonke izinto ezidingekayo kuseva ye-FTP egameni lomsebenzisi omusha onamalungelo okufinyelela athuthukile.

Isinyathelo 4: Lungiselela i-Firewall (Ubuntu Kuphela)

Abasebenzisi bokunye ukusatshalaliswa bangokweqa lesi sinyathelo ngokuphepha, ngoba ukumiswa kwetheku akusadingeki ndawo, ku-Ubuntu kuphela. Ngokuzenzakalelayo, i-Firewall ilungiselelwe ngendlela yokuthi ingeke ivumele ukungena kwethrafikhi kusuka kumakheli esiwadingayo, ngakho-ke uzodinga ukuvumela ukudlula kwayo ngesandla.

  1. Ku-console, yenza kusebenze imiyalo ngamunye ngamunyekhubaza i-sudo ufwfuthisudo ufw vumelaukuqala kabusha umlilo.
  2. Faka imithetho engaphakathi usebenzisasudo ufw vumela i-20 / tcpfuthisudo ufw vumela 21 / tcp.
  3. Bheka ukuthi imithetho efakiwe isetshenzisiwe yini ngokubheka isimo somliloisimo sudo ufw.

Ngokwehlukana, ngifuna ukuqaphela imiyalo eminingi ewusizo:

  • /etc/init.d/vsftpd ukuqalanomainkonzo vsftpd isiqalo- Ukuhlaziywa kwefayela lokulungiselela;
  • netstat -tanp | LALELA- Ukuqinisekiswa kokufakwa kweseva ye-FTP;
  • indoda vsftpd- shayela amadokhumenti asemthethweni we-VSftpd ukuthola imininingwane edingekayo ngokusebenza kokusebenza;
  • inkonzo vsftpd ukuqala kabushanoma/etc/init.d/vsftpd ukuqala kabusha- ukuqala kabusha kweseva.

Ngokuphathelene nokufinyelela kuseva ye-FTP futhi uqhubeke nokusebenza nayo, thintana nabamele abamele wena ukuthola le datha. Ngabo, ungacacisa imininingwane mayelana nokufihlakala kokuhleleka kanye nokuvela kwezinhlobonhlobo zamaphutha.

Kulesi sihloko kuyaphela. Namuhla sihlole inqubo yokufaka iseva ye-VSftpd ngaphandle kokuboshwa kunoma yikuphi ukusingathwa, ngakho-ke cabanga ngalokhu lapho ulandela imiyalo yethu bese uyiqhathanisa naleyo enikezwe yinkampani equkethe i-server yakho ebonakalayo. Ngaphezu kwalokho, sincoma ukuthi uzijwayeze okunye ukwaziswa kwethu, okuxoxa ngesihloko sokufaka izingxenye ze-LAMP.

Bheka futhi: Ukufaka i-LAMP Software Suite ku-Ubuntu

Pin
Send
Share
Send