Otu esi etinye MariaDB 10.6 na Debian 11

MariaDB bụ otu n'ime ọdụ data mepere emepe kacha ewu ewu na-esote onye malitere ya MySQL. Ndị okike mbụ nke MySQL mepere MariaDB na nzaghachi egwu na MySQL ga-abụ na mberede na-aghọ ọrụ a na-akwụ ụgwọ n'ihi na Oracle nwetara ya na 2010. Site na akụkọ ihe mere eme nke ime usoro ndị dị otú ahụ, ndị mmepe n'azụ MariaDB kwere nkwa na ha ga-edebe ya na-emeghe isi na pụọ ​​na egwu dị otú ahụ dị ka ihe merenụ. MySQL.

MariaDB aghọwo nnọọ ewu ewu dị ka MySQL ya na ndị mmepe, nwere njiri dị ka nchịkọta dị elu nwere ụyọkọ Galera 4, cache/indexes ngwa ngwa, igwe nchekwa, yana atụmatụ/mgbakwunye ị gaghị ahụ na ya MySQL.

N'ime nkuzi a, ị ga-amụta Otu esi etinye MariaDB 10.6 na Debian 11.

Prerequisites

  • OS akwadoro: Nnenna 11 Bullseye
  • Akaụntụ onye ọrụ: Akaụntụ onye ọrụ nwere sudo ma ọ bụ ohere mgbọrọgwụ.

Na-emelite Sistemụ Ọrụ

Melite gi Debian 11 Sistemụ arụmọrụ iji hụ na ngwugwu niile dị adị adịla ugbu a:

sudo apt update && sudo apt upgrade

Wụnye Dependencies

Nzọụkwụ mbụ bụ ịwụnye ihe ndabere achọrọ maka nrụnye. Iji mee nke a, jiri iwu a na njedebe gị:

sudo apt-get install curl software-properties-common dirmngr -y

Advertisement


Bubata igodo GPG na ebe nchekwa

Iji wụnye MariaDB nke ọma, ị ga-ebubata igodo GPG iji chọpụta na ngwugwu ndị ahụ sitere na isi mmalite na agbanweghị ya. Iji mee nke a, jiri iwu a:

sudo curl -LsSO https://mariadb.org/mariadb_release_signing_key.asc
sudo chmod -c 644 mariadb_release_signing_key.asc
sudo mv -vi mariadb_release_signing_key.asc /etc/apt/trusted.gpg.d/
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.realcompute.io/mariadb/repo/10.6/debian bullseye main'

Rịba ama, enwere ike ịchọta enyo nbudata na peeji a si MariaDB ntọala ka ịchọta ebe dị gị nso maka ebe nchekwa.

Ihe atụ mmepụta:

Ugbu a igodo na ebe nchekwa ebubatara melite ndepụta njikwa ngwugwu dabara adaba iji gosipụta mgbakwunye ọhụrụ ahụ.

sudo apt update

Tinye MariaDB

Iji wụnye MariaDB, ị ga-achọ ịwụnye onye ahịa na ngwugwu ihe nkesa. Enwere ike ime nke a dị ka ndị a:

sudo apt install mariadb-server mariadb-client

Ihe atụ mmepụta:

Otu esi etinye MariaDB 10.6 na Debian 11

Pịnye Y Ọzọkwa pịa igodo ntinye ịga n'ihu na nwụnye.

Kwado nrụnye nke MariaDB site na ịlele ụdị ma wuo:

mariadb --version

Ihe atụ mmepụta:

mariadb  Ver 15.1 Distrib 10.6.4-MariaDB, for debian-linux-gnu (x86_64) using readline EditLine wrapper

Advertisement


Lelee ọkwa nkesa MariaDB

Ugbu a ị tinyela MariaDB, ị nwere ike nyochaa ọnọdụ nke ngwanrọ nchekwa data site na iji usoro systemctl na-esonụ:

systemctl status mariadb

Site na ndabara, ị ga-ahụ ọkwa MariaDB ka ọ kwụsịrị. Iji malite MariaDB, jiri iwu a:

sudo systemctl start mariadb

Ugbu a lelee ọkwa ahụ, ma ị ga-enweta ihe ndị a:

Otu esi etinye MariaDB 10.6 na Debian 11

Iji kwụsị MariaDB:

sudo systemctl stop mariadb

Iji mee ka MariaDB nwee ike na mmalite sistemụ:

sudo systemctl enable mariadb

Iji gbanyụọ MariaDB na mmalite sistemụ:

sudo systemctl disable mariadb

Ka ịmalitegharịa ọrụ MariaDB:

sudo systemctl restart mariadb

Chekwaa MariaDB site na iji script nchekwa

Mgbe ị wụnye MariaDB ọhụrụ, ntọala ndabara nke ndabara na-ewere na ọ bụ adịghị ike site n'ọtụtụ ụkpụrụ ma na-akpata nchegbu maka ike ikwe ka intrusion ma ọ bụ na-erigbu ndị hackers, ihe ngwọta bụ ịmegharị edemede nche nrụnye nke na-abịa na ya. MariaDB ndozi.

Mbụ, jiri iwu na-esonụ iji malite (mysql_secure_installation):

sudo mysql_secure_installation

Na-esote, soro n'okpuru:

  • Ịtọ ntọala paswọọdụ maka mgbọrọgwụ akaụntụ.
  • Iwepu akaụntụ mgbọrọgwụ nke a na-enweta site na mpụga onye ọbịa mpaghara.
  • Iwepu akaụntụ onye ọrụ amaghị aha.
  • Iwepu nchekwa data ule, nke ndị ọrụ amaghị aha nwere ike ịnweta na ndabara.

Mara, ị na-eji (NA) iji wepụ ihe niile.


Advertisement


Banye na ihe atụ MariaDB

Ugbu a ị dechara edemede nche nrụnye biputere, banye n'ime gị MariaDB Enwere ike ime nchekwa data site na iji ihe ndị a:

sudo mysql -u root -p

A ga-akpali gị ịbanye gị mgbọrọgwụ paswọọdụ, na mgbe ahụ, ị ​​ga-abanye nke ọma n'ime MariaDB ọdụ data data:

Ihe Nlereanya:

Otu esi etinye MariaDB 10.6 na Debian 11

Iji pụọ na njedebe, pịnye ihe ndị a iwu ọpụpụ:

exit;

Wepu MariaDB

Ọ bụrụ na ịchọghị iji MariaDB ma chọọ iwepụ ya n'uju, mebie iwu a:

sudo apt autoremove maridb-server mariadb-client

Wepu igodo GPG:

sudo rm /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc

Wepu Repo:

sudo rm /etc/apt/sources.list.d/mariadb.list

Advertisement


Okwu na mmechi

N'ime nkuzi, ị mụtala otu esi etinye ụdị MariaDB kachasị ọhụrụ na ntọhapụ kwụsiri ike kachasị ọhụrụ Debian 11. N'ozuzu, ọ ga-enyere aka ma ọ bụrụ na ị kwalite site na ochie anụ ụlọ 10.5 dị ka ọ dị nnọọ seasoned ugbu a tụnyere 10.6, na e nwere nnukwu uru. na arụmọrụ na nkwalite. Ọ bụrụ na ị na-eme nkwalite, jide n'aka na ị na-akwado nchekwa data gị mgbe niile tupu ime ya iji zere ọtụtụ awa mgbu na nkụda mmụọ.

Ahapụ a Comment