Cheap Domain Logo by AuxoDomain

VPS'inizde Web Sunucusu Nasıl Kurulur Print

  • Web Server, Server, Website, Ubuntu, VPS, Dedicated server
  • 0

VPS'inizde Web Sunucusu Nasıl Kurulur

Ubuntu/Debian/CentOS üzerinde test edilmiştir

Gereksinimler

  • Root/SSH erişimine sahip bir VPS

  • Temel Linux komut satırı bilgisi

  • 10-15 dakika zaman


1️⃣ Sistemini Güncelle

# Ubuntu/Debian için:
sudo apt update && sudo apt upgrade -y

# CentOS/RHEL için:
sudo yum update -y

2️⃣ Bir Web Sunucusu Kur

Seçenek A: Apache (Kolay ve Evrensel)

# Ubuntu/Debian:
sudo apt install apache2 -y

# CentOS:
sudo yum install httpd -y

Başlat ve Etkinleştir:

sudo systemctl start apache2  # veya httpd (CentOS)
sudo systemctl enable apache2

✅ Doğrula: Sunucunuzun IP adresini tarayıcıda ziyaret edin. Apache test sayfasını görmelisiniz.


Seçenek B: Nginx (Hızlı ve Hafif)

sudo apt install nginx -y      # Ubuntu/Debian
sudo yum install nginx -y      # CentOS

Başlat ve Etkinleştir:

sudo systemctl start nginx
sudo systemctl enable nginx

✅ Doğrula: Nginx karşılama sayfası için http://[sunucu-IP'niz] adresini kontrol edin.


3️⃣ MySQL/MariaDB Kur (Veritabanı)

# Ubuntu/Debian:
sudo apt install mariadb-server -y

# CentOS:
sudo yum install mariadb-server -y

Güvenli Kurulum:

sudo mysql_secure_installation

(Root parolası belirlemek ve güvensiz varsayılanları kaldırmak için yönergeleri takip edin)


4️⃣ PHP Kur (Dinamik İçerik İçin)

# Ubuntu/Debian:
sudo apt install php php-mysql -y

# CentOS:
sudo yum install php php-mysql -y

PHP'yi Test Et:

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php

✅ PHP detaylarını görmek için http://[sunucu-IP'niz]/info.php adresini ziyaret edin.


5️⃣ Güvenlik Duvarı Ayarla

HTTP/HTTPS trafiğine izin ver:

# Ubuntu/Debian (UFW):
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# CentOS (FirewallD):
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

6️⃣ Servisleri Otomatik Başlat

Servislerin yeniden başlatmada otomatik çalıştığından emin ol:

# Apache için:
sudo systemctl enable apache2  # veya httpd

# Nginx için:
sudo systemctl enable nginx

# MariaDB için:
sudo systemctl enable mariadb

Sonraki Adımlar

  • Web siteni yükle SFTP/FTP ile

  • SSL ile güvenli hale getir (Let’s Encrypt kullan):

    sudo apt install certbot -y
    sudo certbot --apache  # veya --nginx
  • Performansı optimize et (Önbellekleme aç, PHP-FPM kullan)


Hazır!

Artık kendi kendine barındırılan bir web sunucunuz var! Yardıma mı ihtiyacınız var? AuxoDomain Destek ile iletişime geçin.

Q
Bu cevap yeterince yardımcı oldu mu?
Back