Kusamutsa fayilo pa intaneti kumachitika chifukwa cha seva yokhazikitsidwa ya FTP. Protocol yotere imagwira ntchito pogwiritsa ntchito TCP pamakina ogwiritsira kasitomala ndipo imagwiritsa ntchito maukonde osiyanasiyana kuti iwonetsetse kusintha kwa malamulo pakati pa malo olumikizidwa. Ogwiritsa ntchito omwe amalumikizana ndi kuchititsa kwina amakumana ndi kufunika kosintha seva ya FTP malinga ndi zofunikira za kampani yomwe imapereka chithandizo chokonza malo kapena mapulogalamu ena. Kenako, tiziwonetsa momwe tingapangire seva yotere mu Linux pogwiritsa ntchito zina mwazofunikira monga chitsanzo.
Pangani seva ya FTP pa Linux
Lero tikugwiritsa ntchito chida chotchedwa VSftpd. Ubwino wa seva ya FTP yotere ndikuti imayendetsa makina ambiri ogwiritsira ntchito mosasamala, imasunga zolemba zawozikulu za magawo osiyanasiyana a Linux, ndipo ndizosavuta kukhazikitsa kuti izigwira bwino ntchito. Mwa njira, FTP iyi imagwiritsidwa ntchito mwalamulo pa Linux kernel, ndipo makampani ambiri othandizira amalimbikitsa kukhazikitsa VSftpd. Chifukwa chake, tiyeni tipeze chidwi ndi kukhazikitsa mwatsatanetsatane kukhazikitsidwa kwa zinthu zofunika.
Gawo 1: Ikani VSftpd
Pokhapokha, nyumba zonse za malaibulale zofunika za VSftpd siziphatikizidwa pazomwe amagawidwa, chifukwa chake muyenera kuwatsitsa pamanja kudzera pa kutonthoza. Imachitika motere:
- Tsegulani "Pokwelera" njira iliyonse yabwino, mwachitsanzo, kudzera pa menyu.
- Okhala ndi mitundu ya Debian kapena Ubuntu ayenera kulembetsa lamulo
sudo apt-kukhazikitsa vsftpd
. CentOS, Fedora -yum kukhazikitsa vsftpd
, komanso Gentoo -kutuluka vsftpd
. Pambuyo poyambitsa, dinani Lowanikuyambitsa kukhazikitsa. - Tsimikizani akaunti yanu ndi mawu achinsinsi.
- Yembekezerani kumaliza ntchito kuwonjezera pa fayilo.
Takopa chidwi cha eni a CentOS omwe amagwiritsa ntchito seva yodzipatulira kuchokera ku kuchitako kulikonse. Muyenera kusinthitsa gawo la OS kernel, chifukwa popanda njirayi kulakwitsa kovuta kumawonekera pakukhazikitsa. Lowetsani kutsatira malangizo otsatirawa:
zosintha
rpm -Uvh //www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum kukhazikitsa yum-plugin-harakaestmirror
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa kernel-ml-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa kernel-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
yum kukhazikitsa kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-headers-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa kernel-ml-headers-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa kernel-ml-zida-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa kernel-ml-zida-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa kernel-ml-zida-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa perf-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirwering.neterra.net/elrepo/kernel/el7/x86_64/RPMS/python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum kukhazikitsa python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum --enablerepo = elrepo-kernel kukhazikitsa kernel-ml
Mukamaliza njirayi, yendetsani fayilo ya kasinthidwe m'njira iliyonse yabwino./boot/grub/grub.conf
. Sinthani zomwe zalembedwa kuti pamapeto pake magawo otsatirawa akhale ndi zoyenera:
kusowa = 0
nthawi = 5
mutu vmlinuz-4.0.4-1.el7.elrepo.x86_64
muzu (hd0.0)
kernel /boot/vmlinuz-4.0.4-1.el7.elrepo.x86_64 kutonthoza = hvc0 xencons = tty0 muzu = / dev / xvda1 ro
initrd /boot/initramfs-4.0.4-1.el7.elrepo.x86_64.img
Kenako muyenera kungoyambiranso seva yodzipatulira ndikupititsa kukhazikitsa kwayokha kwa seva ya FTP pakompyuta.
Gawo 2: Kukhazikitsa Seva Yoyamba ya FTP
Pamodzi ndi pulogalamuyi, fayilo yake yosintha idatsitsidwa pa kompyuta, kuyambira pomwe seva ya FTP imagwira ntchito. Zosintha zonse zimachitidwa mokhazikika malinga ndi malingaliro a wolandira kapena zomwe mumakonda. Titha kungowonetsa momwe fayiyi imatsegulira komanso zomwe magawo amayenera kuyang'aniridwa.
- Pa makina ogwiritsa ntchito a Debian kapena Ubuntu, fayilo yosinthika imayenda motere:
sudo nano /etc/vsftpd.conf
. Pa CentOS ndi Fedora, ali m'njira/etc/vsftpd/vsftpd.conf
ndi ku Gentoo -/etc/vsftpd/vsftpd.conf.ex mohlala
. - Fayilo imokha imawonekera mu cholembera kapena cholembera mawu. Chonde dziwani izi pansipa. Mu fayilo yanu yosintha, ayenera kukhala ndi mfundo zomwezi.
osadziwika_en = = AYI
local_en = = YES
lembeni_zotheka = YES
chroot_local_user = YES - Chitani zotsalazo zina nokha, ndipo pambuyo pake, musaiwale kusunga zosintha.
Gawo 3: kuwonjezera Wogwiritsa Ntchito Wotsogola
Ngati simukugwira ntchito ndi seva ya FTP kudzera mu akaunti yanu yayikulu kapena mukufuna kupereka mwayi kwa ogwiritsa ntchito ena, makina opangidwa ayenera kukhala ndi ufulu wogwirizira kotero kuti mwayi wothandizila wa VSftpd suchititse kuti zolakwika zitheke.
- Thamanga "Pokwelera" ndi kulowa lamulo
wosakonda wokonda1
pati user1 - Dzina la akaunti yatsopano. - Khazikitsani mawu achinsinsi, kenako ndikutsimikizira. Kuphatikiza apo, tikukulimbikitsani kuti mukumbukire bukhu lakwathu laku akaunti; mtsogolomo, mungafunike kupitako kudzera pa cholembera.
- Lembani zofunikira - dzina lathunthu, nambala ya chipinda, manambala a foni ndi zambiri, ngati zingafunike.
- Pambuyo pake, perekani mwayi kwa wogwiritsa ntchito pomulamula
sudo adduser user1 sudo
. - Pangani chikwatu chosiyana kuti wogwiritsa ntchito azisunga mafayilo ake
sudo mkdir / home / user1 / mafayilo
. - Kenako, pitani ku foda yanu yanyumba kudzera
cd / nyumba
ndipo apo pangani wosuta watsopano kukhala mwini wa chikwatu ndi kalembedwechown muzu: muzu / nyumba / wosuta1
. - Yambitsaninso seva mutatha kusintha zonse
ntchito yachikondi vsftpd kuyambiranso
. Pokhapokha pakugawidwa kwa Gentoo komwe ntchito imayambiranso/etc/init.d/vsftpd kuyambiranso
.
Tsopano mutha kuchita zonse zofunikira pa seva ya FTP m'malo mwa wogwiritsa ntchito watsopano yemwe ali ndi ufulu wofika.
Gawo 4: Konzani Zowotcha (Ubuntu Yekha)
Ogwiritsa ntchito magawidwe ena amatha kudumpha sitepe iyi, popeza kusinthidwa kwa doko sikumafunikanso kwina kulikonse, ku Ubuntu kokha. Mosachedwa, Firewall imakonzedwa m'njira yoti isalole kuchuluka kwakubwera kuchokera ku maadiresi omwe tikufuna, motero muyenera kulola kudutsa pamanja.
- M'makonzedwe, yambitsa malamulo amodzi
sudo ufw chilema
ndisudo ufw
kuyambiranso moto. - Onjezani malamulo apakatikati ogwiritsa ntchito
sudo ufw amalola 20 / tcp
ndisudo ufw amalola 21 / tcp
. - Onani ngati malamulo omwe adalipo adagwiritsidwa ntchito powona mawonekedwe otetezedwa
sudo ufw udindo
.
Payokha, ndikufuna kudziwa malamulo angapo othandiza:
/etc/init.d/vsftpd kuyamba
kapenantchito vsftpd kuyamba
- Kuwunika kwa fayilo yosinthira;netstat -tanp | grep Mverani
- kutsimikizira kukhazikitsa kwa seva ya FTP;munthu vsftpd
- Itanani zolemba za VSftpd kuti mupeze zofunikira zokhudzana ndi kagwiritsidwe ntchito kake;ntchito vsftpd kuyambiranso
kapena/etc/init.d/vsftpd kuyambiranso
- kuyambiranso seva.
Pankhani yofikira seva ya FTP ndikugwiranso ntchito ndi iyo, funsani omwe akukuyimirani kuti mumve izi. Ndi iwo, mutha kumveketsa bwino zidziwitso zobisika zazokonza ndi kupezeka kwa zolakwika zamitundu mitundu.
Pa nkhaniyi zikutha. Lero tapenda njira yokhazikitsa seva ya VSftpd popanda kumangiriridwa ndi wina aliyense, choncho lingalirani izi mukamatsatira malangizo athu ndikuwayerekeza ndi omwe amaperekedwa ndi kampani yomwe imakhala ndi seva yanu yeniyeni. Kuphatikiza apo, tikukulimbikitsani kuti muzidziwitsa zina ndi zina zathu, zomwe zimafotokoza mutu wakukhazikitsa zinthu za LAMP.
Onaninso: Kukhazikitsa pulogalamu ya LAMP Software Suite pa Ubuntu