Centos7下安装apache2.4 php5.6 pdo_oci oci8
一、下载必须的安装源码包
http://httpd.apache.org/download.cgi#apache24
httpd-2.4.23.tar.gz http://apr.apache.org/download.cgi
apr-1.5.2.tar.gz
apr-util-1.5.4.tar.gz https://sourceforge.net/projects/pcre/files/pcre/
pcre-8.39.tar.gz
(安装apache必须安装上面三项) oracle客户端的安装
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm 二、把上述源码包上传到服务器上。 三、安装软件
> tar -zxvf apr-1.5.2.tar.gz
> cd apr-1.5.2
> ./configure --prefix=/data/apr
> make && make install > tar -zxvf apr-util-1.5.4.tar.gz
> cd apr-util-1.5.4
> ./configure --prefix=/data/apr-util \
> --with-apr=/data/apr
> make && make install > tar -zxvf pcre-8.39.tar.gz
> cd pcre-8.39
> ./configure --prefix=/data/pcre \
> --with-apr=/data/apr
> make && make install 安装oracle客户端
> rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
> rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
添加软链接
> ln -s /usr/include/oracle/11.2/client64 /usr/include/oracle/11.2/client
> ln -s /usr/lib/oracle/11.2/client64 /usr/lib/oracle/11.2/client
修改/etc/profile文件
> vi /etc/profile
在文件最下方添加
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
> source /etc/profile 安装apache
> yum -y install gd zlib libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel openssl openssl-devel curl-devel libxslt-devel
> tar -zxvf httpd-2.4.23.tar.gz
> cd httpd-2.4.23
>./configure --prefix=/data/apache24 \
--with-pcre=/data/pcre \
--with-apr=/data/apr \
--with-apr-util=/data/apr-util \
--enable-so \
--enable-rewrite
> make && make install 安装php
> tar -zxvf php-5.6.28.tar.gz
> cd php-5.6.28
> ./configure --prefix=/data/php56 \
--with-apxs2=/data/apache24/bin/apxs \
--with-curl \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv-dir \
--with-kerberos \
--with-libdir=lib \
--with-libxml-dir \
--with-mysqli=mysqlnd \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql=mysqlnd \
--with-pdo-sqlite \
--with-pear \
--with-png-dir \
--with-xmlrpc \
--with-xsl \
--with-zlib \
--with-iconv=/usr/local/libiconv \
--with-pdo-oci=instantclient,/usr,11.2 \
--with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib \
--enable-mysqlnd \
--enable-fpm \
--enable-bcmath \
--enable-libxml \
--enable-inline-optimization \
--enable-gd-native-ttf \
--enable-mbregex \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-shmop \
--enable-soap \
--enable-sockets \
--enable-sysvsem \
--enable-xml \
--enable-zip \
--enable-pthreads \
--enable-maintainer-zts \
--enable-fileinfo \ 如果提示如下问题
configure: error: Please reinstall the iconv library.
请安装iconv库
http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
> tar -zxvf libiconv-1.14.tar.gz
> cd libiconv-1.14
> ./configure --prefix=/usr/local/libiconv
> make && make install
如果出现如下问题,说明你系统版本较高。
./stdio.h:1010:1: 错误:‘gets’未声明(不在函数内)
> cd srclib/
> sed -i -e '/gets is a security/d' ./stdio.in.h
> cd ../
> make
重新安装
> make && make install 修改httpd.conf文件
LoadModule php5_module modules/libphp5.so
LoadModule rewrite_module modules/mod_rewrite.so
Include conf/extra/httpd-vhosts.conf <IfModule dir_module>
DirectoryIndex index.html index.htm index.php
</IfModule> #搜索AddType添加如下
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps 修改php.ini
session.save_path = "/data/php56/tmp"
date.timezone = PRC 重启apache
> /data/apache24/bin/apachectl restart
如果无法访问,centos7默认是用firewall作为防火墙,关闭并重新访问。
> systemctl stop firewalld.service
Centos7下安装apache2.4 php5.6 pdo_oci oci8的更多相关文章
- centos7 下安装Apache2+MariaDB+PHP5过程详解
1.启用Apache2 Centos7默认已经安装httpd服务,只是没有启动.如果你需要全新安装,可以 yum install -y httpd 启动服务:systemctl start httpd ...
- linux centos7环境下安装apache2.4+php5.6+mysql5.6 安装及踩坑集锦(三)
linux centos7环境下安装apache2.4+php5.6+mysql5.6 安装及踩坑集锦(三) 安装PHP 1.yum方式安装PHP方法同安装apache一样传送门:linux cent ...
- linux centos7环境下安装apache2.4+php5.6+mysql5.6 安装及踩坑集锦
linux centos7环境下安装apache2.4+php5.6+mysql5.6 安装及踩坑集锦(一) 一.Linux下安装MySQL 1.下载 下载地址:http://dev.mysql.co ...
- linux centos7环境下安装apache2.4+php5.6+mysql5.6 安装及踩坑集锦(二)
linux centos7环境下安装apache2.4+php5.6+mysql5.6 安装及踩坑集锦(二) 安装apache web容器 . yum方式安装apache 注意apache在linux ...
- Windows下安装Apache2.4+PHP5.4+Mysql5.7
注:文中所写的安装过程均在Win7 x86下通过测试,提供的百度云下载链接均为32位安装包,如需Apache和PHP的64位安装包请从官网下载! 一.安装Apache2.4.12 Apache官方下载 ...
- Centos7 下安装Apache2 + MySQL + PHP7
Apache 1.安装Apache yum install httpd 2.设置服务器开机自动启动Apache systemctl enable httpd.service 若要验证是否自动启动可在重 ...
- CentOS下源码安装Apache2.4+PHP5.4+MySQL5.5
一.准备(把所有的源文件放在‘/home/yuanjun’目录下) apr http://mirror.bjtu.edu.cn/apache/apr/apr-1.4.6.tar.gz apr-util ...
- CentOS6.5下安装apache2.2和PHP 5.5.28
CentOS6.5下安装apache2.2 1. 准备程序 :httpd-2.2.27.tar.gz 下载地址:http://httpd.apache.org/download.cgi#apache2 ...
- CentOS6.5下安装Apache2.4+PHP7
CentOS6.5下安装Apache2.4+PHP7 http://blog.csdn.net/along602/article/details/42695779 http://www.th7.cn/ ...
随机推荐
- width:100%和width:auto区别
在div父元素是body时 1.先看没有width限制的div <div style="border:1px solid red; margin-left:50px; margin-r ...
- pig概述
pig概述pig是一个用于并行计算的高级数据流语言和执行框架:类sql.文件处理框架:有一套和sql类似的执行语句,处理的对象是HDFS上文件.Pig的数据处理语言是数据流方式的,一步一步的进行处理: ...
- serializers 序列化器里面进行 校验等
一.第一版(一般不用) # 声明序列化器from rest_framework import serializersfrom djangoDome.models import Book class P ...
- [Flutter] TextField 中只允许输入合法的小数
的Flutter的TextField中,我们可以通过设置inputFormatters来过滤和限制输入的内容. 下面是一个自定义的 TextInputFormatter,可以限制用户只能输入有效的整数 ...
- Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/co
转自:https://www.xuebuyuan.com/934357.html 需要引入standard.jar和jstl.jar 正确添加即可
- VB6 创建控制台应用程序
' 功能:为VB程序创建一个consolewindow.Private Declare Function AllocConsole Lib "kernel32" () As Lon ...
- Spring Colud 学习
转自: http://blog.csdn.net/forezp/article/details/70148833#t0
- AS3 在不规则区域内拖动
原理: 1.确保拖动对象在鼠标点上,如果不确定会出现瞬间移动的感觉 2.确保触碰到非通行区域,跳回到没触碰的点 源码: import flash.events.MouseEvent; import f ...
- eclipse 乱码
svn乱码: 教你解决Eclipse中SVN比较乱码问题 workspace->utf-8设置后成功! console乱码: 项目右键 : run as configuration 设置com ...
- python常见异常提示
PEP8 expected 2 blank lines, found 1 定义方法时,出现期望是2个空白行,但是实际检测到是1个.方法与上面内容间隔期望为两个换行符 PEP8 This diction ...