Skip to content

Instantly share code, notes, and snippets.

@Firsh
Created January 28, 2018 12:26
Show Gist options
  • Save Firsh/d6571f07d60ee3c88b21b66059694bac to your computer and use it in GitHub Desktop.
Save Firsh/d6571f07d60ee3c88b21b66059694bac to your computer and use it in GitHub Desktop.
$ sudo phpbrew install php-7.2.1 +default +dbs +mb +iconv +apxs2=/usr/bin/apxs2
*WARNING* You're runing phpbrew as root/sudo. Unless you're going to install
system-wide phpbrew or this might cause problems.
===> phpbrew will now build 7.2.1
===> Loading and resolving variants...
Downloading http://www.php.net/get/php-7.2.1.tar.bz2/from/this/mirror via curl extension
Redirecting to http://be2.php.net/distributions/php-7.2.1.tar.bz2
[==================================================================] 14.29/14.29MB 100%
===> Extracting /home/ubuntu/.phpbrew/distfiles/php-7.2.1.tar.bz2 to /home/ubuntu/.phpbrew/build/tmp.1517140904/php-7.2.1
===> Moving /home/ubuntu/.phpbrew/build/tmp.1517140904/php-7.2.1 to /home/ubuntu/.phpbrew/build/php-7.2.1
===> Checking patches...
Checking patch for replace apache php module name with custom version name
28 changes patched.
===> Configuring 7.2.1...
Use tail command to see what's going on:
$ tail -F /home/ubuntu/.phpbrew/build/php-7.2.1/build.log
===> Checking patches...
Checking patch for php5.3.29 multi-sapi patch.
Checking patch for php5.3.x on 64bit machine when intl is enabled.
Checking patch for openssl dso linking patch
===> Building...
Build finished: 8.7 minutes.
Installing...
---> Creating php-fpm.conf
---> Creating php.ini
---> Copying /home/ubuntu/.phpbrew/build/php-7.2.1/php.ini-development
---> Found date.timezone is not set, patching...
---> Found date.timezone, patching config timezone with UTC
Initializing pear config...
config-set succeeded
config-set succeeded
config-set succeeded
Enabling pear auto-discover...
config-set succeeded
Congratulations! Now you have PHP with 7.2.1 as php-7.2.1
* We found that you enabled 'mysql' variant, you might need to setup your
'pdo_mysql.default_socket' or 'mysqli.default_socket' in your php.ini file.
* To configure your installed PHP further, you can edit the config file at
/home/ubuntu/.phpbrew/php/php-7.2.1/etc/php.ini
* WARNING:
You haven't setup your .bashrc file to load phpbrew shell script yet!
Please run 'phpbrew init' to see the steps!
To use the newly built PHP, try the line(s) below:
$ phpbrew use php-7.2.1
Or you can use switch command to switch your default php to php-7.2.1:
$ phpbrew switch php-7.2.1
Enjoy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment