Logo ByteGopher
Logo Inverted Logo
  • Tags
  • Bson
  • ElasticSearch
  • Go
  • HTTPS
  • Hbase
  • Hexo
  • Http
  • Mongo
  • Nginx
  • OpenTSDB
  • Raft
  • TSDB
  • Tips
  • Vim
Hero Image
「Hexo」 搭建部署

Hexo 安装 https://hexo.io/zh-cn/docs/ 安装Node.js 安装Git 安装Hexo 1sudo npm install -g hexo-cli 如果在mac中安装报/usr/lib/node_modules/的操作权限问题,执行以下命令。 1sudo chown -R `whoami` /usr/local/lib/node_modules 初始化项目 1hexo init blog 创建完成后,当前目录下会有一个xx_blog的文件夹,具体的文件夹查询官网hexo.io Hexo 部署到Nginx & Github.io 开发机 在自己写Blog的Pc上安装插件 1yarn add hexo-deployer-git 服务器 在即将部署的服务器上执行以下操作 1yum install git 2 3useradd -m git # 创建一个git用户,用来运行git服务 4 # 新建git用户并非必要,但是为了安全起见,还是用git用户单独来运行git服务 5 6passwd git 设置PC到服务器的git用户免密登录 1# 生成ssh密钥 2ssh-keygen 3# 将公钥添加到server 4ssh-copy-id git@serverIp 在服务器上初始化一个Git仓库 1mkdir -p /var/repo 2ca /var/repo 3git init --bare blog.git # --bare 初始化一个裸仓库,裸仓库没有工作区,只为共享而存在 4chown -R git:git blog.

August 7, 2020 Read
Navigation
  • About
  • Skills
  • Recent Posts
  • My Story
Contact me:
  • renqiqiang@outlook.com

Stay up to date with email notification

By entering your email address, you agree to receive the newsletter of this website.

Toha Theme Logo Toha
© 2020-2022 Copyright.
Powered by Hugo Logo