Apache安装

7 篇文章 1 订阅
1 篇文章 0 订阅

前些日子安装Apache看着网上文档的的都没有成功。自豪自己记录一下自己步骤 以后可能会用

先装的2.3他没有自带apr依赖(也可能我没找到。。失败

退一步 改装 Apache2.2 完全按照官网的说明就可一乐。。

默认的安装位置:

/usr/local/apache2.

编译安装apr/apr-util依赖

# Force the use of thebundled apr/apr-util
./configure --with-included-apr

 

# Build and install apr 1.2
cd srclib/apr
./configure --prefix=/usr/local/apr-httpd/
make
make install

# Build and install apr-util 1.2
cd ../apr-util
./configure --prefix=/usr/local/apr-util-httpd/--with-apr=/usr/local/apr-httpd/
make
make install

# Configure httpd
cd ../../
./configure --with-apr=/usr/local/apr-httpd/--with-apr-util=/usr/local/apr-util-httpd/

 

 解压 Apache

$ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar

 

$ CC="pgcc"CFLAGS="-O2" \
./configure --prefix=/sw/pkg/apache \     prefix后面的是安装位置 想要的。。
--enable-rewrite=shared \
--enable-speling=shared

 

$ make

 

$ make install

 启动Apache

$ PREFIX/bin/apachectl-k start

 停止Apache

$ PREFIX/bin/apachectl-k stop




官网:

Download $ lynx http://httpd.apache.org/download.cgi
Extract $ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NN
Configure $ ./configure --prefix=PREFIX
Compile $ make
Install $ make install
Customize $ vi PREFIX/conf/httpd.conf
Test PREFIX/bin/apachectl -k start



一直以为Apache的默认的文件目录就在Apache\htdocs下面

今天又一个同事装结果不灵了。。。改conf下面的配置文件也不行。最后该的是etc下面的httpt下面的配置文件。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值