Ubuntu Sunucuda Ghost CMS Kurulumu

Ghost, Node.js tabanlı, açık kaynak kodlu ve özellikle blog, haber sitesi ve içerik yönetimi için geliştirilmiş modern bir CMS (Content Management System) platformudur.

Ubuntu Sunucuda Ghost CMS Kurulumu
Photo by Carlos Nunez / Unsplash

Ghost, Node.js tabanlı, açık kaynak kodlu ve özellikle blog, haber sitesi ve içerik yönetimi için geliştirilmiş modern bir CMS (Content Management System) platformudur. WordPress'e göre daha hafif, daha hızlı ve daha güvenli bir mimariye sahiptir. Yerleşik üyelik sistemi, e-posta aboneliği, SEO araçları ve modern yönetim paneli sayesinde özellikle içerik üreticileri için oldukça güçlü bir çözümdür.

Sistem Gereksinimleri

Minimum önerilen sistem

Ubuntu24.04 LTS

RAM 2 GB

CPU2 Core

Disk20 GB SSD

Node.jsv 22 LTS

MySQL 8.x

Nginx1.18 + SSL Let's Encrypt (Opsiyonel)

1. Sistemi Güncelleme

İlk olarak sistemi güncelleyelim.

sudo apt update
sudo apt upgrade -y

2. Nginx Kurulumu

sudo apt install nginx -y

Servisin çalıştığını kontrol edin.

sudo systemctl status nginx

Başlatmak için

sudo systemctl enable nginx
sudo systemctl start nginx

3. MySQL Kurulumu

sudo apt install mysql-server -y

Kurulum tamamlandıktan sonra güvenlik sihirbazını çalıştırın.

sudo mysql_secure_installation

Önerilen seçenekler

Remove anonymous users?         Y
Disallow root login remotely?   Y
Remove test database?           Y
Reload privilege tables?        Y

4. Root Kullanıcısına Şifre Atama

Ubuntu'da varsayılan olarak MySQL root kullanıcısı socket authentication kullanır.

Ghost'un bağlanabilmesi için parola tanımlanmalıdır.

MySQL'e giriş yapın.

sudo mysql

Ardından

ALTER USER 'root'@'localhost'
IDENTIFIED WITH mysql_native_password
BY 'GucluBirSifre123!';

Yetkileri yenileyin

FLUSH PRIVILEGES;

Çıkın

exit

5. Node.js Kurulumu

Ghost'un önerdiği sürüm Node.js LTS'dir.

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -

Kurulum

sudo apt install nodejs -y

Kontrol

node -v
npm -v

6. Ghost CLI Kurulumu

Root kullanıcısı ile Ghost kurulması önerilmez.

Yeni kullanıcı oluşturabilirsiniz.

sudo adduser ghost
sudo usermod -aG sudo ghost

Oturumu değiştirin.

su - ghost

8. Kurulum Dizini Oluşturma

sudo mkdir -p /var/www/ghost

Yetki verelim.

sudo chown ghost:ghost /var/www/ghost
sudo chmod 775 /var/www/ghost

Dizine geçelim.

cd /var/www/ghost

9. Ghost Kurulumu

ghost install

Kurulum sırasında aşağıdaki bilgiler istenir.

Blog URL https://example.com
MySQL Host
127.0.0.1
MySQL User
root
MySQL Password

Root parolası

Database Name
ghost_prod

Ardından Ghost otomatik olarak

  • Ghost dosyalarını indirir
  • Veritabanını oluşturur
  • Nginx yapılandırmasını oluşturur
  • Systemd servisini oluşturur
  • Ghost kullanıcısını oluşturur

10. Ghost Servisleri

Durum kontrolü

ghost status

Başlama

ghost start

Durdurma

ghost stop

Yeniden başlatma

ghost restart

Systemd üzerinden

sudo systemctl status ghost_example-com

Restart

sudo systemctl restart ghost_example-com

11. SSL Kurulumu

Kurulum sırasında SSL kurulmadıysa

ghost setup ssl

veya

ghost setup nginx ssl

Let's Encrypt otomatik kurulacaktır.

12. Yönetim Paneli

Kurulum tamamlandıktan sonra

https://example.com/ghost

adresine gidin.

İlk kullanıcıyı oluşturun.

  • Yönetici adı
  • E-posta
  • Şifre

Kurulum tamamlanmış olacaktır.