Centos7安装PHP7

安装依赖

yum updateyum install gcc-c++ libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel

编译

./configure --prefix=/usr/local/php --with-config-file-path=/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-soap --with-libxml-dir --with-xmlrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --enable-mbregex --enable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear --enable-opcache

makemake install

出现 configure: error: mcrypt.h not found. Please reinstall libmcrypt时

cd /usr/local/src
wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
tar -zxvf libmcrypt-2.5.8.tar.gz
cd /usr/local/src/libmcrypt-2.5.8
./configure --prefix=/usr/local
make
make install

出现 Don‘t know how to define struct flock on this system, set --enable-opcache=no

[[email protected] php-7.1.0]# vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
# 添加这行
/usr/local/lib
~                                
时间: 2024-11-05 12:16:08

Centos7安装PHP7的相关文章

Centos7 安装 PHP7最新版

Centos7 安装 PHP7最新版 PHP编译安装适合Centos6以及Centos7 PHP 一.简单安装 通过yum 1.安装epel-release rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 2.安装PHP7的rpm源 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 3.安装PH

Centos7 安装PHP7版本

1. 更换rpm 源,执行下面两个 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm //查看yum search php71w 2. 安装php7.1 以及扩展yum install php71w php71w-fpm php71w-cli php71w-

CentOS7 安装php7.2 傻瓜式 并与nginx配合使用

安装源 安装 EPEL 软件包: $ sudo yum install epel-release 安装 remi 源: $ sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm 安装 yum 扩展包: $ sudo yum install yum-utils 启用 remi 仓库: $ sudo yum-config-manager --enable remi-php72 $ sudo yum update

centos7+ 安装 php7.2

yum install epel-release -y yum update 安装依赖 yum -y install wget vim pcre pcre-devel openssl openssl-devel libicu-devel gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc

centos7 安装PHP7

gccyum install gcc#libxml2yum install libxml2-devel #添加用户useradd -s /sbin/nologin php-fpm #打开src目录 cd /usr/local/src #下载安装包wget https://www.php.net/distributions/php-7.2.3.tar.gz cd php-7.2.3 ./configure --prefix=/usr/local/php --sysconfdir=/usr/loca

centos7 安装php7,报错cannot get uid for user nginx

centos7 安装nginx和php7

centos7 安装nginx和php7 centos7系统安装php7会出现一些奇奇怪怪的问题,耽误时间,影响效率,这里推荐直接yum安装 1.在开始安装 Nginx 和 php7-fpm 之前,我们还学要先添加 EPEL 包的仓库源.使用如下命令:      yum -y install epel-release 然后我们还需要为 php7-fpm 添加另外一个仓库.互联网中有很个远程仓库提供了 PHP 7 系列包,我在这里使用的是 webtatic. 添加 PHP7-FPM webtati

centos7.3安装php7.0

需求:在Centos7.3下搭建LNMP环境 文章转载自:http://blog.csdn.net/wszll_alex/article/details/76285324 作者:狂热森林 1. 关闭防火墙和selinux 打开文件selinux vim /etc/sysconfig/selinux 将文件中SELINUX=enforcing改为disabled,然后执行"setenforce 0″不用重启地关闭selinux. SELINUX=disabled 关闭放火墙 systemctl s

centos7 通过YUM安装 PHP7 NGINX1.1.8 POSTGRESQL9.5

CENTOS的策略实在是太保守了,现在PHP的官方包才5.3  PHP7性能大幅提高,不尝试下对不起自己. 1.最小化安装CENTOS7 2.更新源: yum update reboot 3.安装扩展源: yum install epel-release 4.安装工具软件: yum install wget unzip unrar 5.安装PHP7.0扩展源: wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm rpm