【PHP & Composer】 debian安装php7.3 和 composer

#!/bin/bash
# install php7.3
sudo apt update
sudo apt upgrade -y

sudo apt -y install lsb-release apt-transport-https ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.3.list

sudo apt update

sudo apt -y install php7.3 php7.3-common php7.3-cli


sudo apt -y install php7.3-bcmath php7.3-bz2 php7.3-curl php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-readline php7.3-xml php7.3-zip

sudo apt -y install php7.3-dev php7.3-pdo php7.3-mysql php7.3-dom php7.3-opcache  php7.3-imagick php7.3-imap php7.3-soap 

php -v

# laravel composer install 需要 ext
# mbstring  dom

# install composer
sudo apt update

cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php

sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

# 更新 composer
# sudo composer self-update

#sudo apt clean && rm -rf /var/lib/apt/lists/*

你可能感兴趣的:(PHP,php,7.3,composer,debian)