linux下安装httpd

wgethttp://archive.apache.org/dist/apr/apr-1.5.1.tar.gz

wgethttp://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz

wgethttp://jaist.dl.sourceforge.net/project/pcre/pcre/8.36/pcre-8.36.tar.gz

wgethttp://mirrors.cnnic.cn/apache/httpd/httpd-2.4.10.tar.bz2

tar-zxfapr-1.5.1.tar.gz

cdapr-1.5.1

./configure--prefix=/app/soft/apr

make&&makeinstall

tar-zxfapr-util-1.5.4.tar.gz

cdapr-util-1.5.4

./configure--prefix=/app/soft/apr-util-with-apr=/app/soft/apr/

make&&makeinstall

tar-zxfpcre-8.36.tar.gz

cdpcre-8.36

./configure--prefix=/app/soft/pcre

make&&makeinstall

tar-xfhttpd-2.4.10.tar.bz2

cdhttpd-2.4.10

./configure--prefix=/app/soft/httpd--with-apr=/app/soft/apr--with-apr-util=/app/soft/apr-util/--with-pcre=/app/soft/pcre

make&&makeinstall

修改/app/soft/httpd/conf/httpd.conf

#主站点的网页存储位置。

DocumentRoot"/app/maganize_uploadfiles"

<Directory"/app/maganize_uploadfiles">

启动httpd

cd/etc/init.d

ln-s/app/soft/httpd/bin/apachectl

/etc/init.d/apachectlstart

相关推荐