SUSE gcc4.1.2环境安装Apachev2.2.22

本文介绍了在SUSE环境下,如何使用gcc4.1.2编译并安装Apache v2.2.22。步骤包括下载Apache源码,配置编译选项,编译安装,以及启动和验证Apache服务。同时,文章还提到了Apache编译后的相关二进制工具及其用途。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

2014-12-17 wcdj


 

SUSE gcc4.1.2环境安装Apachev2.2.22

 

下载最新的apache, http://httpd.apache.org/download.cgi

 

Apache HTTP Server2.2.22 (httpd)

tar  zxvf  httpd-2.2.22.tar.gz

mkdir -p/data/home/gerryyang/install/apache

./configure

--prefix=/data/home/gerryyang/install/apache

--enable-shared=max

--enable-module=rewrite

--enable-module=so

PS:

关于configure配置选项说明:

http://apache.jz123.cn/programs/configure.html#installationdirectories

http://httpd.apache.org/docs/2.0/programs/configure.html

 

 

make

make install

cd PREFIX/bin/

./apachectl -kstart root权限)

 

验证apache是否启动

(1) ps aux | grephttpd

(2) netstat –untlp |grep 80

(3) lsof -i tcp:80

(4) 在浏览器中输入apache的地址看能否访问http://172.27.198.179/

 

Apache编译完成后,会生成多个二进制文件

 

ab

Apache压力测试工具。

apxs

安装Apache模块的工具。

apachectl

Apache服务的控制工具。用它来执行启动、暂停、重启等操作。

htpasswd

管理用户权限的工具(Basic Auth)

htdigest

管理用户权限的工具(Digest Auth)

htcacheclean

清除Apache缓存。

rotatelogs

切换日志工具。

httpd

Apache服务的主程序,通常通过apachectl来调用httpd,而不是直接调用。

 

查看Apache加载了那些模块

apachectl -DDUMP_MODULES

 

Apachectl是最为常用的Apache工具,用于控制启动、停止、重启Apache

Apachectl命令行参数

参数

说明

start

启动Apache

stop

停止Apache

restart

重启Apache

graceful-stop

优雅的停止Apache

graceful

优雅的重启Apache

configtest

检查Apache配置

-h

查看Apachectl帮助(不要用--help

-M

查看Apache加载的模块信息

 

 

参考

[1] http://httpd.apache.org/docs/current/install.html

[2] http://apache.jz123.cn/install.html

Compiling andInstalling

[3] http://www.berlinix.com/apache_install.html

[4] apache学习笔记() -安装

http://sishuok.com/forum/blogPost/list/5269.html

[5] apache学习笔记() -目录结构与基本配置

http://sishuok.com/forum/blogPost/list/5271.html

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值