Malo osungira zinthu a CentOS 7 (galasi)

Ngati ndi choncho, apa ndikubweretserani momwe mungapangire galasi la CentOS 7. Ubwino wake ndi chiyani? Mwa iwo, mumasunga bandwidth pa intaneti, mumasunga malo anu osungira omwe kutsitsa ndi kukhazikitsa kwawo kuli mwachangu kwambiri, ndipo chachikulu ndichofunikira kwambiri ngati seva yosinthira ngati muli ndi ma seva 10 kapena malo ogwirira ntchito 1000 CentOS Ndikuganiza kuti iyi ndi njira yabwino kwambiri chifukwa mutha kupereka ntchito yosintha mwachangu komanso mwachangu intaneti yanu ya LAN.

Tsopano, mutha kupanga galasi lanu m'njira pafupifupi 10 koma ndikuwuzani yomwe ndikuganiza kuti ndiyachangu komanso yosavuta, chabwino mutha kupanga galasi lanu pakugawana kulikonse komwe kumathandizira rsync. Yesiiiiii! aliyense, mutha kuwerenga gawo la rsync lokha, kupanga malo osungira CentOS ku ubuntu, debian, fedora, redhat, slackware, onse amathandizira rsync

rsync ndi pulogalamu yaulere ya Unix ndi Microsoft Windows-mtundu wamtundu womwe umapereka kufalitsa koyenera kwazowonjezera, zomwe zimagwiranso ntchito ndi zothinikizidwa komanso zosungidwa mwachinsinsi. Pogwiritsa ntchito njira yokhoterera ya delta, imakupatsani mwayi wolunzanitsa mafayilo ndi makina pakati pa makina awiri pa netiweki kapena pakati pa malo awiri pamakina omwewo, ndikuchepetsa kuchuluka kwa zomwe zasinthidwa.

Tikupitiliza kukhazikitsa rsync
# yum install rsync

Mukayika muyenera kungoyang'ana mndandanda wa Magalasi a CentOS galasi lina pafupi ndi kwanuko lomwe limagwira ntchito ndi rsync (ndilo gawo lachisanu ndi chimodzi) Malo a Rsync

Pangani chikwatu chomwe mungayikemo malo, ndidangopanga galasi la CentOS 7, lodzaza ndi ma isos ndi mafoda onse omwe alipo, omwe adatenga 38 GB, chifukwa chake lingalirani ngati mupanga kalilole wamitundu ina ya centOS kapena galasi lathunthu. Kodi idzakhala ndi malo angati? Ndi chinthu chomwe muyenera kuwunika.

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

Malo osungira ali ndi mafoda onsewa:

  • atomiki
  • centosplus
  • mtambo
  • cr
  • zoonjezera
  • yachangu
  • isos
  • os
  • sclo
  • yosungirako
  • zosintha
  • mphamvu

rsync imagwira ntchito motere:

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

  • Ndi chizindikirocho chotsani - osachotsedwapo -kupatula mutha kunyalanyaza zikwatu kapena mafayilo, fayilo ya fayilo, kapena mafayilo a .iso, zosavuta?

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

  • Ndi kusankha -Chotsani, Idzachotsa mafayilo omwe sanapezekenso pagwero.
  • -a zosunga ndi kusunga
  • -q mawonekedwe chete, kupondereza uthenga wosalakwitsa
  • -z compress data posamutsa
  • -H sungani maulalo ovuta, ngati mungafune ndikulimbikitsanso kusankha -l kugwira symlinks

Ndinachita bwanji izi? zosavuta monga izi:

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

Osathamanga, ndikufotokozera chifukwa chomwe ndidachitira izi.

  • -Zochedwa-zosintha Ikani mafayilo osinthidwa kumapeto kwa kutsitsa konse, mukundimvetsa, ndiye kuti samasintha nthawi iliyonse akatsitsa fayilo yatsopano, koma m'malo mwake, ngati panali mafayilo atsopano 100, mukamaliza 100 yatsopano owona, rsync iwo malo m'malo
  • rsync: //ftp.osuosl.org/centos/7/ chifukwa ndikungofuna kuchita CentOS 7
  • / var / www / html / repo / CentOS / 7 komwe ndikayika mafayilo anga onse omwe ndidakopera kuchokera komweko.

Sikoyenera, koma ndikupangira phukusi alireza, zomwe zimangochitika ndikupatsirani mawonekedwe a http ndikupanga cholozera chosungira chanu

# yum install createrepo

Kenako ingothamangitsani lamulo losonyeza malo anu

# createrepo /home/repo/CentOS/7

Tsopano mukamaliza, muyenera kugawana nawo mwanjira ina, nthawi zonse ndimagwiritsa ntchito seva ya http, kupitiliza ndi CentOS 7, mutha kukhazikitsa tsamba loyambira motere (gwiritsani ntchito httpd, si apache)

# yum group install -y "Basic Web Server

Pangani ulalo wophiphiritsa kuchokera patsamba lenileni lenileni kupita ku chikwatu cha "www"

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

Timapanga zikwatu zomwe zimapezeka pamasamba komanso zotsegula masamba
# mkdir /etc/httpd/sites-available
# mkdir /etc/httpd/sites-enabled

Timasintha fayilo ya httpd.conf kuti tiwonjezere masamba athu onse omwe ali ndi masamba omwe alipo

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

Onjezani mzerewu kumapeto kwa fayilo
Phatikizani Masamba omwe asankhidwa / *

Timapanga ndikusintha tsamba lathu

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


ServerName repocentos.com
#ServerAlias ​​example.com
DocumentRoot / var / www / html / repo / CentOS /
ZolakwitsaLog /var/log/httpd/error.log
CustomLog /var/log/httpd/requests.log kuphatikiza

Timatsegula tsamba lathu popanga ulalo wophiphiritsa

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

Timasintha eni ndi gulu la mafayilo ndi mafoda a apache

# chown apache. www/ -R

Timapereka lamulo lotsatila kuti seva ya pa intaneti iyambe kuyambira pomwe tidayamba makinawo

# systemctl enable httpd.service

Timayambitsanso seva la intaneti ndi lamulo lotsatira

# systemctl restart httpd

Kodi tingagwiritse ntchito bwanji?

Pangani fayilo mu /etc/yum.repos.d/local.repo ndi kuyika mizere ili:

[os] name = master - Base baseurl = http: //ip kapena url/ repo / CentOS / $ release / os / $ basearch / gpgcheck = 1 gpgkey = fayilo: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [zosintha] name = master - Zosintha baseurl = Zamgululiip kapena url/ repo / CentOS / $ release / updates / $ basearch / gpgcheck = 1 gpgkey = file: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [zowonjezera] name = master - Zowonjezera baseurl = Zamgululiip kapena url/ repo / CentOS / $ release / zowonjezera / $ basearch / gpgcheck = 1 gpgkey = fayilo: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [centosplus] name = master - CentosPlus baseurl = Zamgululiip kapena url/ repo / CentOS / $ release / centosplus / $ basearch / gpgcheck = 1 gpgkey = fayilo: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7

Timatsitsimutsa zosungira ndi:
# yum clean all

# yum repolist all

# yum update

Ndizo zonse za nthawi ino. Monga nthawi zonse kumbukirani kutsatira mosamala positi yanga ndi tsambali. Ndemanga motero tonse timagawana zomwe tikudziwa, mpaka nthawi ina !!!


Ndemanga za 11, siyani anu

Siyani ndemanga yanu

Anu email sati lofalitsidwa. Amafuna minda amalembedwa ndi *

*

*

  1. Wotsogolera pazosankhazi: Miguel Ángel Gatón
  2. Cholinga cha deta: Control SPAM, kasamalidwe ka ndemanga.
  3. Kukhazikitsa: Kuvomereza kwanu
  4. Kulumikizana kwa zomwe zafotokozedwazo: Zomwezo siziziwululidwa kwa anthu ena kupatula pakukakamizidwa mwalamulo.
  5. Zosunga: Zosungidwa ndi Occentus Networks (EU)
  6. Ufulu: Nthawi iliyonse mutha kuchepetsa, kuchira ndikuchotsa zidziwitso zanu.

  1.   kutchfun anati

    Kodi Centos ndi yoyenera kugwiritsidwa ntchito pa PC yogwiritsa ntchito omaliza? Kapena ndikungowononga chuma? Ndakhala ndikuyiyesa kudzera pa Live-usb ndipo ndimakonda kwambiri.

    1.    brodydalle anati

      Ndi khola kwambiri, ndi njira yabwino. Zikomo chifukwa cha ndemanga yanu

    2.    HO2 Gi anati

      Wokondedwa elendilnarsil gwiritsani ntchito Fedora ngati wogwiritsa ntchito kumapeto ndi ma centos muyenera kugwira ntchito kwambiri ndipo ndi seva yokhazikika.

  2.   Gonzalo Martinez anati

    Mphamvu imatha. Koma sikuti imapangidwira ma desktops ogwiritsa ntchito wamba.

    Musadabwe ngati Wifi kapena njira zina zomwe sindikudziwa, kamera yapaintaneti, (popeza imaphatikizapo oyendetsa kuposa china chilichonse cha seva), kuti repo palibe phukusi la sindikudziwa, ma codec, maofesi, kapena china chonga icho, kapena kuti maphukusowo ndi akale (koma okhazikika ngati chitsulo)

    1.    brodydalle anati

      Sindikugwirizana nanu, pali malo ena ovomerezeka kumapeto kwake, monga epel ndi nux https://wiki.centos.org/TipsAndTricks/MultimediaOnCentOS7

  3.   Gonzalo Martinez anati

    Kupita ku nkhani, zabwino !!

    Mukakhala ndi makompyuta ambiri a Linux, makhazikitsidwe ake amakhala achangu kwambiri komanso othandiza.

    1.    brodydalle anati

      kulondola, zikomo chifukwa cha ndemanga yanu

  4.   Alireza anati

    Moni mnzake, nditha kuletsa ndikuyambiranso kutsitsa? kupitiliza komwe ndidachoka?
    Gracias

  5.   Luis anati

    wokayika mnzako, momwe ndimadya repo ndi http, ndiye kuti, onani mawonekedwe a repo kuchokera ku httpd
    http://172.16.1.9 Ndimatenga tsamba la apache koma ndikufuna kuyika http://172.16.1.9/??? kuti muwone kapangidwe kake ndi http.

    gracias

  6.   odhnamra anati

    Ndiyenera kufunsa funso lokayika lomwe lidayamba ...
    rsync -avzqlH -chotsani -kubwezeretsani zosintha rsync:…. Ngakhale zilipo koma sindiyenera kuyika komwe zidzakopedwe mtsogolo?
    Mwachitsanzo: rsync -avzqlH -delete-Kuchedwa-zosintha rsync:…. / run / media / miuser / Data / chosungira / centos7 / 7 /

  7.   Chithunzi cha Daniel Morales anati

    Wokondedwa masana abwino

    Ndikufunafuna zambiri pa intaneti ndili ndi buku losangalatsa lomwe mudalemba, Zikomo kwambiri chifukwa cha izi. Funso langa limabwera chifukwa ndikufuna kupanga Mirror yokhala ndi magawo angapo a Linux, Centos, OracleLinux, Debian, onse ndi mitundu yawo yaposachedwa yomwe ndayika mu kampaniyo. Koma ndingathe bwanji kupanga seva yofananira yamagalasi imasunga magawo ndi mitundu ingapo? Kodi ndiyenera kupanga chikwatu china chokhala ndi dzina lazogawa ndi zina zotero? Zosungiramo izi zimasinthidwa zokha kapena kodi ndiyenera kuyendetsa lamulo pafupipafupi? Yang'anirani ndemanga zanu. Tsiku losangalala