Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 685

How to build PHP 8.0.0-dev on RHEL 8

$
0
0
If you don't have access to a RHEL license, then you can get RHEL 8 through Fedora 28 or newer. There's no stable build of CentOS 8 right now, but that might change in the near future.

Okay let's get started with the necessary packages needed to build a MyBB-friendly copy of PHP 8:
sudo yum -y install \
	bison			\
	re2c			\
	systemd-devel	\
	libacl-devel	\
	libxml2-devel	\
	openssl-devel	\
	sqlite-devel	\
	bzip2-devel		\
	libcurl-devel	\
	libpng-devel	\
	libicu-devel	\
	oniguruma-devel	\
	libpq-devel		\
	libsodium-devel	\
	libargon2-devel	\
	libtidy-devel	\
	git

Now that we have our required libraries and the git program, we can clone ourselves a copy of the PHP sources:
git clone https://github.com/php/php-src.git

From there we want to enter the php source folder and create a new shell script named "phpconf.sh" with the following contents:
#!/bin/bash
./configure						\
	--enable-fpm				\
	--with-fpm-systemd			\
	--with-fpm-acl				\
	--enable-fd-setsize=2048	\
	--with-openssl				\
	--with-zlib					\
	--enable-bcmath				\
	--with-bz2					\
	--with-curl					\
	--enable-exif				\
	--enable-gd					\
	--enable-intl				\
	--enable-mbstring			\
	--with-mysqli				\
	--with-pdo-mysql			\
	--with-pdo-pgsql			\
	--enable-soap				\
	--with-sodium				\
	--with-password-argon2		\
	--with-tidy					\
	--with-xmlrpc				\
	--enable-zts				\
	--enable-shared

Now we need to run the following commands:
sudo chmod +x phpconf.sh
./buildconf
./phpconf.sh

If everything went well, you should be greeted with a "thank you" screen from the Zend team. Now you can start the build process.
sudo make
sudo make install

And voila, you should be running a thread-safe x86_64 variant of PHP 8.0.0-dev:
[Image: i6sbEXQ.png]

To verify that the modules you enabled in the build configuration are functioning:
php -r "echo '<pre>'; print_r(get_loaded_extensions()); echo '</pre>';"

This should be the expected output:
[Image: 5zioI1o.png]

Viewing all articles
Browse latest Browse all 685

Latest Images

Trending Articles



Latest Images