最后忘记启用php模块·
这里是完整的 beanstalk 配置文件,所以我编写并添加了命令。
注意 1. 这安装了 php 7.4 的模块
注意 2. 对于命令 2-epel,我们被迫使用选项“ignoreErrors”:true,否则部署过程将失败,导致 remi 结果已安装。
files:
"/usr/local/bin/enable-tidy-php-module.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
cd /etc/php.d/
ln -s /etc/opt/remi/php74/php.d/20-tidy.ini 20-tidy.ini
cd /usr/lib64/php/modules/
ln -s /opt/remi/php74/root/usr/lib64/php/modules/tidy.so tidy.so
cd /usr/lib64/php-zts/modules/
ln -s /opt/remi/php74/root/usr/lib64/php/modules/tidy.so tidy.so
exit 0
commands:
1-aml-extras-epel:
command: "amazon-linux-extras install epel -y"
2-epel:
command: "yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y"
ignoreErrors: true
3-yum-clean:
command: "yum clean all"
4-tidy-php:
command: "yum install php74-php-tidy.x86_64 -y"
5-enable-tidy-php:
command: "/usr/local/bin/enable-tidy-php-module.sh"