Created
August 16, 2019 21:13
-
-
Save nickpoulos/05d4550873fe40ae106f08ed33bc54b0 to your computer and use it in GitHub Desktop.
Install Swoole On Laravel Homestead
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
#!/bin/bash | |
ini_file=$(php -i | grep "Loaded Configuration File" | awk 'NR==1{print $5}') | |
php_version_output=$(php -v) | |
php_version=${php_version_output:4:3} | |
sudo pecl channel-update pecl.php.net | |
sudo pecl install swoole | |
sudo echo "extension=swoole.so" >> $ini_file | |
sudo service php$php_version-fpm reload | |
success_check=$(php -m |grep swoole) | |
if [ $success_check = "swoole" ] ; then | |
echo "Swoole installed successfully!" | |
else | |
echo "Swoole was not installed. Please check extension paths and PHP versions." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment