编译安装hph
一、安装相关的依赖:
yum -y install gcc gcc-c++ bzip2-devel libjpeg-devel libpng-devel freetype-devel libxml2-devel
二、解压php安装包php-5.6.22.tar.gz
tar -xzvf php-5.6..tar.gz -C/usr/src/
三、编译安装php
cd /usr/src/php-5.6./
./configure --prefix=/usr/local/php5.6/ --with-config-file-path=/usr/local/php5.6/etc --with-config-file-scan-dir=/usr/local/php5.6/etc/php.d --with-mysql=/usr/local/mysql/ --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --enable-bcmath --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-sockets --with-apxs2=/usr/local/httpd/bin/apxs --with-bz2 --enable-maintainer-zts --with-gd --with-gettext && make && make install
四、查看模块的php是否安装成了httpd的模块
ll /usr/local/httpd/modules/ | grep --color php
五、复制php的配置文件
cp /usr/src/php-5.6./php.ini-production /usr/local/php5.6/etc/php.ini
六、修改httpd的配置文件使httpd能处理php文件
vim /usr/local/httpd/conf/httpd.conf
增加
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps 修改
DirectoryIndex index.php index.html
七、制做一个首页文件index.php用于测试php是否安装成功
mv /usr/local/httpd/htdocs/index.html /usr/local/httpd/htdocs/index.php vim /usr/local/httpd/htdocs/index.php
<html>
<head>
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>
八、启动httpd并查看php页面是否生效

编译安装hph的更多相关文章
- Centos6.5下编译安装mysql 5.6
一:卸载旧版本 使用下面的命令检查是否安装有MySQL Server rpm -qa | grep mysql 有的话通过下面的命令来卸载掉 rpm -e mysql //普通删除模式 rpm -e ...
- CENTOS 6.5 平台离线编译安装 PHP5.6.6
一.下载php源码包 http://cn2.php.net/get/php-5.6.6.tar.gz/from/this/mirror 二.编译 编译之前可能会缺少一些必要的依赖包,加载一个本地yum ...
- Linux下编译安装Vim8.0
什么是Vim? Vim 是经典的 UNIX 编辑器 Vi 的深度改良版本.它增加了许多功能,包括:多级撤销.格式高亮.命令行历史.在线帮助.拼写检查.文件名补完.块操作.脚本支持,等等.除了字符界面版 ...
- OpenSUSE下编译安装OpenFoam
在不是Ubuntu系统下安装OpenFoam,需要采用编译安装的方式.以下以OpenSuSE为例进行编译安装. 1 软件包准备 需要下载两个程序包: OpenFOAM-4.x-version-4.1. ...
- 不要着急改代码,先想想--centos 6.8下编译安装tmux
诸位读者新年好,2017开年第一篇博客,请允许我先问候一下看到这篇博客的诸位.写博客是我2017年定下的目标之一,希望我会坚持下去. 最近打算尝试一下tmux这个神器,于是有了这一篇关于思维方式的Bl ...
- protobuf的编译安装
github地址:https://github.com/google/protobuf支持多种语言,有多个语言的版本,本文采用的是在centos7下编译源码进行安装. github上有详细的安装说明: ...
- 编译安装mysql
参考:http://www.centoscn.com/CentosServer/www/2015/0422/5245.html 安装mysql5.6.17 1.按照标准需要给mysql创建所属用户和用 ...
- 编译安装zabbix3.2
1.1 环境准备 系统环境准备:redhat 6.6 64位mysql-5.6.34php-5.6.28zabbix-3.2.1配置前先关闭iptables和SELINUX,避免安装过程中报错. # ...
- centos系统编译安装nginx+php环境另加独立mysql教程
以前看过的安装nginx+php环境都带了mysql数据库了,这个是因为很多站长都是nginx+php+mysql都在同一台服务器了,那么今天我们是单独处理了,一个是nginx+php环境,然后mys ...
随机推荐
- tessnet2 在vs2010 及以上版本不能调用的解决方案
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version=&qu ...
- ASP.NET MVC3快速入门——第四节、添加一个模型
在本节中我们将追加一些类来管理数据库中的电影.这些类将成为我们的MVC应用程序中的“模型”部分.我们将使用一个.NET Framework的被称之为“Entiry Framework”的数据访问技术来 ...
- Java内存回收(垃圾回收)机制总结
一.背景: Java程序员编写程序时,对于新建的对象,当不再需要此对象时,不必去释放这个对象所占用的空间,这个工作是由Java虚拟机自己完成的 ,即内存回收或垃圾回收. 二.如何知道一个对象所占用的空 ...
- Zoj3332-Strange Country II(有向竞赛图)
You want to visit a strange country. There are n cities in the country. Cities are numbered from 1 t ...
- 独立写作(A or B)
开头:On contemporary society(一般的背景)/ With the advent of the technologically advanced society (the info ...
- 一个sql很多个not like的简化语句
如: select * from table where `zongbu` not like '%北京%' and `zongbu` not like '%上海%' and `zongbu` not ...
- python3-day1(文件操作)
index: str.fomat() open file str.replace 一.新款str.fomat() 1.>>> '12'.zfill(5) '00012' 2.> ...
- 表单验证插件jquery.validate的使用方法演示
jQueryValidate表单验证效果 jquery.validate验证错误信息的样式控制 <!--validate验证插件的基础样式--> input.error{border: 1 ...
- Hibernate(四)——缓存策略+lazy
Hibernate作为和数据库数据打交道的框架,自然会设计到操作数据的效率问题,而对于一些频繁操作的数据,缓存策略就是提高其性能一种重要手段,而Hibernate框架是支持缓存的,而且支持一级和二级两 ...
- POJ 2524 并查集
Ubiquitous Religions Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 23580 Accepted: 1160 ...