Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(php): PHP installation failures with al2023/rhel #1162

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions recipes/newrelic/apm/php/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,20 +351,25 @@ install:

vars:
AGENT_VERSION: "9.17.1.301"

install_rpm:
cmds:
- |
echo -e "{{.ARROW}}Adding the New Relic PHP Agent repository{{.GRAY}}"
# The repo install command returns a non-zero return code if it is already installed
# Only attempt an install if it is needed
if rpm -q newrelic-repo-5-3.noarch > /dev/null; then
echo -e "The New Relic repository is already installed."
# Skip this task if the host machine is Amazon Linux 2023
if grep -q "Amazon Linux release 2023" /etc/system-release; then
echo -e "Skipping repository installation on Amazon Linux 2023. The RPM method is not supported on this version."
else
echo -e "Adding the New Relic PHP Agent repository."
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
# The repo install command returns a non-zero return code if it is already installed
# Only attempt an install if it is needed
if rpm -q newrelic-repo-5-3.noarch > /dev/null; then
echo -e "The New Relic repository is already installed."
else
echo -e "Adding the New Relic PHP Agent repository."
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
fi
sudo yum install -y newrelic-php5
fi
sudo yum install -y newrelic-php5

configure:
cmds:
Expand Down
Loading