Puvox – Blog
  • HOMEPAGE
  • Mobile & Android
  • Browser
  • Plugin
  • Technology
  • Trading programming
  • Website
  • Windows & Software
  • WordPress

Puvox – Blog

Recent Posts

  • Debloat Windows 11/10 with debloaters
  • Configure VPS with details & LAMP
  • Necessary steps to secure your digital life
  • Add user & ssh key in Linux/Ubuntu
  • Install Redis Cache for PHP-8

Recent Comments

  • PHP-8 (zts) & Apache & Swoole/Parallel (+ WordPress) with Docker/ PhpBrew – Puvox – Blog on Install Redis Cache for PHP-8
  • Constantin on Remove (exit) “SmartImage” on Philips Monitor
  • Docker & PHP-8 (zts) & Apache & Swoole+Parallel – Puvox – Blog on Useful commands for docker (Windows)
  • Docker & phpBrew (php-7 zts) & WordPress – Puvox – Blog on PHP-8 (zts) & Apache & Swoole/Parallel (+ WordPress) with Docker/Ubuntu/PhpBrew
  • Hajra on Migrate/Redirect Blogspot without loosing SEO Rank

Archives

  • April 2022
  • December 2021
  • July 2021
  • June 2021
  • December 2020
  • October 2020
  • July 2020
  • May 2020
  • February 2020
  • January 2020
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • September 2018
  • August 2018
  • June 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • May 2017
  • April 2017
  • March 2017
  • January 2017
  • December 2016
  • December 2013
  • January 2013

Categories

  • Browser
  • Coding
  • Health
  • Information & How to tutorials
  • Mobile & Android
  • Plugin
  • Technology
  • Trading programming
  • Video
  • Website
  • Windows & Software
  • WordPress

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

PHP-8 (zts) & Apache & Swoole/Parallel (+ WordPress) with Docker/Ubuntu/PhpBrew

  • Coding

We had another scenario, where the mentioned combination was needed to be installed. It was a bit cumbersome, but the final solution turned out to be:

### METHOD 1: using Docker ###

If you want to use ubuntu (instead of debian), the I reckon Ubuntu (phusion image) as the champion image for docker and so, to build your PHP8 on top of that, you can Download official php8-docker folder and modify Dockerfile with the changes shown in this DIFF and build it. (or you can also use ready-made LAMP image)

P.S. We recommend to look into the useful docker commands. Whoever wants, steps to install Redis )

WordPress

To install wordpress on top of the above image, download https://github.com/docker-library/wordpress and modify Dockerfile with changes as shown in this DIFF and build it. (if you want to connect to outside MYSQL server, you might need this tip)

### METHOD 2 : using PhpBrew ###

After following “requirements” part of phpbrew, then install PHP with phpbrew. at first check if echo $PKG_CONFIG_PATH variable returns result, if not, set it:

export PKG_CONFIG_PATH=/usr/lib/pkgconfig1

Then use

sudo apt-get install apache2-dev
sudo apt-get install libonig-dev
phpbrew --debug install 8.0 +default +mysql +sqlite +mb +debug +fpm +zip +intl +openssl=/usr/local/opt/openssl +bz2=/usr/local/opt/bzip2 +zlib=/usr/local/opt/zlib +apxs2=/usr/bin/apxs2  +zts -- --enable-zts
#for php7 (instead of +zts) in the end needs -- --enable-maintainer-zts, for older php8/phpbrew too, but word "-maintainer" is not needed
phpbrew --debug ext install swoole
phpbrew --debug ext install parallel #or follow instructions from github readme. If the command doesn't success, use:  phpbrew ext install parallel -- --enable-parallel-coverage --enable-parallel-dev
#p.s. you might need also these extensions in addition to above ones (for wordpress): +xmlrpc +gd +soap

and this will help to tell apache to use phpbrew.

____________

* Other components: some people might want to compile php with different components, like --with-gmp or etc. However, in such case, the needed module bases should be installed before php-module, so, in dockerfile you might need to put RUN apt-get update && apt-get install -y libgmp-dev before the php-build line.

June 2, 2021

Post navigation

Useful commands for docker (Windows) → ← Add plugin for LiquidSoap in AzuraCast

1 thought on “PHP-8 (zts) & Apache & Swoole/Parallel (+ WordPress) with Docker/Ubuntu/PhpBrew”

  1. Pingback: Docker & phpBrew (php-7 zts) & WordPress – Puvox – Blog

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Browser
  • Coding
  • Health
  • Information & How to tutorials
  • Mobile & Android
  • Plugin
  • Technology
  • Trading programming
  • Video
  • Website
  • Windows & Software
  • WordPress
Copyright © 2019 | Puvox Software