apache root权限的获取,apacheroot权限


参考:http://www.weixiaodeyu.com/blog/apache2-4-4-bianyi-anzhuang-cuowu-jiejue-banfa.html



1.下载地址 ( httpd-2.4.4 不能搭配php PHP 5.4.45 需要下载2.2.22版本   php -v  see the version )  : http://www.apache.org/dist/httpd/




2.安装php  apt-get install php5




4.在编译apache前在源码包的include/http_config.h文件中头部中自行添加如下语句 
#ifndef BIG_SECURITY_HOLE 
#define BIG_SECURITY_HOLE 
#endif 后./configure,make,makeinstall后即可。






2. 缺失 APR APR-util
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.


解决办法:
将APR和APR-util源码下载,解压放到httpd-2.4.4/srclib里面,并去除版本号
cp -r apr-1.4.6 httpd-2.4.4/srclib/apr
cp -r apr-util-1.4.1 httpd-2.4.4/srclib/apr-util


2. 缺少pcre
configure: error: pcre-config for libpcre not found. PCRE is required and available from


解决办法:apt-get install pcre-dev 


3. mod_ssl
checking whether to enable mod_ssl… configure: error: mod_ssl has been requested but can not be built due to prerequisite failures


解决办法:apt-get  install openssl-devel


4.添加支持php
修改DirectoryIndex index.html 为DirectoryIndex index.html index.php

并添加 

 LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

AddType application/x-httpd-php .php



 使用2.2.22无需下载相关包 


root@beaglebone:/usr/local/apache2/htdocs# /usr/local/apache2/bin/apachectl  -v
Server version: Apache/2.2.22 (Unix)
Server built:   Mar  2 2015 05:14:08
root@beaglebone:/usr/local/apache2/htdocs# /usr/local/apache2/bin/apachectl  start

root      3126     1  0 21:32 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
root      3128  3126  0 21:33 ?        00:00:07 /usr/local/apache2/bin/httpd -k start
root      3130  3126  0 21:33 ?        00:00:08 /usr/local/apache2/bin/httpd -k start
root      3131  3126  0 21:33 ?        00:00:06 /usr/local/apache2/bin/httpd -k start
root      3144  3126  0 21:33 ?        00:00:09 /usr/local/apache2/bin/httpd -k start
root      3145  3126  0 21:33 ?        00:00:12 /usr/local/apache2/bin/httpd -k start
root      3146  3126  0 21:33 ?        00:00:11 /usr/local/apache2/bin/httpd -k start
root      3147  3126  0 21:33 ?        00:00:12 /usr/local/apache2/bin/httpd -k start
root      3351  3126  0 21:40 ?        00:00:09 /usr/local/apache2/bin/httpd -k start
root      3354  3126  0 21:41 ?        00:00:06 /usr/local/apache2/bin/httpd -k start


all ok   running in root~~

相关内容

    暂无相关文章