Skip to content

Instantly share code, notes, and snippets.

@muhajirinlpu
Created June 28, 2023 09:25
Show Gist options
  • Save muhajirinlpu/55ec221cc73015c697f1e5a97ceda650 to your computer and use it in GitHub Desktop.
Save muhajirinlpu/55ec221cc73015c697f1e5a97ceda650 to your computer and use it in GitHub Desktop.
asdf php laravel compatible install ubuntu

Install Requirements

sudo apt update && sudo apt install -y autoconf bison build-essential locate curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev libsodium-dev openssl pkg-config re2c zlib1g-dev

Run ASDF basic install

asdf plugin-add php https://github.com/asdf-community/asdf-php.git

asdf list-all php

choose version you want to install, in this case i will use 8.2.7

PHP_CONFIGURE_OPTIONS="--with-openssl --with-curl --with-zlib --with-readline --with-gettext --with-sodium" asdf install php 8.2.7

Install extensions

first we need to activate shell

asdf shell php 8.2.7

then, we will install redis, swoole

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