window 下如何安装ghost博客

一、安装nodejs # Node v0.12.x and v4.2+ LTS - supported 我本地安装的是4.2 安装其余版本可能提示系统不兼容node

二、安装mysqlmysql

三、安装bowergit

四、安装gitgithub

五、git clone git://github.com/tryghost/ghost.git sql

六、cd ghostnpm

七、npm install -g grunt-clisegmentfault

八、复制ghost根目录下的config.example.js文件,更改文件名为 config.js,我已经根据个人mysql配置了一个config.js,以下windows

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

config = {
    development: {
        url: 'http://127.0.0.1:2369',
        // Example mail config
        // Visit http://support.ghost.org/mail for instructions
        // ```
         mail: {
             transport: 'SMTP',
             options: {
                 service: 'Mailgun',
                 auth: {
                     user: 'postmaster@sandbox52f8195f72d346d9bfbc1314176abcdd.mailgun.org', // mailgun username
                     pass: '25ip4bzyjwo1'  // mailgun password
                 }
             }
         },
        database: {
            client: 'mysql',
            connection: {
                host     : '127.0.0.1',
                user     : 'root',
                password : '',
                database : 'ghost',
                charset  : 'utf8'
            }
        },
        server: {
            host: '127.0.0.1',
            port: '2369'
        },
        logging: true
    },
    // ### Production
    // When running Ghost in the wild, use the production environment.
    // Configure your URL and mail settings here
    production: {
        url: 'http://127.0.0.1:2369',
        database: {
            client: 'mysql',
            connection: {
                host     : '127.0.0.1',
                user     : 'root',
                password : '',
                database : 'ghost',
                charset  : 'utf8'
            }
        },
        server: {
            host: '127.0.0.1',
            port: '2369'
        },
        logging: true
    },

    // ### Testing pg
    // Used by Travis - Automated testing run through GitHub
    'testing-pg': {
        url: 'http://127.0.0.1:2369',
        database: {
            client: 'pg',
            connection: {
                host     : '127.0.0.1',
                user     : 'postgres',
                password : '',
                database : 'ghost_testing',
                charset  : 'utf8'
            }
        },
        server: {
            host: '127.0.0.1',
            port: '2369'
        },
        logging: false
    }
};

module.exports = config;
View Code

九、npm installide

十、grunt initgrunt

十一、grunt prod

十二、npm start

正常状况下node的提示以下图

打开https://mailgun.com 注册并登录 我这里用的是谷歌帐号注册登录的

配置完成后出现下图

打开连接出现下图

将login及pass 输入到ghost目录中的config文件里

打开127.0.0.1:2369/ghost 进入博客目录,你已经能够添加修改博客,邀请朋友加入博客了,这是一篇ghost.js windows环境下的安装入门教程,转载请注明出处

参考文档 1.http://www.ghostchina.com/useing-mysql-database-with-ghost/

     2.http://support.ghost.org/mail

     3.https://segmentfault.com/a/1190000002947497

相关文章
相关标签/搜索