博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
基于Node.js的ghost开源博客平台
阅读量:6934 次
发布时间:2019-06-27

本文共 1915 字,大约阅读时间需要 6 分钟。

Ghost 是一套基于Node.js 构建的开源博客平台(Open source blogging platform),具有易用的书写界面和体验。

1、安装node

windows 下安装npm:

第一步: 下载node.js的windows版

当前最新版本是http://nodejs.org/dist/v0.5.10/node.exe

第二步:设置环境变量

把node.exe所在目录加入到PATH环境变量中。
配置成功后可以在CMD中通过node --version 看到node.js对应的版本号
C:\Users\fn>node --version
v0.5.10

第三步: 安装git

直接到以下地址(http://code.google.com/p/msysgit/downloads/list)下载git windows安装文,目前最新版是Git-1.7.7-preview20111014.exe,按照提示一步步安装即可。安装完成后把git安装bin目录加入PATH环境变量

CMD中运行 git --version 确认安装是否成功

C:\Users\fn>git --version

git version 1.7.7.msysgit.1
第四步: 安装 npm
在确保node.exe和git都在PATH环境变量中后执行以下命令:

git config --system http.sslcainfo /bin/curl-ca-bundle.crt

git clone --recursive git://github.com/isaacs/npm.git

cd npm

node cli.js install npm -gf

下面来测试一下是否成功,一切OK开始Node.JS之旅
D:\develop\nodejs\hello>npm install -d
npm info it worked if it ends with ok
npm info using npm@1.0.103
npm info using node@v0.5.10
npm info preinstall application-name@0.0.1
npm info addNamed [ 'jade', '>= 0.0.1' ]
npm info addNamed [ 'express', '2.5.0' ]

最好设置下国内镜像要不然下载会很慢

github npm 撞墙的解决方案。

github:

代理服务器是必须的,我用的是本地的astrill
给curl设置代理
export http_proxy="127.0.0.1:3213"
export https_proxy="127.0.0.1:3213"
ok了

npm:

设置国内镜像 npm config set registry http://registry.npmjs.vitecho.com

2、安装ghost

参考地址:

Install and Run Ghost

  • In your start menu, find ‘Node.js’ and then choose ‘Node.js Command Prompt’
  • In the Node command prompt, you need to change directory to where you extracted Ghost. Type: cd Downloads/ghost-#.#.# (replace hashes with the version of Ghost you downloaded).
  • Next, in the command prompt type npm install --production note the two dashes
  • When npm is finished installing, type npm start to start Ghost in development mode
  • In a browser, navigate to 127.0.0.1:2368 to see your newly setup Ghost blog
  • Change the url to 127.0.0.1:2368/ghost and create your admin user to login to the Ghost admin.

 

 

本人测试博客:

转载于:https://www.cnblogs.com/sdgf/p/4770737.html

你可能感兴趣的文章
The only supported ciphers are AES-128-CBC and AES-256-CBC
查看>>
sphinx 全文搜索引擎
查看>>
Kotlin成为正式的Android编程语言
查看>>
物联网技术周报第 141 期: 使用 Alexa Voice 和 Raspberry Pi 构建图片识别应用
查看>>
微软必应从.NET Core 2.1获得了性能提升
查看>>
四说大数据时代“神话”:从大数据到深数据\n
查看>>
vue.js仿饿了么app---webpack配置项
查看>>
架构周报:微信后台系统的演进之路
查看>>
Oracle宣布提供新的Java支持价格体系
查看>>
phpstrom配置svn/git提交
查看>>
关于Redux的一些总结(一):Action & 中间件 & 异步
查看>>
专访1药网技术副总裁黄哲铿:揭秘技术跨界管理之道
查看>>
Markdown通用的常用语法说明
查看>>
gulp关于scss的基础配置
查看>>
PHP:echo、print、print_r() 和 var_dump()
查看>>
Gerrit代码Review入门实战
查看>>
Swift中一个类中的枚举(enum)类型的数据该如何实现序列化(NSCoder)
查看>>
WebSocket 原理
查看>>
按端口终止进程
查看>>
Permutations I & II leetcode
查看>>