Last active
October 26, 2023 11:14
-
-
Save aliharis/56614bbd952ad889bad056c1e079a8bf to your computer and use it in GitHub Desktop.
Installing PHP 8.1 on Ubuntu 20.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PHP 8.1 | |
sudo apt install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get -y install php8.1-cli | |
# Composer | |
cd ~ | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php composer-setup.php | |
sudo mv composer.phar /usr/local/bin/composer | |
rm composer-setup.php | |
# Postgresql | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' | |
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install postgresql postgresql-contrib libpq-dev pgadmin3 | |
sudo apt-get -y install php8.1-pgsql | |
# MySQL | |
sudo apt-get -y install mysql-server | |
# Additional extensions | |
sudo apt -y install php8.1-fpm php8.1-curl php8.1-zip php8.1-mbstring php8.1-xml php8.1-gd php8.1-mysql | |
# Additional Softwares | |
sudo apt -y install nodejs npm zip unzip imagemagick php-imagick |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't seem to work on 18.10. At least not anymore.