下载:httpd-2.0.63.tar.gz
wget下来
tar -zxvf httpd-2.0.63.tar.gz
#cd httpd-2.0.63.
编译apache2
# ./configure --enable-dav --enable-so --enable-maintainer-mode
# make
# make install
安装svn
subversion-1.4.2.tar.gz
subversion-deps-1.4.2.tar.bz2
#tar -zxvf subversion-1.4.2.tar.gz
#tar -xvjf subversion-deps-1.4.2.tar.bz2
#cd subversion-1.4.2
#./configure --with-apxs=/usr/local/apache2/bin/apxs
#make
#make install
生成 Apache 启动文件
#rpm -q httpd
package httpd is not installed //???????????
#/etc/init.d/httpd start
no this file
#/usr/local/apache2/bin/apachectl -k restart
OK
请问怎么做成HTTPD自启动,还有SVN,编译时总出错,不过,还能够运行
#svn --version
svn, version 1.4.2 (r22196)
compiled Aug 15 2008, 09:06:13
Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository access (RA) modules are available:
* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
另外查找资料说此方法可做成HTTPD自启动,但我按此方法做的时候,提示
chkconfig --level 35 httpd on
service httpd does not support chkconfig
什么问题?谢谢!另外做软链接,听说 要做7个,有没有简单的方法!
# cd /etc/rc.d/init.d
# sed 's/sbin/atd/local/apache2/bin/httpd/g' atd > httpd
# sed 's/atd/httpd/g' httpd > /tmp/txt
# sed 's/at daemon/httpd daemon/g' /tmp/txt > httpd
# rm /tmp/txt
# chmod 755 httpd
# chkconfig --level 345 httpd on
# chkconfig --level 0126 httpd off
启动并测试Apache服务器
# /etc/rc.d/init.d/httpd start
如果出现:
Starting httpd daemon: [ OK ]
# cd /etc/rc.d/init.d
# sed 's/sbin/atd/local/apache2/bin/httpd/g' atd > httpd
# sed 's/atd/httpd/g' httpd > /tmp/txt
# sed 's/at daemon/httpd daemon/g' /tmp/txt > httpd
# rm /tmp/txt
# chmod 755 httpd
# chkconfig --level 345 httpd on
# chkconfig --level 0126 httpd off
sed和atd不会用,后面的/g什么意思?
生成文件做什么用的?能否说下他的意思!
为什么的chkconfig --level 35 httpd on
service httpd does not support chkconfig不支持?
查了下文档,说要在httpd中加入
#description:http server
#chkconfig: 235 98 98
说明:
Apache安装路径为:/usr/local/apache
Linux的启动级别为5,版本为Linux AS4
Apache安装完后,发现Apache无法自动启动,查看/etc/rc.d/rc5.d/下,应该没有S打头,httpd结尾的链接文件。
1、将apachectl文件拷贝到/etc/rc.d/init.d 中,然后在/etc/rc.d/rc5.d/下加入链接即可。
命令如下:
cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd //如果有其他的版本的Apache存在,也可以直接覆盖掉
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S85httpd //建立链接(85的意义后面介绍)
此时Apache就可以自动启动了。
2、运行chkconfig --list,发现没有linux服务列表中httpd,通过chkconfig --add httpd来添加,但是提示:httpd服务不支持 chkconfig。需要编辑/etc/rc.d/init.d/httpd,添加以下注释信息:
# chkconfig: 345 85 15
# descrīption: Apache
第一行3个数字参数意义分别为:哪些Linux级别需要启动httpd(3,4,5);启动序号(85);关闭序号(15)。
保存后执行:chkconfig --add httpd,成功添加。
在rc3.d、rc4.d、rc5.d路径中会出现S85httpd的链接文件,其他运行级别路径中会出现K61httpd的链接文件。
3、运行chkconfig --list,httpd在其中。
