Skip to content

Instantly share code, notes, and snippets.

@fajarwz
Last active December 22, 2023 15:50
Show Gist options
  • Save fajarwz/e48d78fba0afaa24526a97345ebcf750 to your computer and use it in GitHub Desktop.
Save fajarwz/e48d78fba0afaa24526a97345ebcf750 to your computer and use it in GitHub Desktop.
install laravel swoole on Ubuntu 21.04
# using Ubuntu
# install laravel first
laravel new my-app
# get laravel octane package
composer require laravel/octane
# maybe you encountering an error such as "require ext-curl". You can install it with this command
sudo apt-get install php-curl
# then install it again using "composer require laravel/octane"
# after successfully getting octane package, install it using
php artisan octane:install
# but maybe you need to install swoole first on your machine then do
pecl install swoole
# but maybe you cant install it with pecl, so try
sudo apt install php-swoole
# then try to install octane again with "php artisan octane:install"
# choose whether you want to install octane with swoole based or roadrunner based https://laravel.com/docs/9.x/octane#installation
# now try to start your octane server
php artisan octane:start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment