linux下apache安装2.2.9

本文记录了Apache服务器从源码编译安装的过程,包括配置、编译、安装等步骤,并解决了安装过程中遇到的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1013 2017-02-10 16:12:14 rpm -qa|grep openssl
1014 2017-02-10 16:13:00 ping 171.33.128.1
1015 2017-02-10 16:13:58 rpm -e openssl --nodeps
1016 2017-02-10 16:14:04 echo $?
1017 2017-02-10 16:14:33 ./config
1018 2017-02-10 16:14:42 echo $?
1019 2017-02-10 16:14:51 history

make && make install

tar -czf apache2017210.tar apache

root@WN4DPITSTAP0001:/usr/local>rm -rf apache

root@WN4DPITSTAP0001:/etc>tar -czf httpd.conf.tar.gz httpd

root@WN4DPITSTAP0001:/etc>rm -rf httpd

cd /home/ap/webuser/soft

cd httpd-2.2.9

 


1015 2017-02-10 16:13:58 rpm -e openssl --nodeps

1017 2017-02-10 16:14:33 ./config            /usr/local/ssl  默认

make &&make install

 

1068 2017-02-10 16:41:16 rpm -e apr-util-ldap-1.3.9-3.el6_0.1.x86_64 --nodeps

1069 2017-02-10 16:41:32 rpm -e apr-util-1.3.9-3.el6_0.1.x86_64 --nodeps
1071 2017-02-10 16:41:51 tar -xvf apr-1.5.2.tar.gz
1072 2017-02-10 16:41:59 tar -xvf apr-util-1.5.4.tar.gz
1074 2017-02-10 16:42:17 cd apr-1.5.2


./configure --prefix=/usr/local/apr

make &&make install


./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make &&make install

./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-ssl=/usr/local/ssl --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=event


make &&make install

 

 

server/mpm/experimental/event/.libs/libevent.a(event.o): In function `child_main':
/home/ap/webuser/soft/httpd-2.2.9/server/mpm/experimental/event/event.c:1453: undefined reference to `ap_thread_s
tacksize'collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9'
make: *** [all-recursive] Error 1


./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-ssl=/usr/local/ssl --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most

make && make install
make[1]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9'
Making install in srclib
make[1]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/srclib'
Making install in pcre
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/srclib/pcre'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/srclib/pcre'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/srclib/pcre'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/srclib/pcre'
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/srclib'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/srclib'
make[1]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/srclib'
Making install in os
make[1]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/os'
Making install in unix
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/os/unix'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/os/unix'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/os/unix'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/os/unix'
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/os'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/os'
make[1]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/os'
Making install in server
make[1]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/server'
Making install in mpm
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm'
Making install in prefork
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm/prefork'
make[4]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm/prefork'
make[4]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm/prefork'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm/prefork'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/server/mpm'
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/server'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/server'
make[1]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/server'
Making install in modules
make[1]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules'
Making install in aaa
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/aaa'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/aaa'
mkdir /usr/local/apache
mkdir /usr/local/apache/modules
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/aaa'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/aaa'
Making install in database
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/database'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/database'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/database'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/database'
Making install in debug
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/debug'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/debug'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/debug'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/debug'
Making install in filters
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/filters'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/filters'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/filters'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/filters'
Making install in loggers
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/loggers'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/loggers'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/loggers'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/loggers'
Making install in metadata
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/metadata'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/metadata'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/metadata'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/metadata'
Making install in ssl
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/ssl'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/ssl'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/ssl'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/ssl'
Making install in http
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/http'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/http'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/http'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/http'
Making install in dav/main
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/main'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/main'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/main'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/main'
Making install in generators
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/generators'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/generators'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/generators'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/generators'
Making install in dav/fs
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/fs'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/fs'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/fs'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/dav/fs'
Making install in mappers
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/mappers'
make[3]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules/mappers'
make[3]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/mappers'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules/mappers'
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/modules'
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules'
make[1]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/modules'
Making install in support
make[1]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/support'
make[2]: Entering directory `/home/ap/webuser/soft/httpd-2.2.9/support'
mkdir /usr/local/apache/bin
libtool: install: invalid libtool wrapper script `htpasswd'
libtool: install: invalid libtool wrapper script `htdigest'
libtool: install: invalid libtool wrapper script `rotatelogs'
libtool: install: invalid libtool wrapper script `logresolve'
libtool: install: invalid libtool wrapper script `ab'
libtool: install: invalid libtool wrapper script `checkgid'
libtool: install: invalid libtool wrapper script `htdbm'
libtool: install: invalid libtool wrapper script `htcacheclean'
libtool: install: invalid libtool wrapper script `httxt2dbm'
make[2]: *** [program-install] Error 1
make[2]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/support'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/ap/webuser/soft/httpd-2.2.9/support'
make: *** [install-recursive] Error 1

userdel -r apache

./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-ssl=/usr/local/ssl --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most

root@WN4DPITSTAP0001:/usr/local>ls
apache_20170120.tar.gz apr bin games lib libexec share ssl
apache2017210.tar apr-util etc include lib64 sbin src
root@WN4DPITSTAP0001:/usr/local>tar -czf ssl.tar.gz ssl
root@WN4DPITSTAP0001:/usr/local>ls
apache_20170120.tar.gz apr bin games lib libexec share ssl
apache2017210.tar apr-util etc include lib64 sbin src ssl.tar.gz
root@WN4DPITSTAP0001:/usr/local>rm -rf ssl
root@WN4DPITSTAP0001:/usr/local>ls
apache_20170120.tar.gz apr bin games lib libexec share ssl.tar.gz
apache2017210.tar apr-util etc include lib64 sbin src

./config --prefix=/usr/local/openssl
make &&make install

cd /home/ap/webuser/soft/httpd-2.2.9

./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-ssl=/usr/local/openssl --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=event


make[3]: Nothing to be done for `local-all'.

 

 

make clean                清编译残余文件

 
./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-ssl=/usr/local/openssl --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=event

make&&make install

 

安装完成

转载于:https://www.cnblogs.com/zhaizhaozhidi/p/6397363.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值