
Cookies!
We use cookies to make your experience better!
Apache is a popular open-source, cross-platform web server software. PHP is a widely-used open-source scripting language designed for web development. In this guide, we'll show you how to install Apache along with PHP 8 on a CentOS 7 server.
Before you begin, make sure you have a CentOS 7 server with a non-root user with sudo privileges.
First, update your package lists for upgrades and new package installations:
$ sudo yum update -y
Next, install Apache using the following command:
$ sudo yum install httpd -y
Once the installation is complete, start the Apache service and enable it to start on boot using the following commands:
$ sudo systemctl start httpd
$ sudo systemctl enable httpd
EPEL and Remi repositories contain the PHP 8 package. Enable them using the following commands:
$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y
$ sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
Install PHP 8.0 and some common PHP extensions:
$ sudo yum install php80-php php80-php-pear php80-php-bcmath php80-php-pecl-jsond-devel php80-php-pecl-jsond php80-php-pecl-zip php80-php-mysqlnd -y
Congratulations! You've successfully installed Apache with PHP 8 on your CentOS 7 system. Now, you can start building your PHP web applications served via the Apache web server.
22 - 33
Our expert guides help you when you need them anywhere, anytime. [email protected]
Copyright © 2025 Pofii. All Rights Reserved., Made with by Pofii | PofiiUI X.
Lorem ipsum dolor sit amet consectetur adipisicing elit