网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > 服务器环境搭建
User Name
Password
 
FAQ Members List Calendar Cheap Glasses Mark Forums Read

服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   IP: 153.99.80.237
Old 2016-05-22, 08:54 AM
Kelleys Island Kelleys Island is offline
初级会员
 
Join Date: 2010-01-07
Posts: 1
Kelleys Island 现在声名狼藉
Default CentOS 6.3下Apache2.4.4的安装

安装环境:CentOS6.3

一、下载安装包

wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.4.4.tar.bz2 //apache2.4.4

wget http://mirror.bjtu.edu.cn/apache/apr/apr-1.4.6.tar.bz2 //apr

wget http://mirror.bjtu.edu.cn/apache/apr/apr-util-1.5.1.tar.bz2 //apr-util

wget http://sourceforge.net/projects/pcre/files/pcre/8.32/pcre-8.32.tar.bz2/download //pcre

APR(Apache portable Run-time libraries,Apache可移植运行库)主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库

PCRE用于提供编译环境的函数库

其实apache有APR绑定的安装包,我没用



二、准备安装环境

解包

tar -jxvf apr-util-1.5.1.tar.bz2
tar -jxvf apr-1.4.6.tar.bz2
tar -jxvf httpd-2.4.4.tar.bz2
tar -zxvf pcre-8.32.tar.gz

1.安装C++

yum install gcc-c++ //安装C++编译环境

2.安装 APR

cd apr-1.4.6/

./configure --prefix=/usr/local/apr-1.4.6 //配置

make //编译

make test //测试

make install //安装

3.安装APR-UTIL

cd ../apr-util-1.5.1/

./configure --prefix=/usr/local/apr-util-1.5.1

./configure --prefix=/usr/local/apr-util-1.5.1 --with-apr=/usr/local/apr-1.4.6/

make

make test

make install

4.安装 PCRE

cd ../pcre-8.32/

./configure

make

make check

make install

5.安装apache

cd ../httpd-2.4.4/

./configure --prefix=/usr/local/apache --enable-mods-shared=all --with-apr=/usr/local/apr-1.4.6/ --with-apr-util=/usr/local/apr-util-1.5.1/ //--prefix指定安装路径,--enable-mods-shared启用所有支持的动态加载模块,--with-apr指定APR路径,--with-apr-util指定APR-util路径

make

make install

/usr/local/apache/bin/apachectl start //启动apache



三、注册apache为系统服务

cp /usr/local/apache/apachectl /etc/init.d/httpd //把apache启动脚本复制到系统脚本目录下

vi /etc/init.d/httpd在第一行下插入# chkconfig: 2345 85 35 //修改脚本用于在运行界别2345下自启动,并指定启动脚本序号为85,关闭脚本序号为35

chkconfig --add httpd //注册为自启动服务

四、修改防火墙设置

vi /etc/sysconfig/iptables //编辑iptables配置文件

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT //在适当位置插入

service iptables restart //重启防火墙服务
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 6.4安装Apache+MySQL+PHP的图文教程 Chesapeake 服务器环境搭建 0 2016-05-19 05:09 PM
centOS 卸载之前的 php-mysql-apache Alderton MySQL 0 2016-05-19 08:59 AM
Centos 安装笔记 Kaelyn Linux 0 2015-07-02 12:00 PM
Centos 使用wifi Kaelyn Linux 0 2015-07-02 11:58 AM
centos 6.3安装问题总结 topvip Linux 0 2014-03-04 07:38 AM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 01:20 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.