CentOS 7 安装 PHP 7.0以及memcache和redis扩展
时间:2017-05-27 16:20 来源:linux.it.net.cn 作者:IT
安装EPEL
EPEL 是 Extra Packages for Enterprise Linux 的缩写(EPEL),是用于 Fedora-based Red Hat Enterprise Linux (RHEL) 的一个高质量软件源,所以同时也适用于 CentOS 或者 Scientific Linux 等发行版。
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install epel-release
安装PHP 采用webtatic的编译版本
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php70w php70w-devel php70w-bcmath php70w-fpm php70w-mbstring php70w-pdo php70w-soap php70w-mysql php70w-gd
安装memcached for php7
git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached
git checkout php7
phpize
./configure --disable-memcached-sasl
make && make install
add
extension=memcached.so
to php.ini
安装redis for php7
git clone https://github.com/phpredis/phpredis.git
cd phpredis
git checkout php7
phpize
./configure
make && make install
add
extension=redis.so
to php.ini
(责任编辑:IT)
安装EPEL EPEL 是 Extra Packages for Enterprise Linux 的缩写(EPEL),是用于 Fedora-based Red Hat Enterprise Linux (RHEL) 的一个高质量软件源,所以同时也适用于 CentOS 或者 Scientific Linux 等发行版。 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install epel-release 安装PHP 采用webtatic的编译版本 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum install php70w php70w-devel php70w-bcmath php70w-fpm php70w-mbstring php70w-pdo php70w-soap php70w-mysql php70w-gd 安装memcached for php7 git clone https://github.com/php-memcached-dev/php-memcached.git cd php-memcached git checkout php7 phpize ./configure --disable-memcached-sasl make && make install add extension=memcached.so to php.ini 安装redis for php7 git clone https://github.com/phpredis/phpredis.git cd phpredis git checkout php7 phpize ./configure make && make install add extension=redis.so to php.ini (责任编辑:IT) |