简体   繁体   English

如何在 AWS Elastic Beanstalk 上安装 TYPO3?

[英]How to install TYPO3 on AWS Elastic Beanstalk?

I'm trying to deploy TYPO3 version 10 to an EC2 instance using AWS Elastic Beanstalk, however, none of the methods described in the official documentation works (manual installation and via composer).我正在尝试使用 AWS Elastic Beanstalk 将 TYPO3 版本 10 部署到 EC2 实例,但是,官方文档中描述的方法均无效(手动安装和通过 composer)。 I have created PHP 7.4 environment on Amazon Linux 2 with nginx and tried different ways to get it running: uploaded a source bundle as zip archive for deployment and also tried to install it directly on the machine as the root user.我已经在 Amazon Linux 2 和 nginx 上创建了 PHP 7.4 环境,并尝试了不同的方法让它运行:上传一个源包作为 zip 存档进行部署,并尝试以 root 用户身份直接将其安装在机器上。 Nothing works.什么都不管用。 I either get a completely blank page or 403 from nginx: I have also checked the environment, the web-server and PHP work fine.我从 nginx 得到一个完全空白的页面或 403:我还检查了环境、网络服务器和 PHP 工作正常。 I am able to get info,php page, I am also able to install Wordpress on this environment?我能够获取信息,php 页面,我也能够在此环境中安装 Wordpress? but not TYPO3!但不是 TYPO3! Any ideas what could be the problem here?任何想法可能是这里的问题?

TYPO3 requires some specific actions to deploy/install the system on a fresh instance (seeInstallation and Upgrade Guide for further details). TYPO3需要一些特定的操作才能在新实例上部署/安装系统(有关详细信息,请参阅安装和升级指南)。 It is not enough to just upload the source package to an empty web directory.仅仅将源码 package 上传到一个空的 web 目录是不够的。

That said, AWS Elastic Beanstalk supports modern PHP package management out-of-the-box.也就是说, AWS Elastic Beanstalk支持开箱即用的现代 PHP package 管理。 You can supply a composer.json file and Elastic Beanstalk takes care of downloading and installing the PHP packages.您可以提供composer.json文件,Elastic Beanstalk 负责下载和安装 PHP 包。 As this is also supported by TYPO3, you can roll out a complete TYPO3 deployment by uploading a single JSON file as part of your Elastic Beanstalk application setup.由于 TYPO3 也支持此功能,因此您可以通过上传单个 JSON 文件作为 Elastic Beanstalk 应用程序设置的一部分来推出完整的 TYPO3 部署。

I created a proof-of-concept and a step-by-step documentation, see Github repository .我创建了概念验证和分步文档,请参阅Github 存储库 The additional Elastic Beanstalk configuration files create a swap file to prevent out-of-memory issues on small EC2 instances, adjust the PHP and web server settings, and make sure that the system uses the newest Composer version.额外的 Elastic Beanstalk 配置文件创建交换文件以防止小型 EC2 实例出现内存不足问题,调整 PHP 和 web 服务器设置,并确保系统使用最新的Composer版本。

To install TYPO3 v10 LTS on AWS Elastic Beanstalk , follow these steps:要在AWS Elastic Beanstalk上安装TYPO3 v10 LTS ,请执行以下步骤:

➊ Create an application source bundle based on the config files in the Git repository. ➊ 根据 Git 存储库中的配置文件创建应用程序源包。

git clone https://github.com/typo3-on-aws/typo3-on-elastic-beanstalk
cd typo3-on-elastic-beanstalk/source/
zip ../typo3.zip -r * .[^.]*

➋ Configure the environment/application and upload the source bundle (file typo3.zip ). ➋ 配置环境/应用程序并上传源包(文件typo3.zip )。

➌ Open the web application to finish the TYPO3 installation. ➌ 打开 web 应用程序完成 TYPO3 安装。

Keep in mind that Elastic Beanstalk offers a wide range of options and various setups.请记住,Elastic Beanstalk 提供了广泛的选项和各种设置。 It is up to you to plan, design, architect, deploy, and test the solution that meets your project requirements.您可以自行规划、设计、构建、部署和测试满足项目要求的解决方案。 More sophisticated setups are possible (eg TYPO3 across several EC2 instances with a shared file system and shared database), but out-of-scope of the proof-of-concept.更复杂的设置是可能的(例如 TYPO3 跨多个具有共享文件系统和共享数据库的 EC2 实例),但超出了概念验证的范围。

References参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM