这是我第一次尝试在我的盒子中本地安装Apache HTTP服务器作为普通用户(非root用户).
我已经下载了Apache 2.4.1版本的Apache HTTP服务器[http://httpd.apache.org/download.cgi].但是,当我尝试在我的框中本地构建和安装时,我收到以下错误:
httpd/httpd-2.4.1 1059> ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring Apache Portable Runtime library ...
checking for APR... no
configure: error: APR not found. Please read the documentation.
Run Code Online (Sandbox Code Playgroud)
我不确定它正在寻找什么依赖 - 我的意思是下载包不包含它?我需要做什么来构建/部署Apache HTTP服务器?
提前致谢.
Ole*_*eev 127
当它告诉你Please read documentation这意味着你应该去阅读Apache文档(http://httpd.apache.org/docs/2.4/install.html),它告诉你
从Apache APR下载APR和APR-Util的最新版本,将它们解压缩到./srclib/apr和./srclib/apr-util(确保域名没有版本号;例如,APR分发必须在./srclib/apr/下
然后做
./configure --with-included-apr
Run Code Online (Sandbox Code Playgroud)
小智 38
对于Ubuntu 11.10,这个选项似乎运行良好:
# APR
wget http://mirrors.axint.net/apache//apr/apr-1.4.6.tar.gz
tar -xvzf apr-1.4.6.tar.gz
cd apr-1.4.6/
./configure
make
make install
cd ..
# APR Utils
wget http://mirrors.axint.net/apache//apr/apr-util-1.4.1.tar.gz
tar -xvzf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --with-apr=/usr/local/apr
make
make install
cd ..
# Apache
wget http://apache.petsads.us//httpd/httpd-2.4.1.tar.gz
tar -xvzf httpd-2.4.1.tar.gz
cd httpd-2.4.1
./configure --enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache --enable-deflate --enable-expires --enable-headers --enable-usertrack --enable-ssl --enable-cgi --enable-vhost-alias --enable-rewrite --enable-so --with-apr=/usr/local/apr/
make
make install
cd ..
Run Code Online (Sandbox Code Playgroud)
您可以在下面找到更多相关信息
资料来源:VaporCreations.com
shr*_*gon 24
如果您有Debian/Ubuntu,您可以:
apt-get install libapr1-dev libaprutil1-dev
Run Code Online (Sandbox Code Playgroud)
然后 ./configure
完成
小智 20
以下是我如何在非root用户上安装apache-httpd的步骤:
重要提示:不要忘记将默认端口从80更改为其他内容,例如8080,这对非root用户尤为重要.(如何?打开httpd.conf - >搜索"Listen 80" - >将其更改为"Listen 8080".
就是这样,现在打开浏览器输入"localhost:8080 ",它应该显示"It works!".