1 min read
Official PHP packages on CentOS Linux distribution are slightly behind the current latest PHP stable versions. To get latest stable PHP, use Remi's RPM repository:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum install yum-utils yum-config-manager --enable remi-php72 yum update yum install php
sudo yum -y install nginx
If you're developing PHP applications on your local workstation, PHP also has a useful built-in web server for localhost development. It is not intended to be used for production environments.
Inside your project folder you can run it from the command line using PHP CLI SAPI:
php -S localhost:8000
http://localhost:8000/ in your browser to access it.