`
lz1130
  • 浏览: 403093 次
  • 性别: 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

    Win安装svn+Apache+viewvc 内有图片,可供参考,是不是你想要的结果, 可以通过HTTP 查看你的板本库的信息和文件信息,还有文件的板本号,有的功能我也不会用,也不太知道,自己参悟吧,都在学习中.

    架设svn+viewvc 服务器

    架设 svn + viewvc 服务器所需软件: 1).ActivePython-2.5.4.4-win32-x86 (注意是:2.5版本) 2).CollabNetSubversion-server-1.6.6-4.win32 (1.6版本) 3).TortoiseSVN-1.6.6.17493-win32-svn-1.6.6 (SVN海龟客户端) 4...

    viewvc subversion

    ViewVC -- Viewing the content of CVS/SVN repositories with a Webbrowser. Please read the file INSTALL for more information. And see windows/README for more information on running ViewVC on Microsoft...

    viewvc-1.1.15

    viewvc-1.1.15 开源软件版本管理的常用工具,例如kettle等开源软件的版本管理就是使用viewvc

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

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

    viewvc-源码.rar

    viewvc-源码.rar

    ViewVC (formerly ViewCVS)-开源

    ViewVC是基于Web的版本控制存储库浏览器,当前支持CVS和Subversion存储库。 现在,项目开发位于https://github.com/viewvc/viewvc/。

    ViewVC 1.2-dev

    图形化显示Subversion和CVS代码的工具。

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

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

    CollabNetSubversion-server-1.7.2-1-Win32.exe [服务器端+客户端]

    从 CollabNetSubversion-server-1.7.1-3-Win32 版本的安装包开始, ViewVC 已经从安装包剔除, 照 CollabNet 的意思, 他们是想用户下载他们又臭又长的 CollabNet Subversion Edge. 安装包内增加了 svn-python2.7 C:\...

    Win安装svn+trac

    安装Apache+Subversion+ViewVC学习笔记

    JIRA modified files linked to ViewVC-开源

    这是一个 Greasemonkey 插件,用于将 JIRA 中修改文件字段中的文件链接到 ViewVC

    everything_33lc文件快速搜索.zip

    everything 文件快速搜索工具,可以自动建立索引 加快搜索速度

    CollabNetSubversion-server-1.7.1-3-Win32.exe [服务器端+客户端]

    从这个版本的安装包开始, ViewVC 已经从安装包剔除, 照 CollabNet 的意思, 他们是想用户下载他们又臭又长的 CollabNet Subversion Edge. 安装包内增加了 svn-python2.7 C:\Program Files\CollabNet\Subversion ...

    CollabNetSubversion-server-1.7.3-1-Win32.exe [服务器端+客户端]

    从 CollabNetSubversion-server-1.7.1-3-Win32 版本的安装包开始, ViewVC 已经从安装包剔除, 照 CollabNet 的意思, 他们是想用户下载他们又臭又长的 CollabNet Subversion Edge. 安装包内增加了 svn-python2.7 C:\...

    CollabNetSubversion.exe-part1

    目前该公司推出了一个全新的项目 Subversion Edge,该项目并不是一个新开发的项目,而是将 Subversion 、Apache HTTP Server 以及 ViewVC 三个项目打包在一起,简化用户安装和管理配置版本控制系统的过程。

    CollabNetSubversionEdge-5.2.4_setup-x86_64_0_0.7z

    一个版本控制软件的集成包,集成了包括 Subversion、Apache 和 ViewVC 三个软件。安装简单、管理方便

    CollabNetSubversion-server-1.7.1-1-Win32 [服务器端+客户端]

    安装包内已经包含了当前最新版本的 Apache 2.2.21 (Win32) Server version: Apache/2.2.21 (Win32) Server built: Oct 21 2011 01:58:26 也包含了 ViewVC 1.0.12 C:\Program Files\CollabNet\Subversion Server&gt;...

    ActivePython 2.5(win32)

    Python的版本可以到官方网站http://www.python.org上下载最新的版本,而且是开源的,但是我感觉那个idle不怎么好用。ActivePython的PythonWin却很好用,只是它不开源。建议初学者使用ActivePython的PythonWin,因为...

    php.ini中的php-5.2.0配置指令详解

     http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?view=co   ; http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?view=co   ;;;;;;;;;;;; ;; 语法 ;; ;;;;;;;;;;;; ; 该文件的语法非常简单...

Global site tag (gtag.js) - Google Analytics