Skip to content

Instantly share code, notes, and snippets.

@mhsattarian
Last active December 18, 2021 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhsattarian/5990615241f6e1b65e2d758759200c00 to your computer and use it in GitHub Desktop.
Save mhsattarian/5990615241f6e1b65e2d758759200c00 to your computer and use it in GitHub Desktop.
Install php 5.6 and composer in ubuntu +18.04 (also WSL2)
# install php5.6
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php5.6
php --version
# install required php plugins
sudo apt install php5.6-curl php5.6-xml php5.6-mbstring
# install and setup composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
# install deps
composer install
# run
php artisan key:generate
php artisan serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment