|
Post by account_disabled on Jan 29, 2024 2:13:01 GMT -5
PHP 在 Vagrant The Right Way™ 上开始使用 Sulu CMS 内容管理系统和框架 开发环境 构架 交响乐团 布鲁诺·斯克沃克 2017 年 6 月 5 日 分享 Pause Next Unmute Current Time Duration 2:00 Fullscreen 在本教程中,我们将学习如何以正确的方式开始使用Sulu CMS - 也就是说,我们将使用 Homestead Improvement部署 Sulu“Hello World”实例,并在使用过程中注意性能问题和配置值。我们还将介绍一些常见的陷阱,所有这些都是为了为未来的 Sulu 教程打下良好的基础。建议您按照本文中的说明进行操作,并对您可能遇到的任何问题发表评论。 非常感谢Daniel Rotter和Patrik Karisch帮助我解决了这个过程! 请注意,强烈建议您在开始之前熟悉Homestead Improvement 。如果您还没有达到那个水平,您应该购买我们关于 PHP 环境基础知识的精彩书籍。 [旁注] 输入您的项目名称 本教程是动态的,因为它将用您在本段下的字段中定义的项目名称替换下面文本中的所有占位符。这样,命令就变得非常适合复制/粘贴。 项目名称: 我的项目 生成的 slug:my_sulu_project OS X Vagrant 文件夹共享问题 在 OS X 主机 WhatsApp 号码数据 上使用 NFS 文件夹共享模式时,需要vagrant-bindfs插件。将其与 Vagrant 安装一起安装vagrant install plugin vagrant-bindfs。如果 OS X 是您的主要操作系统,这是一次性的事情,可以防止以后出现很多很多令人头疼的问题。 其余的都是自动的,并且已经在Homestead Improvement实例中配置,您不需要执行任何其他操作。 流浪者向上 当然,我们要做的第一件事是克隆 HI 存储库。接下来,让我们配置共享文件夹: bin/folderfix.sh 这使得当前工作目录与/Code虚拟机内的目录共享。这样,在此文件夹中所做的更改将反映在虚拟机内,反之亦然。 与任何 Symfony 应用程序一样,Sulu 需要Nginx 的自定义虚拟主机配置。我们通过将 Homestead Improvement 中的“项目类型”变成了“项目类型”,使事情变得更容易,因此您需要做的就是对 进行以下修改Homestead.yaml: 添加nfs文件夹共享类型(在 OS X 和 Windows 10 上) 添加sulu项目类型并将其文档根子文件夹更改为web 相关部分最终应如下所示最后,让我们启动虚拟机。 vagrant 专业提示:设置有用的别名以供将来使用设置 Sulu 创建项目 让我们安装 Sulu 的标准版本(该minimal版本现在实际上是“标准”版本,而旧的“标准”已被弃用 - 他们正在努力重命名它)。 请注意,文档目前建议在Composer-n命令末尾添加一个标志,这意味着“没有交互式问题”。我喜欢安装程序询问我应该配置的内容,所以我省略了它。 安装需要一段时间,因为 Symfony 有很多依赖项(请参阅下面的“陷阱和常见问题解答”部分中的 Polyfills 小节)。
|
|