首页 > 作文

CentOS7编译安装php7.1的教程详解

更新时间:2023-04-07 10:31:23 阅读: 评论:0

1.首先安装依赖包:

yum install 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 zlib zlib-devel glibc glibc-devel glib2 glib2-devel ncurs curl gdbm-devel db4-devel libxpm-devel libx11-devel gd-devel gmp-devel expat-devel xmlrpc-c xmlrpc-c-devel libicu-devel libmcrypt-devel libmemcached-devel

2.下东坡诗词载php压缩包并解压:

wget http://php.net/distributions/php-7.1.0.tar.gztar -zxvf php-7.1.0.tar.gzcd p大学竞选学习委员hp-7.1.0

3.编译安装,编译的时候可能会出现各种报错情况,下一篇主要写编译是常见的错误及解决办法:

./configure \--prefix=/usr/local/php \--with-config-file-path=/etc \--enable-fpm \--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-mbreg兰州海拔ex-backtrack \--with-libmbfl \--with-onig \--enable-pdo \--with-mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--with-zlib-dir \--with-pdo-sqlite \--with-readline \--enable-ssion \--enable-shmop \--enable-simplexml \--enable-sockets \--enable-sysvmsg \--enable-sysvm \--enable-sysvshm \--enable-wddx \--with-libxml-dir \--with-xsl \--enable-zip \--enable-mysqlnd-compression-support \--with-pear \--enable-opcache

4.编译成功后安装:

make && make in团日活动总结stall

5.安装成功后配置环境变量:

为了使用方便,可以在 /etc/profile文件末尾添加php环境变量 :

path=$path:/usr/local/php/bin export path

保存后刷新环境变量:

source /etc/profile  #更新

查看环境变量:

echo $path

看到php环境变量的路径后,以后就可以直接使用php命令了,查看php版本:

php -v

6.现在的php没有.ini文件和配置文件,还需要配置php-fpm:

cp php.ini-production /etc/php.inicp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.confcp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/2022安徽高考local/php/etc/php-fpm.d/www.confcp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpmchmod +x /etc/init.d/php-fpm

php-fpm的启动、停止和重启:

rvice php-fpm start  #启动rvice php-fpm stop   #停止rvice php-fpm restart #重启

总结

以上所述是www.887551.com给大家介绍的centos7编译安装php7.1的教程详解,希望对大家有所帮助

本文发布于:2023-04-07 10:31:17,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/cf153340e34bc312c23745ad0bc366dd.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:CentOS7编译安装php7.1的教程详解.doc

本文 PDF 下载地址:CentOS7编译安装php7.1的教程详解.pdf

下一篇:返回列表
标签:环境变量   重启   东坡   团日
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图