일요일, 5월 26, 2024
HomeLinuxUbuntu 14.04 Ghost Blog 설치하기

Ubuntu 14.04 Ghost Blog 설치하기

Ubuntu 14.04 Ghost Blog 설치하기

관련 패키지 설치



apt-get update  
apt-get install zip wget  
apt-get install build-essential nodejs npm  
ln -s /usr/bin/nodejs /usr/bin/node

mkdir -p /var/www/ghost  
curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip  
unzip -uo ghost.zip -d /var/www/ghost  
cd /var/www/ghost  
npm install forever -g  
Ghost 폴더에 존재하는 config.example.js 파일을 복사하여 config.js 파일을 만들고, production 부분을 다음과 같이 수정한다.


cp config.example.js config.js  
vi config.js

// # Ghost Configuration
// Setup your Ghost install for various [environments](http://support.ghost.org/config/#about-environments).

// Ghost runs in `development` mode by default. Full documentation can be found at http://support.ghost.org/config/

var path = require('path'),  
    config;

config = {  
    // ### Production
    // When running Ghost in the wild, use the production environment.
    // Configure your URL and mail settings here
    production: {
        url: 'http://ghost.mynotes.kr',
        mail: {},
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost.db')
            },
            debug: false
        },

        server: {
            host: '10.0.0.21',
            port: '2368'
        }
    },
.....

ghost start
NODE_ENV=production forever start index.js

ghost stop
NODE_ENV=production forever stopall

ghost restart
NODE_ENV=production forever restartall


Nginx conf Edit

server {  
        listen 80;
        server_name ghost.mynotes.kr;

        access_log  logs/ghost.access.log  comm-lf;

        location / {
            proxy_pass          http://10.0.0.21:2368;
            proxy_set_header    Accept-Encoding   "";
            proxy_set_header    Host $http_host;
            proxy_set_header    X-NginX-Proxy true;
            proxy_set_header    X-Real-IP $remote_addr;
            proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header    X-Forwarded-Proto $scheme;
            proxy_redirect      off;
        }
    }

Nginx Restart
/etc/init.d/nginx restart

ghost start
NODE_ENV=production forever start index.js

Home URL
http://ghost.mynotes.kr

ghost001

관리자 페이지 URL
http://ghost.mynotes.kr/ghost

ghost002

ghost003

ghost004

ghost005-1

스킨적용된 Ghost Blog
ghost006

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular