Bu yazımızda ghost blog platformunu ubuntu sunucumuza kuracağız , şimdi elimizde sıfır durumda üzerinde ssh harici hiç bir şey kurulu olmayan makinamız olduğunu ve ssh ile eriştiğimizi varsayıyorum.
Öncelikle sunucumuzu güncelleyelim. İşlemlerimizi root kullanıcısı ile yapmak daha kolay olacaktır , su root ile root kullanıcısına geçebiliriz. root şifresini bilmiyor iseniz passwd root ile değiştirebilirsiniz.
root@ubuntu:~# sudo apt-get update
root@ubuntu:~# sudo apt-get upgrade
root@ubuntu:~# sudo aptitude install build-essential zip
Şimdi nodejs.org üzerinden son versiyon u indirip kuralım.
root@ubuntu:~# wget http://nodejs.org/dist/node-latest.tar.gz
root@ubuntu:~# tar -xzf node-latest.tar.gz
root@ubuntu:~# cd node-v0.10.25 (sürüm değiştikçe klasör adı değişecektir)
Şimdi node u muzu kurabiliriz.
root@ubuntu:~/node-v0.10.25# ./configure
root@ubuntu:~/node-v0.10.25# make
root@ubuntu:~/node-v0.10.25# make install
Şimdi Ghost u indirip , kuralım
root@ubuntu:~/node-v0.10.25# sudo mkdir -p /var/www/
root@ubuntu:~/node-v0.10.25# cd /var/www
root@ubuntu:/var/www# wget https://ghost.org/zip/ghost-latest.zip
root@ubuntu:/var/www# sudo unzip -d ghost ghost-latest.zip
root@ubuntu:/var/www# cd ghost
root@ubuntu:/var/www/ghost# sudo npm install –production
Şimdi Ghost kurulumumuzu konfigure edelim.
root@ubuntu:/var/www/ghost# cp config.example.js config.js
root@ubuntu:/var/www/ghost# nano config.js
Açılan dosyada Production bölümü altındaki host yazan yerin yanındaki ip adresini sunucu ip adresiniz ile güncelleyiniz , port kısmını ise 80 olarak değiştiriniz , url kısmına site adresiniz yazmalısınız.
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: ‘https://www.ayhanarda.com/blog‘,
mail: {},
database: {
client: ‘sqlite3’,
connection: {
filename: path.join(__dirname, ‘/content/data/ghost.db’)
},
debug: false
},
server: {
// Host to be passed to node’s `net.Server#listen()`
host: ‘192.185.189.211‘,
// Port to be passed to node’s `net.Server#listen()`, for iisnode set this to `process.env.PORT`
port: ‘80‘
}
},
Şimdi bu işlemden sonra ghost u çalıştırabiliriz.
root@ubuntu:/var/www/ghost# sudo npm start –production
Browserımızı açalım ve ip adresinden çalışıp çalışmadığını test edelim, işte hepsi bu kadar.
Eğer kullanmak ister iseniz webhosting sitesi ile iletişime geçebilirsiniz.
Saygılarımla
Ayhan ARDA