RedHat 7 安装PHP
发表于:2026-10-31 作者:千家信息网编辑
千家信息网最后更新 2026年10月31日,1.操作系统版本[root@aws srclib]# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 7.4 (Maipo
千家信息网最后更新 2026年10月31日RedHat 7 安装PHP1.操作系统版本
8.测试是否正确解析php
9.保存脚本后继续测试,如下:
http://blog.itpub.net/20893244/viewspace-2151184/
- [root@aws srclib]# cat /etc/redhat-release
- Red Hat Enterprise Linux Server release 7.4 (Maipo)
- cd /usr/local/src
- wget http://cn2.php.net/distributions/php-5.6.30.tar.gz
- tar -xzvf php-5.6.30.tar.gz
- cd php-5.6.30
- ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif
- 错误1:
configure: error: xml2-config not found. Please check your libxml2 installation.
解决办法:
yum install -y libxml2-devel
错误2:
configure: error: Cannot find OpenSSL's
解决办法:
yum install -y openssl openssl-devel
错误3:
configure: error: Please reinstall the BZip2 distribution
解决办法:
yum install -y bzip2 bzip2-devel
错误4:
configure: error: jpeglib.h not found.
解决办法:
yum install -y libjpeg libjpeg-devel
错误5:
configure: error: freetype-config not found.
解决办法:
yum install -y freetype freetype-devel
错误6:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决办法:
yum install -y libmcrypt-devel
- rpm -ivh "http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm"
- make
- make install
- cp php.ini-production /usr/local/php/etc/php.ini
8.测试是否正确解析php
- vi /usr/local/apache2.4/htdocs/mytest.php //写入如下内容
- <?php
- echo "php测试正常"
- ?>
9.保存脚本后继续测试,如下:
- [root@aws srclib]# curl localhost/mytest.php
- php测试正常
- [root@aws srclib]# /usr/local/php/bin/php -i |grep -i "loaded configuration file"
- PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC
http://blog.itpub.net/20893244/viewspace-2151184/
错误
办法
测试
文件
版本
操作系统
位置
内容
所在
方法
篇文章
系统
脚本
过程
面的
编译
配置
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
小米移动互联网科技园
新华互联网科技
广州大一互联网络科技有限公司
新华互联网科技学院
互联网与科技发展
广州互联网科技公司
苏州互联网科技贷款公司
互联网科技logo
国外互联网科技网站
佰商互联网科技有限公司
卓越科技互联网 招聘
中化能源互联网科技招聘
重庆互联网医院沙龙医盟信息科技
伍佰万互联网科技怎么赚钱
广州千川互联网科技有限公司
浙南科技城互联网大厦招聘
互联网科技快讯热点
有人说阿里系是互联网科技企业
宁波跨境商互联网科技有限公司
西安有哪些互联网高科技企业
云之行互联网科技
互联网科技巨头监管
互联网 科技创业
互联网科技公司招聘
互联网汽车科技小镇
武汉健翔互联网络科技有限公司
崇明区互联网教育科技诚信经营
银行科技岗属于互联网吗
米泉互联网科技专业怎么样
北京品多多互联网科技有限公司