Skip to content

Instantly share code, notes, and snippets.

@sshymko
Last active October 23, 2023 01:06
Show Gist options
  • Save sshymko/1a9467487a895a7dc8af2c101d7a9c22 to your computer and use it in GitHub Desktop.
Save sshymko/1a9467487a895a7dc8af2c101d7a9c22 to your computer and use it in GitHub Desktop.
Install Nginx and PHP-FPM on Amazon Linux 2 from REMI repository
#!/bin/sh
sudo yum update -y
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --setopt="remi-php72.priority=5" --enable remi-php72
sudo yum install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
sudo yum install -y \
php-opcache php-xml php-gd php-intl php-mbstring php-bcmath php-iconv php-openssl php-soap \
php-pecl-mcrypt php-pecl-zip php-pecl-redis
sudo systemctl enable php-fpm
sudo systemctl start php-fpm
@ferulisses
Copy link

Work just fine, thanks a lot.

I replaced version 7.2 to 7.4 without issues, and used yum update to replace from AmazonExtras PHP 7.4.5 version to Remi PHP 7.4.12 version

@gtirloni
Copy link

gtirloni commented Jan 7, 2021

This is great, thanks for sharing. Also worked flawlessly with PHP 7.4 here.

@mariojrrc
Copy link

Also worked fine with PHP 8 here.

@egovelox
Copy link

egovelox commented Jun 3, 2023

Works just fine also with (line 7)

sudo yum-config-manager --setopt="remi-php82.priority=5" --enable remi-php82

Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment