The CentOS 6 official software repositories has PHPhường 5.3 which has reached end of life and no longer actively maintained by the developers.
To keep up with the lachạy thử features và security updates, you need a newer (probably the latest) version of PHPhường on your CentOS 6 system.
Bạn đang xem: How to install linux, apache, mysql, php (lamp) stack on centos 6
If you’re looking to lớn install different versions of PHP in CentOS 6, go through the following article.
For the purpose of this guide, we will be operating the system as root, if that is not the case for you, make use of the suvì command khổng lồ acquire root privileges.
Installing PHPhường. 7 on CentOS 7
1. To install latest PHPhường 7, you need lớn add EPEL và Rengươi repository lớn your CentOS 6 system like so.
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm# yum install http://rpms.remirepo.net/enterprise/remi-release-6.rpm
2. Now install yum-utils, a group of useful tools that enhance yum’s default package management features.
Yum-utils can be used for manipulating package repositories and additional package management operations such as enabling or disabling packages without any manual configuration by a system administrator.
Xem thêm: Google Dịch 12 Cung Hoàng Đạo Tiếng Anh: Tên Gọi, Tính Cách Và Ý Nghĩa
You can install it as follows:
# yum install yum-utils3. In this step, you need to enable Rengươi repository using yum-config-manager utility, as the default repository for installing PHP.
# yum-config-manager --enable remi-php70 <Install PHP 7.0>If you want khổng lồ install PHPhường 7.1 or PHP 7.2 on CentOS 6, just enable it as shown.
# yum-config-manager --enable remi-php71 <Install PHPhường 7.1># yum-config-manager --enable remi-php72 <Install PHP. 7.2>4. Then finally install PHPhường. 7 on CentOS 6 with all necessary PHP modules using the following command.
# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
In this article, we have sầu explained how lớn install PHPhường 7 on CentOS 6 Linux. You can send us any questions or additional thoughts via the feedbaông chồng form below.
Xem thêm: Tải Game Tlbb Lậu Mới Nhất, Giới Thiệu Tlbb Private & Thông Tin Tlbb Mới Ra
Tags centos 6 Post navigation
How to Disconnect Inactive sầu or Idle SSH Connections in Linux
Install a Complete Mail Server with Postfix & Webmail in Debian 9
If you liked this article, then vì chưng subscribe to gmail alerts for Linux tutorials. If you have sầu any questions or doubts? vì chưng ask for help in the comments section.