tar xvzf httpd-2.2.20.tar.gz
cd httpd-2.2.20
./configure --enable-dav --enable-so --prefix=/usr/local/apache2/
make
make install
4.启动apache服务
/usr/local/apache2/bin/apachectl start
//打开浏览器http://localhost/如果有测试页"It works!"出现则证明已经安装成功。
注:httpd服务的默认端口是80,此处若发现80端口已被占用,在httpd.conf文件中修改listen 80为listen 81(或其他未被占用的端口),修改完成后要重启apache服务。
*************************************************开始***********************************************************
执行命令的时候出现:
error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
解决办法如下:
1.在/etc/ld.so.conf中加一行/usr/local/lib,
2.然后运行/sbin/ldconfig
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
解决办法非常简单:
#vim /usr/local/apache2/conf/httpd.conf (在这里/web/apahce是我安装apache的目录,你默认安装的话应该是/usr/local/apache2/icons)
找到#ServerName www.example.com:80 把#去掉,再重启apache即可没事了。
*************************************************结束***********************************************************
安装Subversion
tar xvzf Subversion-1.6.17.tar.gz
cd Subversion-1.6.17
./configure --with-apxs=/usr/local/apache2/bin/apxs --prefix=/usr/local/subversion --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-ssl --with-zlib --enable-maintainer-mode --enable-dav --enable-so
make
make install
****************************************************开始*******************************************************
* configure可能存在的问题及解决方法
1. configure: error: could not find library containing RSA_new
o yum install openssl-devel
2. configure: error: no XML parser was found: expat or libxml 2.x required
o yum install expat-devel
3. configure: error: --with-zlib requires an argument.
o 去掉此选项。
* httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: /usr/local/apache2/modules/mod_dav_svn.so: undefined symbol: dav_register_provider
o make sure you have your apache compiled with the dav options:
--enable-dav --enable-dav-fs --enable-dav-lock
在make的时候,.configure之后,进行make,出现如下问题
/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status
make: *** [subversion/svn/svn] Error 1
应该是缺少-lexpat库文件。
解决方法:
yum install expat expat-devel
安装了之后,svn的make就过了
***************************************************结束*******************************************************