`
lz1130
  • 浏览: 406274 次
  • 性别: Icon_minigender_1
  • 来自: 福建
社区版块
存档分类
最新评论

viewvc安装配置

阅读更多
系统:ubuntu 8.04
在这里我认为你已经安装了Subversion和apache,可以看这里参见subversion apache 安装配置

Viewvc安装

1. viewvc需要的环境
    For CVS Support: 

      * Python 1.5.2 or later
          (http://www.python.org/)
      * RCS, Revision Control System
          (http://www.cs.purdue.edu/homes/trinkle/RCS/)
      * GNU-diff to replace diff implementations without the -u option
          (http://www.gnu.org/software/diffutils/diffutils.html)
      * read-only, physical access to a CVS repository
          (See http://www.cvshome.org/ for more information)

    For Subversion Support:

      * Python 2.0 or later
          (http://www.python.org/)
      * Subversion, Version Control System, 1.3.1 or later
          (binary installation and Python bindings)
          (http://subversion.tigris.org/)

安装所需包:
apt-get install python-subversion
apt-get install python-pygments


2. 安装viewvc
tar zxvf viewvc-1.1.2.tar.gz
cd viewvc-1.1.2
./viewvc-install

两次回车安装到/usr/local/viewvc-1.1.2
Installation path [/usr/local/viewvc-1.1.2]: 
DESTDIR path (generally only used by package maintainers) []:


3. 配置(viewvc.conf)
vi /usr/local/viewvc-1.1.2/viewvc.conf

简单配置只需更改root_parents
enable_syntax_coloration = 1 #语法高亮
allowed_views = annotate, diff, markup, roots, co, tar #允许的视图

Edit <VIEWVC_INSTALLATION_DIRECTORY>/viewvc.conf for your specific 
   configuration.  In particular, examine the following configuration options:

      cvs_roots (for CVS)
      svn_roots (for Subversion)
      root_parents (for CVS or Subversion)#所有svn版本库的根目录
      default_root
      root_as_url_component
      rcs_dir
      mime_types_files

   There are some other options that are usually nice to change. See
   viewvc.conf for more information.  ViewVC provides a working,
   default look. However, if you want to customize the look of ViewVC
   then edit the files in <VIEWVC_INSTALLATION_DIRECTORY>/templates.
   You need knowledge about HTML to edit the templates.


4. http访问

a) 整合apache(需要mod_cgi)
假设你已经建立了一个虚拟机配置文件
vi /etc/apache2/sites-enabled/svn.sends.cc.conf

</VirtualHost>前加入
##############
    ScriptAlias /viewvc /usr/local/viewvc-1.1.2/bin/cgi/viewvc.cgi
    ScriptAlias /query /usr/local/viewvc-1.1.2/bin/cgi/query.cgi
        <Directory "/usr/local/viewvc-1.1.2/bin/cgi">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
############## 

/etc/init.d/apache2 restart


或拷贝viewvc.cgi到apache的cgi-bin目录下通过http://10.3.37.110/cgi-bin/viewvc.cgi访问
假设我的cgi-bin目录指向/usr/lib/cgi-bin/
cp /usr/local/viewvc-1.1.2/bin/cgi/* /usr/lib/cgi-bin/
/etc/init.d/apache2 restart


或用apache的mod_python。把/usr/local/viewvc-1.1.2/bin/mod_python/*拷贝到你需要的地方访问viewvc.py。因为有个.htaccess文件,请注意“AllowOverride All”设置。

有access control的apache配置(推荐)
假设你已经建立了一个虚拟机配置文件
vi /etc/apache2/sites-enabled/svn.sends.cc.conf

</VirtualHost>前加入
##############
    ScriptAlias /viewvc /usr/local/viewvc-1.1.2/bin/cgi/viewvc.cgi
    ScriptAlias /query /usr/local/viewvc-1.1.2/bin/cgi/query.cgi
        <Directory "/usr/local/viewvc-1.1.2/bin/cgi">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
      <Location /viewvc>
#        AllowOverride None
        AuthUserFile /etc/apache2/dav_svn.passwd
        AuthName "Viewvc Of Sendslab"
        AuthType Basic
        require valid-user
      </Location>
##############

创建访问用户
htpasswd -m /etc/apache2/dav_svn.passwd test


b) 用viewvc自带standalone.py提供http访问
/usr/local/viewvc-1.1.2/bin/standalone.py -h 10.3.37.110 -d -c /usr/local/viewvc-1.1.2/viewvc.conf

standalone.py帮助
root@soft:~# /usr/local/viewvc-1.1.2/bin/standalone.py --help
ERROR: option --help not recognized

Usage: standalone.py [OPTIONS]

Run a simple, standalone HTTP server configured to serve up ViewVC
requests.

Options:

  --config-file=PATH (-c)    Use the file at PATH as the ViewVC configuration
                             file.  If not specified, ViewVC will try to use
                             the configuration file in its installation tree;
                             otherwise, built-in default values are used.
                             (Not valid in GUI mode.)
                             
  --daemon (-d)              Background the server process.
  
  --host=HOST (-h)           Start the server listening on HOST.  You need
                             to provide the hostname if you want to
                             access the standalone server from a remote
                             machine.  [default: localhost]

  --port=PORT (-p)           Start the server on the given PORT.
                             [default: 49152]

  --repository=PATH (-r)     Serve up the Subversion or CVS repository located
                             at PATH.  This option may be used more than once.

  --script-alias=PATH (-s)   Specify the ScriptAlias, the artificial path
                             location that at which ViewVC appears to be
                             located.  For example, if your ScriptAlias is
                             "cgi-bin/viewvc", then ViewVC will be accessible
                             at "http://localhost:49152/cgi-bin/viewvc".
                             [default: viewvc]
  
  --gui (-g)                 Pop up a graphical interface for serving and
                             testing ViewVC.  NOTE: this requires a valid
                             X11 display connection.


更多详细设置参考:INSTALL和http://viewvc.org/

1
1
分享到:
评论
2 楼 lz1130 2011-12-09  
forcer521 写道
这个是什么问题呢,启动了访问报错:

引用

An Exception Has Occurred
Python Traceback

Traceback (most recent call last):
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 4463, in main
    request.run_viewvc()
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 394, in run_viewvc
    self.view_func(self)
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 1920, in view_roots
    allroots = list_roots(request)
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 4306, in list_roots
    cfg.options.svn_config_dir)
  File &quot;D:\www\viewvc-1.1.11\lib\vclib\svn\__init__.py&quot;, line 66, in SubversionRepository
    import svn_repos
  File &quot;D:\www\viewvc-1.1.11\lib\vclib\svn\svn_repos.py&quot;, line 25, in &lt;module&gt;
    from svn import fs, repos, core, client, delta
ImportError: No module named svn






ImportError: No module named svn

没安装python的svn模块吧。


1 楼 forcer521 2011-11-01  
这个是什么问题呢,启动了访问报错:

引用

An Exception Has Occurred
Python Traceback

Traceback (most recent call last):
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 4463, in main
    request.run_viewvc()
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 394, in run_viewvc
    self.view_func(self)
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 1920, in view_roots
    allroots = list_roots(request)
  File &quot;D:\www\viewvc-1.1.11\lib\viewvc.py&quot;, line 4306, in list_roots
    cfg.options.svn_config_dir)
  File &quot;D:\www\viewvc-1.1.11\lib\vclib\svn\__init__.py&quot;, line 66, in SubversionRepository
    import svn_repos
  File &quot;D:\www\viewvc-1.1.11\lib\vclib\svn\svn_repos.py&quot;, line 25, in &lt;module&gt;
    from svn import fs, repos, core, client, delta
ImportError: No module named svn


相关推荐

    Win安装svn Apache viewvc

    7. **安装ViewVC**:下载并安装ViewVC,同样配置其指向Subversion仓库的路径。ViewVC需要Apache支持CGI或FastCGI,因此可能需要进一步配置Apache。 8. **测试系统**:完成所有配置后,重启Apache服务,通过浏览器...

    架设svn+viewvc 服务器

    - 在安装过程中,可以选择同时安装Apache Web服务器,并配置端口号为80,这样可以支持通过HTTP协议访问SVN仓库。 3. **安装TortoiseSVN-1.6.6.17493-win32-svn-1.6.6**: - 下载并运行安装程序。 - 选择合适的...

    viewvc-1.1.15

    - **安装过程**:安装ViewVC需要先安装其依赖的版本控制系统(如SVN或CVS),然后下载并配置ViewVC源码。 - **数据库配置**:ViewVC可与多种数据库系统配合,如SQLite、MySQL或PostgreSQL,选择适合的数据库进行...

    viewvc-源码.rar

    部署ViewVC涉及安装Python环境、设置Web服务器和配置ViewVC本身。通常,需要配置包括版本库路径、URL映射、权限控制等在内的多个参数。 7. **安全与性能** 在生产环境中,确保ViewVC的安全性和性能至关重要。这...

    ViewVC 1.2-dev

    安装完成后,通过配置文件指定版本库位置,并启动ViewVC服务,用户即可通过浏览器访问和管理版本库。 总之,ViewVC是Subversion和CVS用户的重要辅助工具,它提供了一个直观的图形界面,简化了版本控制操作,提升了...

    ViewVC (formerly ViewCVS)-开源

    - **配置文件**:配置`viewvc.conf`以连接你的CVS或Subversion仓库,设置URL、认证方式等。 - **数据库准备**:ViewVC可能需要一个数据库来存储元数据,如用户信息和访问记录,根据需求配置数据库连接。 - **Web...

    viewvc:ViewVC是CVS和Subversion版本控制存储库的浏览器界面

    ViewVC-版本控制浏览器界面ViewVC是CVS和Subversion版本控制存储库的浏览器界面。... 它可以显示文件的特定版本以及这些版本之间的差异。... 可单独配置的虚拟主机支持。 Tarball生成。 通过CVS的标记/分支。 通过修

    Docker-ViewVC:使用源代码存储库浏览器 ViewVC 创建 Docker 容器

    做什么/配置: Dockerfile 期望当前目录中的文件“subversion_conf.tar”并将其解压缩到 www-data users 目录中。 此存档应包含一个子目录“.subversion”,其中包含保存的身份验证数据以连接到 SVN 存储库。 您...

    PHP.ini配置中文解释

    - 对于Unix平台下的PHP安装,建议保持此设置为`Off`,尤其是在使用Apache 1.3的情况下。 ### PHP核心配置 #### [PHP-Core-DateTime] 与日期时间相关的配置: - `date.default_latitude`: 默认纬度设置,用于`...

    collabnet subversion配置文档

    在这个配置文档中,我们将重点介绍如何在Windows Server 2008 x86平台上安装和配置CollabNet Subversion Edge。 首先,你需要从CollabNet的官方网站下载Subversion Edge,根据你的操作系统选择合适的版本。对于...

    Win安装svn+trac

    【安装Apache+Subversion+ViewVC学习笔记】 在IT领域,特别是版本控制系统中,Subversion(简称SVN)是一个广泛使用的工具,它允许团队协作并管理代码和其他文件的版本。Trac是一个开源的项目管理和问题跟踪系统,...

    最详细最实用LinuxFedora系统SVNServer环境搭建过程开发平台[汇编].pdf

    最后,通过浏览器输入服务器的IP地址,可以访问并查看通过ViewVC配置的SVN仓库。 通过以上步骤,一个完整的Linux Fedora上的SVN服务器环境就被搭建起来了。用户可以通过Web界面进行代码的版本控制、查看历史记录和...

    Nagios的安装部署和与Cacti的整合

    - 安装并配置NDOUtils,以便将Nagios数据写入MySQL。 ```bash #wget http://sourceforge.net/projects/ndo2db/files/ndo2db-1.2.3.tar.gz/download #tar xzf ndo2db-1.2.3.tar.gz #cd ndo2db-1.2.3 #./...

    php.ini-文件配置详解.doc

    配置指令遵循以下格式:`directive = value`。指令名是大小写敏感的,值可以是字符串、数字、PHP常量、INI常量或表达式。布尔值用On和Off表示,空字符串可以表示为`foo =`或`foo = none`。 此外,还可以在httpd....

    CollabNetSubversionEdge-5.2.4_setup-x86_64_0_0.7z

    安装过程中,用户可以根据需求自定义配置,例如选择安装路径、设置服务端口、配置SSL证书等。 总的来说,CollabNet Subversion Edge为团队提供了一个全面的版本控制系统,它简化了Subversion的部署和管理,同时提供...

    Windows环境下Collabnet_Subversion_Edge与Trac集成安装方法

    Collabnet Subversion Edge 是一款集成了 Apache 和 ViewVC 的 SVN 服务器解决方案,具有安装简便、管理便捷的特点。它不仅内置了必要的组件,还提供了图形化的管理界面,极大地简化了配置过程。 #### 三、Trac介绍...

    最完整PHP.INI中文版

    对于Unix平台下安装为Apache 1.3模块的PHP来说,默认应设置为`Off`。 - `engine`: 控制PHP模块是否被激活,默认为`On`。 - `last_modified`: 控制是否将`Last-Modified`响应头发送到客户端,表示文件的最后修改时间...

    SVN-用户手册 教你轻松操作SVN

    本用户手册将引导您完成SVN的基础操作,包括安装、升级、配置以及使用svnserve作为服务器。 1. **下载与安装** 要开始使用SVN,首先需要从官方源(例如http://www.collab.net)下载CollabNet Subversion Server。...

Global site tag (gtag.js) - Google Analytics