西西软件园多重安全检测下载网站、值得信赖的软件下载站!
软件
软件
文章
搜索

首页编程开发java → Ubuntu中安装Apache2的最佳方法和代码实现

Ubuntu中安装Apache2的最佳方法和代码实现

相关软件相关文章发表评论 来源:本站整理时间:2010/8/20 11:17:00字体大小:A-A+

作者:佚名点击:1255次评论:0次标签: Ubuntu Apache

PPS for Ubuntu1.0.0.1 官方安装版
  • 类型:网络电视大小:1.5M语言:中文 评分:6.6
  • 标签:
立即下载

下载httpd-2.2.15.tar.gz,使用tar zxvf httpd-2.2.15.tar.gz解压。如解压后的路径为:/software/httpd-2.2.15。
首先安装apr apr-util (不推荐) Java代码
# cd /software/httpd-2.2.15/srclib/apr
# ./configure --prefix=/usr/local/apr
# make
# make install

#cd /software/httpd-2.2.15/srclib/apr-util
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install

# cd /software/httpd-2.2.15/srclib/apr
# ./configure --prefix=/usr/local/apr
# make
# make install

#cd /software/httpd-2.2.15/srclib/apr-util
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install 另一种安装apr apr-util方法:(推荐)
Java代码
到官网http://apr.apache.org/
下载apr-1.4.2.tar.gz 和 apr-util-1.3.9.tar.gz
tar zxvf apr-1.4.2.tar.gz
cd apr-1.4.2
./configure --prefix=/usr/local/apr
make
make install

tar zxvf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

到官网http://apr.apache.org/
下载apr-1.4.2.tar.gz 和 apr-util-1.3.9.tar.gz
tar zxvf apr-1.4.2.tar.gz
cd apr-1.4.2
./configure --prefix=/usr/local/apr
make
make install

tar zxvf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
安装apache
Java代码
#cd /software/httpd-2.2.15
#./configure --prefix=/usr/local/apache --enable-module=so --enable-mods-shared=all --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-htpasswd --enable-static-htdigest --enable-static-rotatelogs --enable-static-logresolve --enable-static-htdbm --enable-static-ab --enable-static-checkgid --with-mpm=worker --enable-ssl --enable-deflate --with-included-apr --enable-so --enable-rewrite=share --enable-proxy=share --enable-proxy-ajp=share --enable-dav=share --enable-dav-fs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util
#make
#make install

#cd /software/httpd-2.2.15
#./configure --prefix=/usr/local/apache --enable-module=so --enable-mods-shared=all --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-htpasswd --enable-static-htdigest --enable-static-rotatelogs --enable-static-logresolve --enable-static-htdbm --enable-static-ab --enable-static-checkgid --with-mpm=worker --enable-ssl --enable-deflate --with-included-apr --enable-so --enable-rewrite=share --enable-proxy=share --enable-proxy-ajp=share --enable-dav=share --enable-dav-fs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util
#make
#make install
如果出现以下错误,请检查系统中是否已经安装zlib 
 Java代码
checking for zlib location... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

checking for zlib location... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures 安装zlib如下:
Java代码
#tar -xvzf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure
#make
# make install

#tar -xvzf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure
#make
# make install 如果出现以下错误,请检查是否已经安装OpenSSL

 Java代码
checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected

checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected 请到http://www.openssl.org/source/下载最新版本。

安装openssl如下:
 Java代码
1、解压软件:
# tar xvfz openssl-0.9.6b.tar.gz
2、安装
# cd openssl-0.9.6b
# ./config
# make
# make test
# make install

1、解压软件:
# tar xvfz openssl-0.9.6b.tar.gz
2、安装
# cd openssl-0.9.6b
# ./config
# make
# make test
# make install如果问题还是无法解决,请输入以下命令去完成:

 Java代码
apt-get install openssl libssl-dev

apt-get install openssl libssl-dev
如果出现以下错误,请检查是否已经安装libtool

Java代码
libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apr-util/lib
make[2]: *** [install] 错误 1
make[2]:正在离开目录 `/usr/java/httpd-2.2.15/srclib/apr-util'
make[1]: *** [install-recursive] 错误 1
make[1]:正在离开目录 `/usr/java/httpd-2.2.15/srclib'
make: *** [install-recursive] 错误 1

libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apr-util/lib
make[2]: *** [install] 错误 1
make[2]:正在离开目录 `/usr/java/httpd-2.2.15/srclib/apr-util'
make[1]: *** [install-recursive] 错误 1
make[1]:正在离开目录 `/usr/java/httpd-2.2.15/srclib'
make: *** [install-recursive] 错误 1 在http://ftp.gnu.org/gnu/libtool/libtool-2.2.8.tar.gz下载。

安装libtool如下:
Java代码
tar zxvf libtool-2.2.8.tar.gz
cd libtool-2.2.8
./configure
make
make install

    相关评论

    阅读本文后您有什么感想? 已有人给出评价!

    • 8 喜欢喜欢
    • 3 顶
    • 1 难过难过
    • 5 囧
    • 3 围观围观
    • 2 无聊无聊

    热门评论

    最新评论

    发表评论 查看所有评论(0)

    昵称:
    表情: 高兴 可 汗 我不要 害羞 好 下下下 送花 屎 亲亲
    字数: 0/500 (您的评论需要经过审核才能显示)