Gidan ajiyar gida na CentOS 7 (madubi)

Idan haka ne, anan na kawo muku yadda ake madubin CentOS 7. Menene amfanin wannan? Daga cikin su, kuna adana bandwidth na Intanit, kuna adana kwafin gidajan wuraren ajiyar ku wanda abubuwan da zazzagewa da shigarwa suke da sauri da sauri, kuma babban ɗayan yana da amfani sosai azaman sabar sabunta idan kuna da sabobin 10 ko wuraren aiki 1000 tare da CentOS Ina tsammanin wannan shine mafi kyawun zaɓin ku saboda kuna iya ba da sabis na ɗaukakawa cikin sauri kuma tare da saurin hanyar sadarwar ku ta LAN.

Yanzu, zaku iya yin madubin ku ta hanyoyi kusan 10 amma zan gaya muku wanda a ganina shine mafi sauri kuma mafi dacewa, da kyau zaka iya yin madubinka a kowane rarrabawa wanda yake tallafawa rsync. Yesiiiiii! kowa, zaka iya karanta sashin rsync kawai, kayi wurin ajiye CentOS na gida akan ubuntu, debian, fedora, redhat, slackware, duk suna tallafawa rsync

rsync Aikace-aikacen kyauta ne don tsarin Unix da Microsoft Windows wanda ke ba da ingantaccen watsa bayanai, wanda kuma yake aiki tare da matattarar bayanai da aka rufesu. Ta amfani da dabarar dalla dalla, yana baka damar aiki tare da fayiloli da kundayen adireshi tsakanin injina biyu akan hanyar sadarwa ko tsakanin wurare biyu akan mashin guda, rage girman bayanan da aka sauya.

Muna ci gaba da girka rsync
# yum install rsync

Da zarar an shigar sai kawai ka duba cikin jerin Madubin CentOS wani madubi kusa da yankinku wanda ke aiki tare da rsync (shafi na shida kenan) Wurin Rsync

Irƙiri babban fayil inda za ku iya ajiye ma'ajiyar, Na yi madubi ne kawai na CentOS 7, cikakke tare da isos da duk manyan fayilolin da ke akwai, waɗanda suka ɗauki 38 GB, don haka ku yi la'akari idan za ku yi madubi na juzu'i na wasu sigar na centOS ko cikakken madubi. Yaya sarari zai mamaye? Abu ne da yakamata ku kimanta.

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

Ma'ajin yana da duk waɗannan manyan fayiloli:

  • kwayar zarra
  • tsakiya
  • girgijen
  • cr
  • Exras
  • waƙar sauri
  • isos
  • os
  • sclo
  • ajiya
  • updates
  • kusan

rsync yayi aiki kamar haka:

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

  • Tare da share alamar - cirewa da –ka hada da zaka iya watsi da manyan fayiloli ko fayiloli, misali babban fayil iso, ko fayilolin

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

  • Tare da zaɓi –Ka share, zai share fayilolin da ba su wanzu a asalin.
  • -a ajiya da adanawa
  • -q yanayin shiru, yana danne sakonnin da ba kuskure ba
  • -z damfara bayanai yayin canja wuri
  • -H kiyaye hanyoyin haɗi, idan kuna so zan kuma ba da shawarar zaɓi -l rike alamomin daidaitawa

Ta yaya na yi shi? sauki kamar wannan:

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

Kada ku yi sauri, zan bayyana dalilin da yasa nayi haka.

  • -Daukaka-sabuntawa Sanya dukkan fayilolin da aka sabunta a karshen duk abin da aka sauke, kun fahimce ni? Wato, ba ya sabunta duk lokacin da ya zazzage sabon fayil, amma akasin haka, idan akwai sabbin fayiloli 100, bayan kammala sabbin fayilolin 100, sai a zame su sanya wuri
  • rsync: //ftp.osuosl.org/centos/7/ saboda kawai ina son inyi CentOS 7
  • / var / www / html / repo / CentOS / 7 inda zan saka duk fayilolin da na kwafa daga asalin.

Ba lallai ba ne, amma ina ba da shawarar kunshin createrapo, kawai abin da yake yi shine a ba shi halayyar http kuma ƙirƙirar ma'auni don ma'ajiyar ku

# yum install createrepo

To kawai ka kunna umarnin da ke nuna wurin ajiyarka

# createrepo /home/repo/CentOS/7

Yanzu da zarar an gama, dole ne a raba shi ta wata hanya, koyaushe ina amfani da sabar http, tare da ci gaba da CentOS 7, zaku iya girka sabar gidan yanar gizo kamar haka (amfani da httpd, ba apache bane)

# yum group install -y "Basic Web Server

Irƙiri alamar alama daga ainihin wurin adanawa zuwa babban fayil ɗin "www"

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

Muna ƙirƙirar manyan shafuka masu amfani da shafuka
# mkdir /etc/httpd/sites-available
# mkdir /etc/httpd/sites-enabled

Muna shirya fayil ɗin httpd.conf don ƙara duk shafukan yanar gizonmu masu aiki

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

Sanya wannan layin zuwa karshen fayil din
Hada da Zaɓuɓɓukan zaɓi-an kunna / *. Conf

Mun ƙirƙiri da shirya gidan yanar gizon mu

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


Sunan uwar garken repocentos.com
#ServerAlias ​​misali.com
DocumentRoot / var / www / html / repo / CentOS /
KuskurenLog /var/log/httpd/error.log
CustomLog /var/log/httpd/requests.log haɗe

Muna kunna rukunin yanar gizon mu ta hanyar ƙirƙirar alamar alama

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

Mun canza mai shi da rukunin fayiloli da manyan fayiloli don apache

# chown apache. www/ -R

Muna aiwatar da umarni mai zuwa don sabar yanar gizo ta fara daga lokacin da muka fara inji

# systemctl enable httpd.service

Muna sake farawa sabar yanar gizo tare da umarni mai zuwa

# systemctl restart httpd

Ta yaya za mu iya amfani da shi?

Createirƙiri fayil a cikin /etc/yum.repos.d/local.repo kuma liƙa layuka masu zuwa:

[os] suna = master - Tushe baseurl = http: //ip ko url/ repo / CentOS / $ release / os / $ basearch / gpgcheck = 1 gpgkey = fayil: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [sabuntawa] suna = maigida - Sabuntawa baseurl = http: //ip ko url// http: //ip ko url/ repo / CentOS / $ release / extras / $ basearch / gpgcheck = 1 gpgkey = fayil: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7 [centosplus] suna = master - CentosPlus baseurl = http: //ip ko url/ repo / CentOS / $ release / centosplus / $ basearch / gpgcheck = 1 gpgkey = fayil: /// etc / pki / rpm-gpg / RPM-GPG-KEY-CentOS-7

Muna shakatawa wuraren ajiya tare da:
# yum clean all

# yum repolist all

# yum update

To shi ke nan ga wannan lokacin. Kamar yadda koyaushe ku tuna da bin diddigi da wannan gidan yanar gizon. Sharhi kuma don haka duk muna raba iliminmu, har zuwa lokaci na gaba !!!


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

11 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   dansuwannark m

    Shin Centos ya dace da amfani akan PC ɗin mai amfani na ƙarshen? Ko dai barnatar da dukiya ne? Na kasance ina gwada shi ta hanyar Live-usb kuma ina matukar son shi.

    1.    Rariya m

      Yana da karko sosai, hakika zaɓi ne mai kyau. Godiya ga bayaninka

    2.    HO2 Gi m

      Ya ƙaunataccen elendilnarsil ya yi amfani da Fedora a matsayin mai amfani na ƙarshe tare da centos dole ne ku yi aiki da yawa kuma yana da daidaitaccen sabar.

  2.   Gonzalo Martinez m

    Canarfi na iya. Amma ba a shirya shi don tebur na masu amfani da shi ba.

    Kada kuyi mamaki idan Wifi ko wasu masanan basu sani ba, kyamarar yanar gizo, (tunda ya haɗa da direbobi fiye da komai na uwar garke mai wuya), cewa a cikin repo babu kunshin abin da ban sani ba, kodin, ofishin aiki, ko wani abu kamar haka, ko kuma fakitin sun tsufa (amma tsayayye ne kamar ƙarfe)

    1.    Rariya m

      Ban yarda da ku ba, akwai wuraren adana bayanai na hukuma waɗanda suka dace da wannan ƙarshen, kamar su epel da nux https://wiki.centos.org/TipsAndTricks/MultimediaOnCentOS7

  3.   Gonzalo Martinez m

    Zuwa labarin, madalla !!

    Lokacin da kake da adadi mai yawa na kwamfutocin Linux, shigarwar suna zama da sauri da aiki sosai.

    1.    Rariya m

      hakan yayi daidai, godiya ga tsokacinka

  4.   alexmanafan m

    Sannu abokin aiki, zan iya sokewa kuma in ci gaba da sauke repo? ci gaba daga inda na baro?
    Gracias

  5.   Luis m

    shakka aboki, kamar yadda nake cinye repo ta http, ma'ana, duba tsarin repo daga httpd
    http://172.16.1.9 Ina samun shafin apache amma ina so in saka http://172.16.1.9/??? don ganin tsarin ta http.

    gracias

  6.   Odnamara m

    Ina buƙatar yin tambaya don shakku da suka faru ...
    rsync -avzqlH –delete –delay-updates rsync:…. Koda akwai ok amma ba sai na sanya inda za'a kwafa ba daga baya?
    Misali: rsync -avzqlH –delete –delay-updates rsync:…. / gudu / kafofin watsa labarai / miuser / Bayanai / ma'aji / centos7 / 7 /

  7.   Daniel Morales mai sanya hoto m

    Barka da rana

    Neman bayani akan Gidan yanar gizo na samu wannan littafin mai dadi wanda kuka rubuta, Barka da wannan. Tambayata ta tashi ne saboda ina son ƙirƙirar Madubi tare da rarraba Linux da yawa, Centos, OracleLinux, Debian, dukansu da sabbin kayan aikin da na girka a kamfanin. Amma ta yaya zan iya sanya uwar garken madubi iri ɗaya adana rarrabawa iri iri? Shin ya kamata in ƙirƙiri wani babban fayil da sunan rabarwar da sauransu? Ana sabunta waɗannan wuraren ajiyar kai tsaye ko kuwa dole ne in gudanar da umarni kowane lokaci sau da yawa? Kalli bayanan ku. Ranar farin ciki