安装fedora的tomcat和svn

安装fedora的tomcat和svn
  用fedora的live cd,安装fedora 7。安装好后,先安装jdk1.5和apache的httpd,再用Package Mangent管理工具安装php,tomcat,svn。安装完成后,进行配置。进入命令行:
$ rpm -q httpd
httpd-2.2.4-4
$ rpm -ql httpd-2.2.4-4
/etc/httpd
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/conf.d/README
/etc/httpd/conf.d/proxy_ajp.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf/httpd.conf
$ vi /etc/httpd/conf/httpd.conf
找到Include conf.d/*.conf,保证这行前面没有#号
$ vi /etc/httpd/conf.d/proxy_ajp.conf
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
ProxyPass /hotel ajp://localhost:8009/ajhotel
第一行是加载ajp模块,第二行是httpd和tomcat的映射
$ rpm -q tomcat5
tomcat5-5.5.26-1jpp.2.fc7
$ rpm -ql tomcat5-5.5.26-1jpp.2.fc7
/etc/logrotate.d/tomcat5
/etc/rc.d/init.d/tomcat5
/etc/sysconfig/tomcat5
/etc/tomcat5
/etc/tomcat5/Catalina
/etc/tomcat5/Catalina/localhost
/etc/tomcat5/catalina.policy
/etc/tomcat5/catalina.properties
/etc/tomcat5/context.xml
/etc/tomcat5/logging.properties
/etc/tomcat5/server-minimal.xml
/etc/tomcat5/server.xml
/etc/tomcat5/tomcat-users.xml
/etc/tomcat5/tomcat5.conf
/etc/tomcat5/uriworkermap.properties
/etc/tomcat5/web.xml
/etc/tomcat5/workers.properties
/etc/tomcat5/workers.properties.minimal
从/etc/tomcat5/server.xml可以看出
    <Connector port="8009"
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
的端口是8009
这样httpd下就可以用http://ip/hotel访问tomcat的应用http://ip:8080/ajhotel

svn配置:
同样在/etc/httpd/conf.d下,有文件subversion.conf
$ vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /repos>
  DAV svn
  SVNPath /home/hotel/svn/repos
  AuthType Basic
  AuthName "svn repos"
  AuthUserFile /home/hotel/svn/passwd
  Require valid-user
</Location>
可以配置简单的svn,然后转到root
$ su - root
# chown -R apache:apache /home/hotel/svn/repos
避免权限的问题。
用http://ip/repos访问svn


你可能感兴趣的:(安装fedora的tomcat和svn)