Homestead 如果暂时不想使用 PostgreSQL 如何优雅关闭?

个人工作中目前基本上用不到PostgreSql。而最近在家切换到了Homestead开发环境当中。折腾了一番过后发现如果目前用不到的服务如何关闭掉了。

我目前是在Ubuntu里让他开机不自动启动了。

但是我如果执行vagrant provision的时候报

==> default: createdb: could not connect to database template1: could not connect to server: No such file or directory
==> default:    Is the server running locally and accepting
==> default:    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

所以我想请问有没有什么配置是可以在配置文件(比如homestead.yaml)中设置关闭的

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 2
Summer

不用的话放着基本上不占资源,至少这点资源在开发环境中基本上可以忽略不计,建议放着不管。

如果你很想折腾的话,可以修改 homestead ,注释掉 这行代码

要做的比较完美的话,可以修改 Homestead BOX 的构建脚步 ,去掉 PostgreSql 的

8年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!