Skip to content

Instantly share code, notes, and snippets.

@kerkenit
Last active May 27, 2024 15:20
Show Gist options
  • Save kerkenit/fd1e118d615160d9ca0155a9ffe675a2 to your computer and use it in GitHub Desktop.
Save kerkenit/fd1e118d615160d9ca0155a9ffe675a2 to your computer and use it in GitHub Desktop.
Install multiple PHP version on Debian/Ubuntu with all modules and update system
#!/bin/bash
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install -y php7.4 php7.4-{apcu,bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,apcu-bc,geoip,json,zip}
sudo apt install -y php8.0 php8.0-{apcu,bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,zip}
sudo apt install -y php8.1 php8.1-{bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,zip}
sudo apt install -y php8.2 php8.2-{apcu,bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,zip}
sudo apt install -y php8.3 php8.3-{apcu,bcmath,bz2,cgi,cli,common,curl,dba,dev,dom,enchant,fpm,gd,gmp,igbinary,imagick,imap,interbase,intl,ldap,mbstring,mcrypt,memcache,memcached,msgpack,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,redis,soap,sqlite3,ssh2,sybase,tidy,xml,xmlrpc,xsl,zip}
sudo apt upgrade -y
sudo apt autoremove -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment