hexo搭建博客过程中出现的问题,4000端口被占用
本文介绍了hexo搭建博客过程中出现的问题,4000端口被占用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
$ hexo server
FATAL Port 4000 has been used. Try other port instead.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/do
Error: listen EADDRINUSE 0.0.0.0:4000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at net.js:1403:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
FATAL listen EADDRINUSE 0.0.0.0:4000
Error: listen EADDRINUSE 0.0.0.0:4000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at net.js:1403:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
解决方案
可以在_config.yml
内加上如下代码更改hexo-server运行时的端口号:
server:
port: 4001
compress: true
header: true
其中4001
可以换成想要运行的端口号。
这篇关于hexo搭建博客过程中出现的问题,4000端口被占用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文