Tataiso ea ho Kenya

Mokhoa oa ho kenya Nginx ho Ubuntu 22.04

Kenya le ho lokisa seva sa webo sa Nginx ho Ubuntu 22.04 bakeng sa ho amohela liwebsaete le lits'ebetso.

December 20, 2025 10437 maikutlo

Mokhoa oa ho kenya Nginx ho Ubuntu 22.04

E tla u thusa ho kenya Nginx ho Ubuntu 22.04. Etela litaelo tsena ka hloko ho netefatsa hore ho kenya ho atlehile.

Lintlha

  • Setsi se secha sa Ubuntu 22.04
  • Ho kena ka root kapa sudo
  • Ho ka tlase ho 1GB ea RAM
  • 10GB ea sebaka sa disk se fumanehang

Tšebelisano ea 1: Ho nchafatsa lipakete tsa sistimi

Pele, etsa bonnete ba hore sistimi ea hau e nchafalitsoe:

sudo apt update

Phapang 2: kenya li-dependencies

kenya li-dependencies tse hlokahalang:

sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y

Tšebelisano e 3: kenya Nginx

Hona joale kenya Nginx ka ho sebelisa motsamaisi oa liphutheloana:

sudo apt install nginx -y

Phapang 4: Qala le ho etsa hore e be ts'ebeletso

Qala ts'ebeletso ea Nginx'me u e lumella ho sebetsa ha e qala:

sudo systemctl start nginx
sudo systemctl enable nginx

Step 5: Configure Nginx

Ho fetola faele ea ho kenya e leng /etc/nginx/nginx.conf:

sudo nano /etc/nginx/nginx.conf

Step 6: Verify Installation

Khaola hore na Nginx e sebetsa ka ho nepahetseng:

sudo nginx -t
sudo systemctl status nginx

Bophelo

Kea leboha! Hona joale u na le Nginx e sebetsanang ka Ubuntu 22.04. Bakeng sa likhetho tsa ho hlophisa tse eketsehileng, bona litokomane tsa molao tsa Nginx.

Lekanya Sengoloa sena

★★★★★
-
Ho kenya...

Batla Litokomane
Tataiso ea ho Kenya

Sheba lingoloa tsohle