Update php.sh
This commit is contained in:
parent
d27e184ee0
commit
028dd53504
|
|
@ -30,7 +30,26 @@ cd "$(dirname "$0")"
|
|||
#remove php 8.2
|
||||
/usr/bin/apt remove -y php8.2 php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-imap php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap
|
||||
|
||||
#remove php 8.3
|
||||
/usr/bin/apt remove -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap
|
||||
|
||||
#install php update and set the unix socket
|
||||
if [ ."$php_version" = ."8.3" ]; then
|
||||
#add a repo for php 8.x
|
||||
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
|
||||
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
|
||||
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
||||
/usr/bin/apt-get update
|
||||
|
||||
#install php 8.2
|
||||
apt-get install -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap
|
||||
|
||||
#update the unix socket name
|
||||
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
|
||||
|
||||
#set the PHP ini file path
|
||||
php_ini_file='/etc/php/8.2/fpm/php.ini'
|
||||
fi
|
||||
if [ ."$php_version" = ."8.2" ]; then
|
||||
#add a repo for php 8.x
|
||||
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
|
||||
|
|
|
|||
Loading…
Reference in New Issue