CentOS 7 lub chaw khaws ntaub ntawv hauv zos (daim iav)

Yog li, ntawm no yog yuav ua li cas thiaj ua daim iav ntawm CentOS 7. Qhov txiaj ntsig ntawm qhov no yog dab tsi? Ntawm lawv, koj khaws Internet bandwidth, koj khaws cov ntawv hauv zos ntawm koj cov chaw cia khoom siv uas qhov kev rub tawm thiab kev teeb tsa tau nrawm dua, thiab qhov tseem ceeb ib qho yog qhov tseem ceeb heev uas yog qhov hloov kho server yog tias koj muaj 10 tus server lossis 1000 lub chaw ua haujlwm nrog CentOS I. xav tias qhov no yog qhov kev xaiv zoo tshaj plaws vim tias koj tuaj yeem muab cov kev pabcuam hloov kho sai thiab nrog qhov nrawm ntawm koj LAN network.

Tam sim no, koj tuaj yeem ua koj daim iav li ntawm 10 txoj kev tab sis kuv yuav qhia koj ib qho uas hauv kuv lub tswv yim yog qhov nrawm thiab nyiam tshaj plaws, zoo koj tuaj yeem ua koj daim iav hauv txhua qhov chaw faib khoom uas txhawb nqa rsyncCov. Yesiiiiii! leej twg, koj tuaj yeem nyeem tsuas yog rsync tshooj, ua lub hauv paus centOS qhov chaw khaws ntawm ubuntu, debian, fedora, redhat, slackware, lawv txhua tus txhawb rsync

rsync yog daim ntawv thov pub dawb rau Unix thiab Microsoft Windows-type systems uas muaj kev sib kis tau ntawm cov ntaub ntawv nce, uas tseem ua haujlwm nrog cov ntaub ntawv compressed thiab encrypted. Siv cov txheej txheem cim delode encode, nws tso cai rau koj los synchronize cov ntaub ntawv thiab cov chaw ntawm ob lub tshuab hauv lub network lossis nruab nrab ntawm ob qhov chaw ntawm tib lub tshuab, txo qhov ntim ntawm cov ntaub ntawv pauv.

Peb npaj mus rau nruab rsync
# yum install rsync

Ib zaug ntsia koj tsuas yog yuav tsum mus saib nyob rau hauv daim ntawv teev cov CentOS iav qee daim iav ze ntawm koj qhov chaw ze uas ua haujlwm nrog rsync (nws yog rau sab rau) Rsync Qhov Chaw

Tsim ib daim nplaub tshev uas koj tuaj yeem muab lub chaw cia khoom, Kuv tsuas yog ua daim iav ntawm CentOS 7, ua tiav nrog isos thiab txhua qhov muaj nyob, uas tau siv 38 GB, yog li coj mus rau hauv kev txiav txim siab yog tias koj yuav ua ib nrab iav ntawm lwm cov ntawv. ntawm centOS lossis tag nrho daim iav. Nws yuav nyob hauv ntau npaum li cas? Nws yog qee yam uas koj yuav tsum ntsuas.

# mkdir -p /home/repo/CentOS/7

Lub chaw cia khoom muaj tag nrho cov chaw cim no:

  • piv rau ib qho me me ais
  • centosplus
  • huab
  • cr
  • Ntxiv
  • hais nrawm
  • isos
  • os
  • sclo ua
  • cia
  • tshiab
  • tsim txiaj

rsync ua haujlwm raws li hauv qab no:

# rsync --delete-excluded --exclude "local" --exclude "isos" --exclude "*.iso"

  • Nrog cov tag rho tawm - tshem tawm thiab – txiav tawm koj tuaj yeem tsis quav ntsej folders lossis files, piv txwv li iso nplaub tshev, lossis .iso files, yooj yim heev?

# rsync -aqzH --delete msync.centos.org::CentOS /path/to/local/mirror/root

  • Nrog kev xaiv El Pov tseg, yuav muab cov ntaub ntawv tshem tawm uas tsis muaj nyob rau hauv lub hauv paus.
  • -a archive thiab khw
  • -q hom ntsiag to, suppresses cov lus tsis yuam kev
  • -z sau cov ntaub ntawv thaum hloov chaw
  • -H khaws qhov nyuaj txuas, yog tias koj xav tau Kuv kuj tseem yuav qhia kev xaiv -l los tuav symlinks

Kuv tau ua nws li cas? yooj yim zoo li no:

# rsync -avzqlH --delete --delay-updates rsync://ftp.osuosl.org/centos/7/ /home/repo/CentOS/7

Tsis txhob maj, Kuv yuav piav qhia vim li cas kuv thiaj ua li ntawd.

  • –Txoj kev hloov kho tshiab-hloov kho Muab tag nrho cov ntaub ntawv kho tshiab tom kawg ntawm tag nrho cov rub tawm, koj puas nkag siab kuv? Qhov ntawd yog, nws tsis hloov txhua zaus nws rub tawm cov ntaub ntawv tshiab, tab sis ntawm qhov tsis tooj, yog tias muaj 100 cov ntaub ntawv tshiab, tom qab ua tiav 100 qhov tshiab cov ntaub ntawv, rsync lawv qhov chaw hauv qhov chaw
  • rsync: //ftp.osuosl.org/centos/7/ vim kuv tsuas xav ua CentOS 7
  • / var / www / html / repo / CentOS / 7 qhov twg kuv yuav muab tso rau tag nrho kuv cov ntaub ntawv uas kuv tau theej los ntawm qhov.

Nws tsis tsim nyog, tab sis kuv pom zoo lub pob tsim kho dua tshiab, yooj yim nws ua li cas yog muab nws tus yam ntxwv http thiab tsim kev ntsuas rau koj lub chaw cia khoom

# yum install createrepo

Tom qab ntawd cia li khiav cov lus txib taw qhia rau koj lub chaw cia khoom

# createrepo /home/repo/CentOS/7

Tam sim no ib zaug ua tiav, koj yuav tsum qhia nws nyob rau hauv qee txoj kev, Kuv ib txwm siv http server, txuas ntxiv nrog CentOS 7, koj tuaj yeem nruab ib lub web server yooj yim raws li hauv qab no (siv httpd, nws tsis yog apache)

# yum group install -y "Basic Web Server

Tsim cov cim txuas ntawm qhov tseeb los ntawm chaw xa mus rau "www" nplaub tshev

# ln -s /home/repo /var/www/html/repo

Peb tsim cov vev xaib-muaj thiab thaj chaw-qhib cov folders
# mkdir /etc/httpd/sites-available
# mkdir /etc/httpd/sites-enabled

Peb hloov kho cov ntaub ntawv httpd.conf kom ntxiv tag nrho peb lub vev xaib-qhib lub vev xaib

# vi /etc/httpd/conf/httpd.conf

Ntxiv cov kab no tom kawg ntawm cov ntaub ntawv
Xws liOptional cov chaw-enabled / *

Peb tsim thiab kho peb lub vev xaib

# vi /etc/httpd/sites-available/repocentos.conf


ServerName repocentos.com
#ServerAlias ​​example.com
DocumentRoot / var / www / html / repo / CentOS /
Yuam KevLog /var/log/httpd/error.log
CustomLog /var/log/httpd/requests.log sib koom

Peb ua kom peb lub vev xaib los ntawm tsim cov cim txuas ua ke

# ln -s /etc/httpd/sites-available/repocentos.conf  /etc/httpd/sites-enabled/repocentos.conf

Peb hloov tus tswv thiab pab pawg ntawm cov ntaub ntawv thiab folders rau apache

# chown apache. www/ -R

Peb coj cov lus txib nram qab no kom lub web server pib los ntawm lub sijhawm peb pib lub tshuab

# systemctl enable httpd.service

Peb rov pib lub web server nrog cov lus txib nram qab no

# systemctl restart httpd

Peb tuaj yeem siv nws li cas?

Tsim cov ntaub ntawv hauv /etc/yum.repos.d/local.repo thiab muab tshuaj txhuam cov kab hauv qab no:

[os] npe = tus tswv - Base baseurl = http: //ip lossis url/ repo / CentOS / $ tso tawm / os / $ tshawb / gpgcheck = 1 gpgkey = ntawv: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [hloov tshiab] npe = tswv - Cov hloov tshiab baseurl = http: //ip lossis url/ repo / CentOS / $ tso tawm / hloov tshiab / $ tshawb fawb / gpgcheck = 1 gpgkey = ntawv: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [txuas ntxiv] lub npe = tswv - ntxiv cov baseurl = http: //ip lossis url/ repo / CentOS / $ tso tawm / ntxiv / $ tshawb fawb / gpgcheck = 1 gpgkey = ntawv: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [centosplus] npe = tswv - CentosPlus baseurl = http: //ip lossis url/ repo / CentOS / $ tso tawm / centosplus / $ tshawb fawb / gpgcheck = 1 gpgkey = ntawv: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7

Peb rov kho cov chaw cia khoom nrog:
# yum clean all

# yum repolist all

# yum update

Zoo uas yog nws rau lub sijhawm no. Raws li ib txwm nco ntsoov ua raws nraim kuv cov ncej thiab lub vev xaib no. Tawm tswv yim thiab yog li peb txhua tus qhia peb cov kev paub, txog rau lwm zaus !!!


Cov ntsiab lus ntawm tsab xov xwm ua raws li peb cov ntsiab cai ntawm kev tswj hwm kev ncaj nceesCov. Tshaj tawm ib qho yuam kev nyem no.

11 lus, tawm koj li

Tso koj saib

Koj email chaw nyob yuav tsis tsum luam tawm. Yuav tsum tau teb cov cim nrog *

*

*

  1. Lub luag haujlwm rau cov ntaub ntawv: Miguel Ángel Gatón
  2. Lub hom phiaj ntawm cov ntaub ntawv: Tswj SPAM, kev tswj xyuas tawm tswv yim.
  3. Sau raws cai: Koj kev tso cai
  4. Kev sib txuas lus ntawm cov ntaub ntawv: Cov ntaub ntawv yuav tsis raug xa mus rau lwm tus neeg thib peb tsuas yog los ntawm kev txiav txim siab raug cai.
  5. Cov ntaub ntawv khaws cia: Cov Ntaub Ntawv khaws tseg los ntawm Occentus Networks (EU)
  6. Txoj Cai: Txhua lub sijhawm koj tuaj yeem txwv, rov qab thiab tshem tawm koj cov ntaub ntawv.

  1.   elendilnarsil said

    Puas yog Centos haum rau siv ntawm lub ntsej muag kawg ntawm tus neeg siv PC? Lossis puas yog kev qias neeg thiab? Kuv twb sim nws ntawm Live-usb thiab kuv nyiam nws.

    1.    BrodyDalle said

      Nws yog qhov ruaj khov heev, nws yeej yog qhov kev xaiv zoo. Tsaug rau koj cov lus

    2.    HLO 2 Gi said

      Nyob zoo elendilnarsil, siv Fedora ua tus siv kawg nrog centos koj yuav tsum ua haujlwm ntau thiab nws yog lub server ruaj khov heev.

  2.   Gonzalo martinez said

    Lub hwj chim tuaj yeem. Tab sis nws tsis yog rau lub desktops ntawm cov neeg siv ib txwm.

    Tsis txhob poob siab yog tias Wifi lossis qee tus neeg dhia dej ntawm kuv tsis paub, lub koob yees duab web, (vim nws suav nrog cov tsav ntau dua tsis muaj dab tsi ntawm server nyuaj), uas nyob hauv repo tsis muaj pob ntawm kuv tsis paub, codecs, chaw ua haujlwm automation , los sis tej yam zoo li ntawd, los yog hais tias cov pob khoom yog cov qub (tab sis ruaj khov li hlau)

    1.    BrodyDalle said

      Kuv tsis pom zoo nrog koj, muaj cov nom repositories taw qhia kom txog rau thaum kawg no, xws li epel thiab nux https://wiki.centos.org/TipsAndTricks/MultimediaOnCentOS7

  3.   Gonzalo martinez said

    Mus rau tsab xov xwm, zoo heev !!

    Thaum koj muaj ntau lub Linux computers, cov chaw nruab ua tau sai dua thiab ntau cov kev coj ua.

    1.    BrodyDalle said

      yog lawm, tsaug rau koj cov lus

  4.   Alexmanafan said

    Nyob zoo phooj ywg, Kuv tuaj yeem rho tawm thiab rov ua dua repo rub tawm? mus ntxiv qhov twg kuv tawm?
    Tsaug

  5.   Luis said

    ib tug phooj ywg tsis ntseeg, raws li kuv haus cov repo los ntawm http, uas yog, pom cov qauv ntawm cov repo los ntawm httpd
    http://172.16.1.9 Kuv tau txais lub apache nplooj tab sis kuv xav muab http://172.16.1.9/??? saib cov qauv los ntawm http.

    Tsaug

  6.   Odnamra said

    Kuv yuav tsum nug ib lo lus nug rau cov tsis ntseeg siab uas sawv ...
    rsync -avzqlH –delete –delay-hloov tshiab rsync:…. Txawm tias muaj qhov zoo tab sis kuv tsis tas yuav muab tso rau qhov twg nws yuav mus theej tom qab?
    Piv txwv li: rsync -avzqlH –delete –delay-updates rsync:…. / khiav / tawm / miuser / Cov Ntaub Ntawv / chaw khaws khoom / centos7 / 7 /

  7.   Daniel Morales cov chaw tso duab said

    Nyob zoo sawv ntxov

    Nrhiav cov ntaub ntawv hauv Vev Xaib Kuv tau txais phau ntawv nthuav no uas koj sau, Zoo siab rau qhov ntawd. Kuv cov lus nug tshwm sim vim tias kuv xav tsim Mirror nrog ntau lub Linux faib khoom, Centos, OracleLinux, Debian, txhua tus ntawm lawv nrog lawv cov ntawv tawm tshiab kawg uas kuv tau nruab rau hauv lub tuam txhab. Tab sis yuav ua li cas Kuv tuaj yeem ua rau tib daim iav server khaws cia ntau cov kev faib tawm thiab cov qauv tshiab? Kuv puas tsim tau lwm tus ntawv nplaub tshev nrog lub npe ntawm cov faib khoom thiab lwm yam? Cov chaw cia khoom no tau hloov kho qhov tseeb lossis kuv puas yuav tsum tau khiav ib qho lus txib txhua zaus? Saib xyuas koj cov lus. Zoo siab hnub