Mepụta FTP Server na Linux

Pin
Send
Share
Send

A na-ebufe mbufe Faịlị na netwọk site na sava FTP ahaziri nke ọma. Usoro ogbako dị otú a na-arụ ọrụ site na iji TCP na nhazi ụlọ ọrụ nke ndị ahịa ma na-eji njikọ dị iche iche maka netwọkụ iji hụ na nnyefe nke iwu n'etiti ọnụ jikọọ ọnụ. Ndị ọrụ ejikọtara na otu Bochum na-eche ihu na mkpa ịhazi sava FTP onwe onye dabere na ihe ụlọ ọrụ na-enye ọrụ ndozi saịtị ma ọ bụ sọftụ ọzọ. Na-esote, anyị ga-egosipụta otu esi ekepụta sava dị otu na Linux na iji otu ọrụ dịka ọmụmaatụ.

Mepụta sava FTP na Linux

Taa, anyị ga-eji ngwá ọrụ akpọrọ VSftpd. Uru nke sava FTP dị otú ahụ bụ na ọ na-arụ ọrụ na ọtụtụ sistemụ arụmọrụ na ndabara, na-ejigide mkpokọta nke nkesa Linux dị iche iche, ọ dịkwa mfe ịhazi maka ịrụ ọrụ kwesịrị ekwesị. Site n'ụzọ, ejiri FTP a rụọ ọrụ na Linux kernel, ọtụtụ ụlọ ọrụ Bochum na-atụ aro ịwụnye VSftpd. Ya mere, ka anyị leba anya na ntinye nke usoro na nhazi nke ngwa ndị dị mkpa.

Kwụpụ 1: Wụnye VSftpd

Site na ndabara, ọba akwụkwọ VSftpd niile achọrọ adịghị etinye na nkesa, yabụ ịkwesịrị iji aka ị budata ha site na njikwa. A na-eme ya dị ka ndị a:

  1. Mepee "Ọnụ" ọ bụla dabara adaba, dịka ọmụmaatụ, site na menu.
  2. Ndị nwe Debian ma ọ bụ Ubuntu nke mbipụta mkpa ịdebanye aha iwuwụnye apt-nweta wụnye vsftpd. CentOS, Fedora -yum wụnye vsftpd, na nke Gentoo -iputa vsftpd. Mgbe iwebata, pịa Banyebido ịmalite nrụnye.
  3. Ji okwuntughe kwesiri ekwesi
  4. Chere maka mmecha nke ịgbakwunye faịlụ ọhụrụ na sistemụ ahụ.

Anyị na-adọta uche nke ndị nwe CentOS na-eji sava mebere raara onwe ha nye nke sava ọ bụla. Youkwesiri imelite modulu OS kernel, n'ihi na n'enweghị usoro a, njehie dị oke njọ ga-apụta n'oge nrụnye. Tinye iwu ndị a

mmelite ohuru
rpm -Uvh //www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum wụnye 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 wụnye kernel-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 wụnye kernel-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 wụnye kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-heads-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye kernel-ml-nkpu-isi-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 wụnye kernel-ml-tool-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum ịwụnye 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 wụnye 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 wụnye perf-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 wụnye Python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum --enablerepo = elrepo-kernel wụnye kernel-ml

Mgbe ịmechara usoro a, gbaa faịlụ nhazi ahụ n'ụzọ ọ bụla./boot/grub/grub.conf. Gbanwee ihe ndị dị na ya ka n'ikpeazụ usoro ndị a nwere ụkpụrụ dị mma:

ndabara = 0
oge elekere = 5
aha vmlinuz-4.0.4-1.el7.elrepo.x86_64
mgbọrọgwụ (hd0.0)
kernel /boot/vmlinuz-4.0.4-1.el7.elrepo.x86_64 console = hvc0 xencons = tty0 root = / dev / xvda1 ro
initrd /boot/initramfs-4.0.4-1.el7.elrepo.x86_64.img

Mgbe ahụ ị ga-emegharị sava ahụ raara onwe ya nye ma gaa na ntinye nke sava FTP na kọmputa ahụ.

Nzọụkwụ 2: Mbido FTP Server Mbido

Tinyere mmemme ahụ, ebudatara faịlụ nhazi ya na kọmputa, na-amalite site na ọrụ sava FTP. A na-eme ntọala niile n'otu n'otu dabere na nkwenye nke ndị ọbịa ma ọ bụ mmasị gị. Anyị nwere ike gosipụta otu esi emeghe faịlụ a yana ihe ndị elere anya kwesịrị ị attentiona ntị.

  1. Na sistemụ arụmọrụ Debian ma ọ bụ Ubuntu, faịlụ nhazi ahụ na-agba dị ka nke a:sudo nano /etc/vsftpd.conf. Na CentOS na Fedora, ọ nọ n'ụzọ/etc/vsftpd/vsftpd.confna Gentoo -/etc/vsftpd/vsftpd.conf.example.
  2. Faịlị n’onwe ya na-egosi na njikwa ma ọ bụ onye edemede ederede. Biko mara isi ihe dị n'okpuru. Na faịlụ nhazi gị, ha kwesịrị inwe otu ụkpụrụ.

    amaghi_enable = O dighi
    local_enable = EE
    Writ_enable = EE
    chroot_local_user = EE

  3. Mee ederede ndị fọdụrụ na onwe gị, mgbe nke ahụ gasị, echefula ịchekwa mgbanwe ndị ahụ.

Kwụpụ 3: dinggbakwunye onye ọrụ dị elu

Ọ bụrụ n’ịgaghị arụ ọrụ na sava FTP site na nnukwu akaụntụ gị ma ọ bụ ịchọrọ ịnye ndị ọrụ ndị ọzọ ohere, profaịlụ emepụtara ga-enwerịrị ikike karịrị nke na ịnweta ike VSftpd anaghị eme ka nnabata nweta njehie.

  1. Na-agba ọsọ "Ọnụ" ma tinye iwu aonye tinye sudo adduser1ebe onye ọrụ1 - Aha nke akaụntụ ọhụrụ.
  2. Nịm paswọọdụ ya, wee gosipụta ya. Na mgbakwunye, anyị na-akwadosi ike ka ị cheta ndekọ ụlọ nke akaụntụ ahụ, n'ọdịnihu ị nwere ike ịnweta ya site na njikwa.
  3. Dejupụta ozi ihe omuma - aha zuru oke, ọnụ ọgụgụ ụlọ, nọmba ekwentị na ozi ndị ọzọ, ọ bụrụ na achọrọ.
  4. Mgbe nke a gasị, nye onye ọrụ ikike ikike ahụ site na itinye iwusudo adduser user1 sudo.
  5. Mepụta ndekọ dị iche maka onye ọrụ iji chekwaa faịlị yasudo mkdir / home / user1 / faịlụ.
  6. Na-esote, gafere na ebe nchekwa ụlọ gị site nacd / ụlọma n’ebe ahụ mee onye ọrụ ọhụrụ nwe onye nwe ndekọ gị site na iji kọmputa edegbanyere mkpọrọgwụ: mgbọrọgwụ / ụlọ / onye ọrụ1.
  7. Tinyegharịa ihe nkesa ahụ ma emechaa mgbanwe niilesudo ọrụ vsftpd Malitegharịa ekwentị. Naanị na nkesa Gentoo ka uru a na-ebugharị/etc/init.d/vsftpd Malitegharịa ekwentị.

Ugbu a ị nwere ike ịrụ ọrụ niile dị mkpa na sava FTP n'aha onye ọrụ ọhụụ nwere ikike ịnweta ohere dị elu.

Kwụpụ 4: Hazie Firewall (Ubuntu naanị)

Ndị ọrụ nkesa ndị ọzọ nwere ike ịmịpụ nzọụkwụ a n'enweghị nsogbu, ebe ọ bụ na achọghịzi nhazi ọdụ ụgbọ mmiri n'ebe ọ bụla, naanị na Ubuntu. Site na ndabara, a na-ahazi Firewall n'ụzọ nke na ọ gaghị ekwe ka okporo ụzọ na-abata site na adres anyị chọrọ, yabụ ị ga-eji aka gị kwere ka ederede ya.

  1. Na njikwa, rụọ ọrụ nyere iwu otu otusudo ufw gbanyụọnasudo ufw nyeereiji bido ịmalitegharị nchekwa ọkụ.
  2. Tinye iwu inbound jirisudo ufw kwere 20 / tcpnasudo ufw ekwe 21 / tcp.
  3. Lelee ma ọ bụrụ etinyere iwu nke etinyere site na ilele ọkwa ọkụọnọdụ sudo ufw.

Iche iche, Achọrọ m ịchọba ọtụtụ iwu bara uru:

  • /etc/init.d/vsftpd bidoma obuọrụ vsftpd mmalite- nyocha nke faịlụ nhazi;
  • netstat -tanp | grepu LISTEN- nkwenye nke nrụnye nke sava FTP;
  • nwoke vsftpd- kpọọ akwụkwọ ọrụ nke VSftpd iji chọta ozi dị mkpa gbasara arụmọrụ nke ike ahụ;
  • malitegharịa ọrụ vsftpdma obu/etc/init.d/vsftpd Malitegharịa ekwentị- nrụpụta sava.

Banyere ịnweta sava FTP na ịrụ ọrụ ọzọ na ya, kpọtụrụ ndị nnọchi anya gị maka inweta data a. Iji ha, ị nwere ike ịkọwa ozi gbasara aghụghọ nke ịmegharị ihe na ntanetị nke ụdị njehie dị iche iche.

N'isiokwu a bịara na njedebe. Taa anyị nyochara usoro maka ịwụnye sava VSftpd na-ejikọghị ya na Bochum ọ bụla, yabụ tụlee nke a mgbe ị na-agbaso ntuziaka anyị ma jiri ya tụnyere ụlọ ọrụ nke nwere sava sava gị. Na mgbakwunye, anyị na-akwado ka ịmara nke ọma na ihe ndị ọzọ, nke na-ekwu maka isiokwu nke ịwụnye ihe LAMP.

Hụ kwa: Wụnye LAMP Software Suite na Ubuntu

Pin
Send
Share
Send