Installing Apache on CentOS 6 or 7
yum -y install httpd
To install PHP 7 on CentOS 6 or 7:
CentOS 6. Enter the following commands in the order shown:yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
CentOS 7. Enter the following commands:
yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-14.ius.centos7.noarch.rpm
yum -y update
Enter the following command:
yum install mod_php70u php70u-bcmath php70u-cli php70u-common php70u-devel php70u-gd php70u-intl php70u-json php70u-mbstring php70u-mcrypt php70u-mysqlnd php70u-odbc php70u-pdo php70u-pear php70u-pecl-memcached php70u-soap php70u-tidy php70u-xml php70u-xmlrpc
Restart Apache: service httpd restart
Enter the following command to verify that PHP 7.x is installed:
php -v
The following response indicates that PHP 7.0.3 is installed properly:
PHP 7.0.3 (cli) (built: Feb 4 2016 08:51:10) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
PHP 5.6 on CentOS 6 or 7
There is more than one way to install PHP 5.6 on CentOS; the following is a suggestion only. Consult a reference for additional options.
To install PHP 5.6 on CentOS 6 or 7:
CentOS 6. Enter the following commands in the order shown:
yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
CentOS 7. Enter the following commands in the order shown:
yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget https://centos7.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
Restart Apache: service httpd restart
Enter the following command to verify that PHP 5.6 is installed:
php -v
The following response indicates that PHP 5.6 is installed properly:
PHP 5.6.18 (cli) (built: Feb 4 2016 09:29:52)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
The preceding message confirms that the Zend OPcache is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the PHP OPcache documentation.
Continue with Required PHP settings.
PHP 5.5 on CentOS 6
There is more than one way to upgrade CentOS 6 to PHP 5.5; the following is a suggestion only. Consult a reference for additional options.
To install PHP 5.5 on CentOS 6:
Enter the following commands in the order shown.
yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php55u php55u-opcache php55u-xml php55u-mcrypt php55u-gd php55u-devel php55u-mysql php55u-intl php55u-mbstring php55u-bcmath
Enter the following command to verify the version:
php -v
The following messages display:
PHP 5.5.32 (cli) (built: Feb 4 2016 09:30:35)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Restart Apache: service httpd restart
remi memcache
yum --enablerepo=remi,remi-php56 install php-pecl-memcached php-pecl-memcache memcached
Không có nhận xét nào:
Đăng nhận xét