RedHat 7 安装PHP
发表于:2025-12-01 作者:千家信息网编辑
千家信息网最后更新 2025年12月01日,1.操作系统版本[root@aws srclib]# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 7.4 (Maipo
千家信息网最后更新 2025年12月01日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安全错误
数据库的锁怎样保障安全
保障网络安全经费
php导入数据库出现缺少字符
服务器复制文件速度太慢怎么办
湖北超频服务器配件
湖北第三方软件开发哪家便宜
雅马哈贴片机数据库怎么还原
关于网络安全的电视剧
平度软件开发招聘
怎么和云服务器共享文件
数据库物理名
云南至善园互联网科技有限公司
武汉游戏软件开发
学好数据库能搭建服务器吗
上海综合网络安全工程售后服务
数据库最小覆盖问题
圆通快递网络安全管理制度
北京服务器哪家稳定
网络安全实施方案设计报告
在数据库的数据表中查询姓名
数据库原理第三版第五章习题答案
保险极客软件开发
服务器管理器卸载
移动网络服务器网速不稳定
服务器上如何查看代码
db2数据库最大数据量
wz服务器
服务器管理工具在哪打开
万方学位论文数据库的评论
网络安全问题发生原因
银行信息网络安全防护演练