centos7 默认普通用户没有sudo权限,因此需要我们手动设置
步骤:
1、su进入root用户,vi /etc/sudoers
2、找到文件中的下列文字:###Allow root to run any commands anywhere root ALL=(ALL) ALL
在该行下面添加如下即可xxx ALL=(ALL) NOPASSWD: ALL
xxx代表用户名
3、然后保存退出,再次切换到普通用户下,执行sudo命令就可以看到相应的信息了。
而且不用输密码
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true