Canja wurin fayil a kan hanyar sadarwa ana aiwatar da ita ne saboda uwar garken FTP wanda aka saita sosai. Irin wannan ladabi yana aiki ta amfani da TCP akan tsarin abokin ciniki-sabar yanar gizo kuma yana amfani da hanyoyin sadarwa iri-iri don tabbatar da sauƙaƙe umarni tsakanin nodes ɗin da aka haɗa. Masu amfani waɗanda ke da alaƙa zuwa kamfani na musamman suna fuskantar buƙatar saita sabar FTP ta sirri bisa ga buƙatun kamfani da ke ba da sabis na kulawa da shafin ko wasu software. Na gaba, muna nuna yadda ake ƙirƙirar irin wannan sabar a cikin Linux ta amfani da ɗayan abubuwan amfani a matsayin misali.
Createirƙiri sabar FTP a Linux
A yau za mu yi amfani da kayan aiki da ake kira VSftpd. Fa'idodin irin wannan sabar uwar garken FTP shine cewa yana gudana akan yawancin tsarin aiki ta hanyar tsohuwa, yana riƙe ma'aunin hukuma na rarraba Linux da yawa, kuma yana da sauƙin daidaitawa don aiki daidai. Af, ana amfani da wannan FTP bisa hukuma akan kwayar Linux, kuma kamfanoni da yawa suna ba da shawarar shigar da VSftpd. Sabili da haka, bari mu kula da shigarwa mataki-mataki-mataki da kuma daidaita abubuwan da ake buƙata.
Mataki na 1: Sanya VSftpd
Ta hanyar tsoho, duk ɗakunan karatu na VSftpd ba su cikin abubuwan rarrabuwar ba, don haka kuna buƙatar sauke su da hannu ta hannu. Ana aiwatar dashi kamar haka:
- Bude "Terminal" kowane hanya mai dacewa, alal misali, ta cikin menu.
- Masu mallakar nau'ikan Debian ko Ubuntu suna buƙatar yin rijista da umurni
sudo dace-samu shigar vsftpd
. CentOS, Fedora -yum shigar vsftpd
, kuma don Gentoo -fito fili vsftpd
. Bayan gabatarwa, danna kan Shigardon fara aiwatar da shigarwa. - Tabbatar da asusunka da kalmar sirri da suka dace
- Jira don kammala sabon fayiloli zuwa tsarin.
Mun jawo hankalin masu mallakar CentOS waɗanda ke amfani da sabar uwar garken kwazo daga kowace baƙi. Kuna buƙatar sabunta module ɗin kernel na OS, saboda ba tare da wannan hanyar ba matsala mai mahimmanci zata bayyana yayin shigarwa. Shigar da wadannan umarni masu zuwa:
yum sabuntawa
rpm -Uvh //www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum shigar da yum-plugin-fastestmirror
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da kwaya-ml-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da kwaya-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
yum shigar da kwaya-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-headers-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da kwaya-ml-kai-kai-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da kernel-ml-tool-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da kernel-ml-tool-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da kernel-ml-tool-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da turare-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum shigar da Python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum --enablerepo = elrepo-kernel shigar kernel-ml
Bayan kammala wannan hanyar, gudanar da fayil ɗin sanyi a kowane hanya mai dacewa./boot/grub/grub.conf
. Canza abin da ke ciki ta yadda a ƙarshen waɗannan sigogi suna da ƙimar da ta dace:
tsoho = 0
lokaci-lokaci = 5
taken vmlinuz-4.0.4-1.el7.elrepo.x86_64
tushen (hd0.0)
kernel /boot/vmlinuz-4.0.4-1.el7.elrepo.x86_64 console = hvc0 xencons = tty0 tushe = / dev / xvda1 ro
initrd /boot/initramfs-4.0.4-1.el7.elrepo.x86_64.img
Don haka kawai dole ne ku sake kunna uwar garken da aka sadaukar kuma ci gaba zuwa shigar da kai tsaye ta sabar FTP ta kwamfuta.
Mataki na 2: Saitin FTP Server na farko
Tare tare da shirin, an sauke fayil ɗin sarrafawa zuwa kwamfutar, fara daga abin da sabar FTP uwar garken take. Dukkanin saiti ana aiwatar da su gabaɗaya dai-dai gwargwadon shawarar da ƙungiyar ka shirya ko zaɓin ka. Zamu iya nuna yadda kawai aka buɗe wannan fayil ɗin kuma menene ya kamata a ba da kulawa.
- A kan tsarin aiki na Debian ko Ubuntu, fayil ɗin sanyi yana gudana kamar haka:
sudo nano /etc/vsftpd.conf
. A kan CentOS da Fedora, yana kan hanya/etc/vsftpd/vsftpd.conf
kuma a cikin Gentoo -/etc/vsftpd/vsftpd.conf.example
. - Fayil da kansa ya bayyana a cikin na'ura wasan bidiyo ko editan rubutu. Da fatan za a lura da abubuwan da ke ƙasa. A cikin fayil ɗin sanyi, yakamata su sami dabi'u iri ɗaya.
m_enable = BA
local_enable = EE
rubuta_enable = EE
chroot_local_user = YES - Yi sauran gyaran da kanka, bayan haka, kar a manta don adana canje-canje.
Mataki na 3: dingara Babban Mai amfani
Idan ba za ku yi aiki tare da uwar garken FTP ta hanyar babban asus ɗinku ba ko kuma kuna son samar da dama ga sauran masu amfani, bayanan da aka kirkira dole ne su kasance suna da hakkoki na superuser don samun damar amfani da VSftpd mai amfani ba ya haifar da damar hana masu kuskure.
- Gudu "Terminal" kuma shigar da umarnin
mai amfani da sudo adduser1
ina mai amfani1 - Sunan sabon lissafi. - Sanya kalmar shiga, sannan kuma tabbatar dashi. Bugu da kari, muna bada karfi da shawarar cewa ku tuna kundin adireshin gida; nan gaba, kuna iya bukatar samun damar amfani da na'ura wasan bidiyo.
- Cika cikakken bayani - cikakken suna, lambar daki, lambobin waya da sauran bayani, idan an buƙata.
- Bayan haka, ba wa mai amfani damar haɓaka ta hanyar shigar da umarnin
mai amfani da sudo adduser1 sudo
. - Irƙiri keɓaɓɓen directory ga mai amfani don adana fayilolinsa ta
sudo mkdir / gida / mai amfani1 / fayiloli
. - Bayan haka, matsa zuwa babban fayil ta gida ta
cd / gida
kuma a nan sa sabon mai amfani ya mallaki kundin adireshinku ta hanyar rubutatushen tushe: tushe / gida / mai amfani1
. - Sake kunna uwar garke bayan kayi duk canje-canje
sudo sabis vsftpd sake kunnawa
. A cikin rarraba Gentoo kawai ake amfani da kayan amfani/etc/init.d/vsftpd sake kunnawa
.
Yanzu zaku iya aiwatar da duk matakan da suka dace akan sabar FTP a madadin sabon mai amfani wanda ke da damar samun dama.
Mataki na 4: Sanya Firewall (Ubuntu Kawai)
Masu amfani da sauran rarrabawa zasu iya tsallake wannan matakin lafiya, tunda ba za'a buƙatar jigilar tashar jiragen ruwa ko'ina ba, a cikin Ubuntu kawai. Ta hanyar tsoho, ana saita Wutar Hanyar ta hanyar da ba za ta bari zirga-zirga mai shigowa daga adireshin da muke buƙata ba, don haka kuna buƙatar ba da izinin hanyar da hannu.
- A cikin na'ura wasan bidiyo, kunna umarnin daya bayan daya
sudo ufw musaki
dasudo ufw kunna
don sake kunna wuta. - Inara ƙa'idodin shigowa ta amfani da
sudo ufw damar 20 / tcp
dasudo ufw damar 21 / tcp
. - Bincika idan an yi amfani da ƙa'idodin shiga ta hanyar kallon matakin Wutar
matsayin sudo ufw
.
Na dabam, Ina so in lura da umarnin da yawa:
/etc/init.d/vsftpd farawa
kosabis vsftpd fara
- bincika fayil ɗin sanyi;netstat -tanp | greme LISTEN
- tabbatar da shigarwa na sabar FTP;mutum vsftpd
- kira takaddun hukuma na VSftpd don nemo bayanan da suka wajaba game da aikin mai amfani;sabis vsftpd sake kunnawa
ko/etc/init.d/vsftpd sake kunnawa
- sake saita sabar.
Dangane da samun dama ga uwar garken FTP da cigaba da aiki tare da shi, tuntuɓar wakilan wakilan ku don samun wannan bayanan. Tare da su, zaku iya fayyace bayani game da hanyoyin yaduwar abubuwa da kuma abubuwan da suka faru na kuskure iri-iri.
A kan wannan labarin ya ƙare. A yau mun bincika hanya don shigar da uwar garken VSftpd ba tare da an ɗaura shi da kowane rukuni ba, don haka yi la'akari da wannan lokacin bin umarninmu kuma gwada su da waɗanda kamfanin ya bayar wanda ke ƙunshe da sabar uwar garken ku ta kama. Bugu da kari, muna ba da shawarar ku san kanku da sauran kayanmu, wanda ke tattauna batun shigar da abubuwan LAMP.
Duba kuma: Shigar da LAMP Software Suite akan Ubuntu