Otu esi etinye CouchDB na Ubuntu 20.04

Apache CouchDB bụ nchekwa data NoSQL nke na-emepe emepe nke na-emepe emepe nke Apache Software Foundation mepụtara, nke mbụ mepụtara na 2005. Enwere ike itinye CouchDB ma na-agba ọsọ n'ụdị abụọ dị iche iche: guzoro ma ọ bụ clustered, ma na-eji ọtụtụ usoro na protocols na-echekwa. nyefee, ma hazie data ya. Usoro nchekwa data na-eji JSON chekwaa data, JavaScript dị ka asụsụ ajụjụ ya site na iji MapReduce, na HTTP maka API.

Na ntuziaka na-esonụ, ị ga-amụta ka esi etinye CouchDB ma mepụta nchekwa data site na iji UI weebụ ha na Ubuntu 20.04 LTS sistemụ arụmọrụ gị.

Prerequisites

  • Ubuntu 20.04 OS (20.10 na 21.04 nwere ike iji)
  • Melite ngwungwu sistemụ ụbọchị
  • Nweta mgbọrọgwụ ma ọ bụ ohere sudo.
  • Njirimara ndị a na-ahụkarị na Curl arụnyere.
sudo apt update && sudo apt upgrade -y

Na-esote, wụnye ngwugwu achọrọ.

sudo apt install software-properties-common wget

Advertisement


Budata GPG Key CouchDB

Ugbu a ịkwesịrị ibudata igodo GPG maka ebe nchekwa iji wụnye CouchDB wee nweta mmelite ọzọ n'ọdịniihu na-akpaghị aka mgbe ị na-arụ ọrụ mmelite njikwa ngwugwu dabara adaba.

curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -

Ugbu a, tinye ebe nchekwa ahụ.

echo "deb https://apache.bintray.com/couchdb-deb focal main" | sudo tee –a /etc/apt/sources.list

Nsonaazụ atụ:

~$ echo "deb https://apache.bintray.com/couchdb-deb focal main" | sudo tee -a /etc/apt/sources.list
 deb https://apache.bintray.com/couchdb-deb focal main

Wụnye CouchDB

Ozugbo agbakwunyere ebe nchekwa ahụ, ị ​​​​ga-achọ imelite onye njikwa ngwugwu ka ịmekọrịta repo ọhụrụ, ma ị nwere ike tinye CouchDB na sistemụ Ubuntu 20.04 gị.

sudo apt update && sudo apt install couchdb -y

Ozugbo ị malitere echichi usoro, ị ga-ahụ a ihuenyo gbapụta ngwa ngwa.

tinye couchdb ubuntu 20.04 mmalite nhazi

Nhọrọ Ụdị nhazi

Ị ga-ahọrọ OK ka ịga n'ihu na ihuenyo ọzọ. Mara na ị ga-achọ ịpị igodo tab na ahụigodo gị ka ịhọrọ OK. Ozugbo emechara, pịa tinye. Mgbe ị rutere n'akụkụ nke abụọ, họrọ nhọrọ nkesa Standalone.

tinye couchdb ubuntu 20.04 kwụ ọtọ

IP Adreesị nhazi

Nhọrọ ọzọ na nhazi ahụ bụ ịtọ adreesị IP nke interface netwọk nke CouchDB ga-ejikọta. Ọzọ, ọ bụrụ na ị na-agba ọsọ otu ihe nkesa, ịkwesighi ịgbanwe ndabara "127.0.0.1Okwu.

tinye couchdb ubuntu 20.04 setịpụrụ adreesị IP

Mepụta Paswọdu

Ị mepụtala akaụntụ nchịkwa ugbu a. Ọ ga-ajụ gị maka paswọọdụ ka ịga n'ihu. Pịnye ya wee họrọ OK. A naghị atụ aro ka ịwụpụ nzọụkwụ a. Site na ịhapụ oghere, ị na-ahapụ oghere nchekwa n'ọdịnihu.

tinye couchdb ubuntu 20.04 mepụta paswọọdụ maka nchịkwa

Advertisement


Lelee ọnọdụ CouchDB

Site na ndabara, ekwesịrị ịgbanye ngwanro ahụ na-akpaghị aka na mmalite ma malitelarị. Ka ịlele, tinye ihe ndị a.

sudo systemctl status couchdb

Ihe atụ kwesịrị ịbụ:

~$ sudo systemctl status couchdb
 ● couchdb.service - Apache CouchDB
      Loaded: loaded (/lib/systemd/system/couchdb.service; enabled; vendor prese>
      Active: active (running) since Sat 2021-06-19 07:50:41 PDT; 42s ago
    Main PID: 14835 (beam.smp)
       Tasks: 38 (limit: 4617)
      Memory: 34.9M
      CGroup: /system.slice/couchdb.service
              ├─14835 /opt/couchdb/bin/../erts-9.3.3.14/bin/beam.smp -K true -A >
              ├─14847 /opt/couchdb/bin/../erts-9.3.3.14/bin/epmd -daemon
              ├─14866 erl_child_setup 65536
              ├─14894 inet_gethost 4
              └─14895 inet_gethost 4
 Jun 19 07:50:41 ubuntu systemd[1]: Started Apache CouchDB.

Mepụta ọdụ data CouchDB ọhụrụ

Ị nwere ike tinye nchekwa data ọhụrụ site na iji CouchDB na aha njirimara "admin” na paswọọdụ ị debere maka akaụntụ ahụ n'oge nhazi nrụnye mbụ. Enwere ike ịnweta nke a site na njikwa njikwa UI nke CouchDB's Fauxton webụ nke na-abịa na ngwugwu.

Iji malite Fauxton, tinye ihe ndị a na ihe nchọgharị gị.

http://127.0.0.1:5984/_utils/
tinye couchdb ubuntu 20.04 admin nbanye

Ozugbo ịbanye, ị ga-ahụ ịmepụta njikọ nchekwa data nwere akara ngosi dị n'akụkụ aka nri elu. Họrọ nke a, nke ga-ebute "Mepụta database" ihuenyo. Tinye aha testdb wee họrọ partitioned ma ọ bụ na-abụghị nkebi, wee pịa na Mepụta bọtịnụ ịnọgide.

tinye couchdb ubuntu 20.04 mepụta nchekwa data

Ugbu a laghachi na ibe nchekwa data, ị nwere ike ịhụ nchekwa data ọhụrụ ị mepụtara.

tinye couchdb ubuntu 20.04 nchekwa data ibe

Advertisement


Okwu na mmechi

Ntuziaka ahụ egosila gị otu esi etinye CouchDB wee mepụta nchekwa data site na iji UI Fauxton webụ arụnyere ngwanrọ. Iji chọpụta ozi ndị ọzọ gbasara ihe ị nwere ike ime na CouchDB ma ọ bụ nhọrọ nhazi karịa na gburugburu ebe obibi, hụ ha akwụkwọ.

Ahapụ a Comment