Linux+php+apache+oracle环境搭建之CentOS下安装Apache

CentOS系统安装的是Basic Server。安装apache之前所必须的缺少的组件比较多,下面罗列下本次需要安装的组件

apache - aprapache - apr-utilperl - pcreapache

官网下载Apache,下载地址:http://httpd.apache.org/download.cgi

下载稳定版本httpd-2.4.9.tar.gz,上传到服务器/usr/packages目录下。

安装Apache:

# tar -xvzf httpd-2.4.9.tar.gz

# cd httpd-2.4.9

# ./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite

检查编译环境报错:

checking for APR... no
configure: error: APR not found . Please read the documentation.

原因缺少APR(Apache Portable Runtime),需要下载apr与apr-util。

下载地址:http://apr.apache.org/download.cgi

下载apr-1.5.1.tar.gz、apr-util-1.5.3.tar.gz

安装apr:

# tar -xvzf apr-1.5.1.tar.gz
# cd apr-1.5.1
# .configure
# make
# make install

安装apr-util:

# tar -xvzf apr-util-1.5.3.tar.gz
# cd apr-util-1.5.3
# .configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
# make
# make install

再次检查编译环境报错:

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

缺少pcre,下载地址:http://sourceforge.net/projects/pcre/

安装pcre:

# unzip -o pcre-8.35
# cd pcre-8.35
# ./configure --prefix=/usr/local/pcre
# make
# make install

再次检查编译环境时加上参数:

--with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre

没有报错:

# make
# make install

安装完毕。

这是我第一次安装,缺少关联关系的组件,下次安装直接先安装组件,最后安装apache,这样会顺畅些吧。

启动Apache

# cp /usr/local/apache/bin/apachectl /sbin/
# apachectl start

配置随系统启动时启动Apache服务

# vi /etc/rc.d/rc.local

在最后一行加上: /sbin/apachectl start

修改Apache默认站点目录

修改/usr/local/apache/conf/httpd.conf文件

改成

执行命令
# apachectl restart

Apache的配置文件再续~~

(0)

相关推荐

  • Linux+php+apache+oracle环境搭建之CentOS下安装Oracle数据库

    这里推荐使用OTK脚本安装Oracle,会大大提高安装Oracle的成功系数. Description oraToolKit is the Swiss Army Knife for Oracle. Standards and well designed tools help DBA's mastering Oracle 10g / 11g throughout the whole lifecycle. OTK runs on Linux, zLinux, Solaris, AIX, HP-UX

  • centos 6.5下安装oracle 11gR2与Oracle自动启动的配置

    注意:以下命令使用 root 用户操作 安装依赖包 主要思路为配置 oracle yum 仓库,直接使用 yum 命令来安装依赖包,避免手工逐个的安装依赖包. 配置 yum 仓库以下载 orcale 依赖包 注意:这里是CentOS 6.X 的 oracle 依赖仓库,其他版本不同的. 导入 GPG Keys wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-orac

  • centos 6.5 oracle开机自启动的环境配置详解

    centos 6.5 oracle开机自启动的环境配置详解 环境:centos 6.5 + Oracle 11g 自启动之前问题 虚拟机里的oracle环境,每次重启完系统,用plsql developer连接,先是报错: 无TNS监听程序 解决方法是切换到系统的oracle用户,执行lsnrctl start,但是执行之前,因为ORACLE_HOME环境变量没有生效,还要是环境变量文件生效,步骤如下: [oracle@localhost ~]$ source .bash_profile [or

  • CentOS6.2上安装Oracle10g报ins_emdb.mk错误处理方法

    在CentOS6.2操作系统上,安装Oracle10g时,报如下错误: 根据提示查看日志,并没发现帮助信息,如下所示: 复制代码 代码如下: [root@hyl ~]# tail -f /u01/app/oracle/oraInventory/logs/installActions2014-09-20_02-43-00PM.log INFO: make[1]: Leaving directory `/u01/app/oracle/product/10.2.0/db_1/sysman/lib' I

  • Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP

    首先需要安装下面几个安装包,可以在CD-ROM数据源里找到以下安装包yum安装 yum install perl* freetype libpng* libxm2 libxm2-devel curl curl-devel libjpeg* 手动下载安装 jpegsrc.v8c.tar libmcrypt-2.5.8.tar.gz 安装 jpegsrc # tar -xvzf jpegsrc.v8c.tar # cd jpeg-8c # ./configure --prefix=/usr/loca

  • CentOS系统上安装配置Oracle数据库的详细教程

    一.基本配置   1.硬盘剩余空间:10G以上     虽然Oracle 10g的安装文件只有800多MB,但安装后的oracle+oraInventory目录会用差不多4G空间,再加上安装时Oracle生成的临时文件(/tmp目录需要至少400MB). 2.内存1.5G以上     官方文档说512M内存也可以安装.为了避免不必要的麻烦,请把内存加多一些. 3.Swap交换区2G 二.CenOS6 上安装Oracle 10g 1.准备安装 在安装Oracle之前执行以下命令: yum inst

  • CentOS命令行下装oracle 12c的方法(命令行模式安装)

    实验环境: 1:安装oracle所需软件包 Oracle 12c所需的rpm包如下: binutils-2.20.51.0.2-5.11.el6 (x86_64) compat-libcap1-1.10-1 (x86_64) compat-libstdc++-33-3.2.3-69.el6 (x86_64) compat-libstdc++-33-3.2.3-69.el6 (i686) gcc-4.4.4-13.el6 (x86_64) gcc-c++-4.4.4-13.el6 (x86_64)

  • CentOS下PHP安装Oracle扩展

    环境 System:CentOS 6 PHP: 5.3.28 下载Oracle客户端 32位系统 64位系统 复制代码 代码如下: oracle-instantclient-sqlplus-10.2.0.4-1.x86_64.rpm oracle-instantclient-jdbc-10.2.0.4-1.x86_64.rpm oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm oracle-instantclient-basic-10.2.0.4-

  • CentOS 6.3下安装部署Oracle服务器图文教程

    一.安装环境: Linux系统:  CentOS 6.3 64位 Oracle:       Oracle11gR2 64位 二.系统要求: 1.Linux安装Oracle系统要求 系统要求 说明 内存 必须高于1G的物理内存 交换空间 一般为内存的2倍,例如:1G的内存可以设置swap 分区为3G大小 硬盘 5G以上 三.系统核心参数配置: 在Root用户下执行以下步骤: 1)修改用户的SHELL的限制,修改/etc/security/limits.conf文件 输入命令:vi /etc/se

  • CentOS 6.4下安装Oracle 11gR2详细步骤(多图)

    安装前须知: 内存(RAM)的最小要求是 1GB,建议 2GB 及以上.虚拟内存 swap 建议:内存为 1GB~2GB 时建议swap大小为内存大小的 1.5 倍:内存为 2GB~16GB 时建议swap大小为内存的大小:内存超过 16GB 时swap保持16GB.要求临时文件目录,如 /tmp 的磁盘空间至少 1GB.磁盘空间要求:企业版为4.35GB的安装空间和1.7GB以上的数据文件空间:标准版为4.22GB的安装空间和1.5GB以上的数据文件空间.需要 X window 图形界面.需要

随机推荐