![]() You can check the status of PHP FPM by using below command: $ systemctl status php7. Once the PHP FPM package installed in your system, you can handle it like any other application. You can install PHP and PHP FPM package by using the following command: $ sudo apt install php7.2 php7.2-fpm ![]() So, to use Nginx with PHP need to install another application PHP FPM, which will handle PHP files and operation. Nginx doesn’t have built-in support for PHP like an apache web server. To configure PHP with apache, you have to install PHP and apache library for PHP by using below command: $ sudo yum install php7.2 libapache2-mod-phpĪfter installation of PHP and apache library restart the apache service: $ sudo systemctl restart httpd Configure Nginx to run PHP In this section, we will see how to configure an Apache web server with PHP 7.2. If you are running the PHP application on the web browser, you have to configure it with web server Apache or Nginx. You can verify the php installation by checking the version of PHP by using “php –v” command, as shown below: $ php –v Now, enable the PHP 7.2 Remi repository using following command: $ sudo yum-config-manager -enable remi-php72Īfter enable the repository you can start installation of PHP 7.2 using following command: $ sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd Got no idea where to start to get PHP on your server Depending on your unique setup, there are many ways to do it Subscribe. You may get the window to import GPG key for repository, just press ‘Y’ and hit Enter button.Īfter enabling the REMI repository, again update the package list using the following command: $ sudo yum update $ sudo yum install epel-release yum-utils ![]() The REMI repository is depends on EPEL repository, so we use below command to enable both EPEL and REMI repository. There are multiple repository available to provide PHP, but we use REMI repository as it is good to provide various application with latest distribution. It’s also part of the LEMP Stack which replaces Apache with NGINX. To install any package on CentOS system need to update the repository’s package list by using the following command: $ sudo yum update For some, it is important to know how to install PHP as part of the LAMP Stack along with the Linux operating system family, Apache web server, and MySQL database management system. To install PHP 7.2 on CentOS 7 operating system follow below steps: To perform practical stuff of this tutorial, make sure you have CentOS 7 installed machine and user to log in on system with sudo privileges. Today, in this article, we will learn to install PHP 7.2 on CentOS 7 machine. The CentOS 7 Operating system comes with PHP version 7.0, and you can install like any other application package using the apt package manager.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |