Skip to content

Instantly share code, notes, and snippets.

@DenisJunio
Last active September 30, 2024 22:09
Show Gist options
  • Save DenisJunio/530e96d59d10cad1729d5e3def0fc081 to your computer and use it in GitHub Desktop.
Save DenisJunio/530e96d59d10cad1729d5e3def0fc081 to your computer and use it in GitHub Desktop.
Laravel - PHP 8.1 Extensions - Ubuntu
#!/bin/bash
sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt upgrade -y
sudo apt install php8.1 -y
sudo apt install php8.1-bcmath -y
sudo apt install php8.1-bz2 -y
sudo apt install php8.1-cli -y
sudo apt install php8.1-common -y
sudo apt install php8.1-curl -y
sudo apt install php8.1-dev -y
sudo apt install php8.1-gd -y
sudo apt install php8.1-igbinary -y
sudo apt install php8.1-imagick -y
sudo apt install php8.1-imap -y
sudo apt install php8.1-intl -y
sudo apt install php8.1-mbstring -y
sudo apt install php8.1-memcached -y
sudo apt install php8.1-msgpack -y
sudo apt install php8.1-mysql -y
sudo apt install php8.1-opcache -y
sudo apt install php8.1-pgsql -y
sudo apt install php8.1-readline -y
sudo apt install php8.1-redis -y
sudo apt install php8.1-soap -y
sudo apt install php8.1-ssh2 -y
sudo apt install php8.1-tidy -y
sudo apt install php8.1-xml -y
sudo apt install php8.1-xmlrpc -y
sudo apt install php8.1-zip -y
# sudo apt-get install php8.1 php8.1-bcmath php8.1-bz2 php8.1-cli php8.1-common php8.1-curl php8.1-dev php8.1-gd php8.1-igbinary php8.1-imagick php8.1-imap php8.1-intl php8.1-mbstring php8.1-memcached php8.1-msgpack php8.1-mysql php8.1-opcache php8.1-pgsql php8.1-readline php8.1-redis php8.1-ssh2 php8.1-soap php8.1-tidy php8.1-xml php8.1-xmlrpc php8.1-zip -y
@DenisJunio
Copy link
Author

DenisJunio commented Dec 27, 2021

nginx

sudo add-apt-repository ppa:ondrej/nginx-mainline -y
sudo apt update
sudo apt upgrade -y
sudo apt install nginx php8.1-fpm -y
sudo apt install nginx-extras -y

@DenisJunio
Copy link
Author

DenisJunio commented Jan 11, 2022

Apache

sudo add-apt-repository ppa:ondrej/apache2 -y
sudo apt update
sudo apt upgrade -y
sudo apt install apache2 libapache2-mod-php8.1 -y

@vipinkundal
Copy link

vipinkundal commented Jul 15, 2022

apt-get install php8.1-bcmath php8.1-bz2 php8.1-cli php8.1-common php8.1-curl php8.1-dev php8.1-gd php8.1-igbinary php8.1-imagick php8.1-imap php8.1-intl php8.1-mbstring php8.1-memcached php8.1-msgpack php8.1-mysql php8.1-opcache php8.1-pgsql php8.1-readline php8.1-redis php8.1-ssh2 php8.1-tidy php8.1-xml php8.1-xmlrpc php8.1-zip -y

@venkat3534
Copy link

Hi i am not able to install php extensions like this pcre,sodium,json,libxml,openssl,spl,hash can you please help me?

@DenisJunio
Copy link
Author

Hi i am not able to install php extensions like this pcre,sodium,json,libxml,openssl,spl,hash can you please help me?

Please run php -m you probably already have these extensions installed

@DenisJunio
Copy link
Author

PHP 8.2

sudo apt-get install php8.2 php8.2-bcmath php8.2-bz2 php8.2-cli php8.2-common php8.2-curl php8.2-dev php8.2-gd php8.2-igbinary php8.2-imagick php8.2-imap php8.2-intl php8.2-mbstring php8.2-memcached php8.2-msgpack php8.2-mysql php8.2-opcache php8.2-pgsql php8.2-readline php8.2-redis php8.2-ssh2 php8.2-soap php8.2-tidy php8.2-xml php8.2-xmlrpc php8.2-zip -y

@howtomakeaturn
Copy link

I love you all!

This is very useful!

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