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:
- Vula "Isiginali" noma iyiphi indlela elula, isibonelo, ngokusebenzisa imenyu.
- Abanikazi bezinguqulo ze-Debian noma ze-Ubuntu badinga ukubhalisa umyalo
sudo apt-get ukufaka vsftpd
. I-CentOS, Fedora -ukufaka vsftpd
, ne-Gentoo -ukuphuma vsftpd
. Ngemuva kokwethula, chofoza Ngenaukuqala inqubo yokufaka. - Qinisekisa i-akhawunti yakho nge-password efanele.
- 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.
- Kumasistimu wokusebenza we-Debian noma Ubuntu, ifayela lokucushwa lisebenza kanjena:
sudo nano /etc/vsftpd.conf
. Ku-CentOS nakuFedora, kusendleleni/etc/vsftpd/vsftpd.conf
nase-Gentoo -/etc/vsftpd/vsftpd.conf.example
. - 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 - 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.
- Gijima "Isiginali" bese ufaka umyalo
umsebenzisi we-sudo adduser1
kuphi umsebenzisi1 - Igama le-akhawunti entsha. - Setha iphasiwedi yakho, bese uyiqinisekisa. Ngaphezu kwalokho, sincoma ngokuqinile ukuthi ukhumbule umkhombandlela wasekhaya we-akhawunti; ngokuzayo, kungadingeka ukuthi uyithole ngokusebenzisa ikhonsoli.
- Gcwalisa imininingwane eyisisekelo - igama eliphelele, inombolo yegumbi, izinombolo zocingo nolunye ulwazi, uma kudingeka.
- Ngemuva kwalokho, nikeza umsebenzisi amalungelo athuthukile ngokufaka umyalo
sudo adduser user1 sudo
. - Dala umkhombandlela ohlukile womsebenzisi wokugcina amafayela akhe
sudo mkdir / home / user1 / amafayela
. - Okulandelayo, dlulela kufolda yakho yasekhaya
cd / ikhaya
bese wenza lapho umsebenzisi omusha abe ngumnikazi wesikhombi sakho ngokuthayiphaimpande ye-chown: izimpande / ikhaya / umsebenzisi1
. - Qala kabusha iseva ngemuva kokwenza zonke izinguquko
sudo 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.
- Ku-console, yenza kusebenze imiyalo ngamunye ngamunye
khubaza i-sudo ufw
futhisudo ufw vumela
ukuqala kabusha umlilo. - Faka imithetho engaphakathi usebenzisa
sudo ufw vumela i-20 / tcp
futhisudo ufw vumela 21 / tcp
. - Bheka ukuthi imithetho efakiwe isetshenzisiwe yini ngokubheka isimo somlilo
isimo sudo ufw
.
Ngokwehlukana, ngifuna ukuqaphela imiyalo eminingi ewusizo:
/etc/init.d/vsftpd ukuqala
nomainkonzo 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 kabusha
noma/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