{"id":772,"date":"2011-04-03T20:09:29","date_gmt":"2011-04-03T12:09:29","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=772"},"modified":"2023-04-28T09:50:32","modified_gmt":"2023-04-28T09:50:32","slug":"how-to-install-and-configure-viewvc-for-subversion-on-centos","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-and-configure-viewvc-for-subversion-on-centos\/","title":{"rendered":"How to Install and Configure ViewVC for Subversion on CentOS"},"content":{"rendered":"<p>Another alternative for subversion repositories web viewer is <a href=\"https:\/\/www.viewvc.org\/\" target=\"_blank\" rel=\"noopener\">ViewVC<\/a>. Just like <a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-websvn-for-subversion-on-centos\/\" target=\"_blank\" rel=\"noopener\">WebSVN<\/a>, viewvc having many useful features such as viewing subversion repositories, directories, to view change log listings and it can display specific versions of files as well as diffs between those versions. At the time of this post wrote, the most recent stable release of <a href=\"http:\/\/viewvc.tigris.org\/servlets\/ProjectDocumentList?folderID=6004\" target=\"_blank\" rel=\"noopener\">ViewVC<\/a> is release 1.1.10.<\/p>\n<p>Prerequisite :<br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-apache-httpd-web-server-on-linux\/\" target=\"_blank\" rel=\"noopener\">1. How to Install Apache Httpd Web Server on Linux<\/a><br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-subversion-1-6-16-on-centos-5-5-server\/\" target=\"_blank\" rel=\"noopener\">2. How to Install Subversion on CentOS 5.5 Server<\/a><\/p>\n<p>Steps to Install and Configure ViewVC.<br \/>\n1. Download <a href=\"http:\/\/viewvc.tigris.org\/servlets\/ProjectDocumentList?folderID=6004\" target=\"_blank\" rel=\"noopener\">ViewVC stable release 1.1.10<\/a><br \/>\nYou can download using wget command on CentOS server as below:<\/p>\n<ol>\n<pre class=\"code\">\nwget http:\/\/viewvc.tigris.org\/files\/documents\/3330\/48879\/viewvc-1.1.10.tar.gz\n<\/pre>\n<\/ol>\n<ol>\n<pre class=\"code\">[root@server ~]# cd \/tmp\n[root@server tmp]# wget http:\/\/viewvc.tigris.org\/files\/documents\/3330\/48879\/viewvc-1.1.10.tar.gz\n--2011-04-03 19:09:06--  http:\/\/viewvc.tigris.org\/files\/documents\/3330\/48879\/viewvc-1.1.10.tar.gz\nResolving viewvc.tigris.org... 204.16.104.146\nConnecting to viewvc.tigris.org|204.16.104.146|:80... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 602017 (588K) [application\/x-gzip]\nSaving to: `viewvc-1.1.10.tar.gz'\n\n100%[===========================================&gt;] 602,017     20.0K\/s   in 29s\n\n2011-04-03 19:09:38 (20.3 KB\/s) - `viewvc-1.1.10.tar.gz' saved [602017\/602017]\n<\/pre>\n<\/ol>\n<p>2. Extract and unzip the viewvc-1.1.10.tar.gz using below command:<\/p>\n<ol>\n<pre class=\"code\">\n[root@server tmp]# tar xvfz viewvc-1.1.10.tar.gz\n<\/pre>\n<\/ol>\n<p>3. Go to viewvc-1.1.10 directory and start the installation:<\/p>\n<ol>\n<pre class=\"code\">\n.\/viewvc-install\n<\/pre>\n<\/ol>\n<ol>\n<pre class=\"code\">[root@server tmp]# cd viewvc-1.1.10\n[root@server viewvc-1.1.10]# .\/viewvc-install\nThis is the ViewVC 1.1.10 installer.\n\nIt will allow you to choose the install path for ViewVC.  You will now\nbe asked some installation questions.  Defaults are given in square brackets.\nJust hit [Enter] if a default is okay.\n\nInstallation path [\/usr\/local\/viewvc-1.1.10]:\n\nDESTDIR path (generally only used by package maintainers) []:\n-\n-\n-\n-\n-\n-\n-\nViewVC file installation complete.\n\nConsult the INSTALL document for detailed information on completing the\ninstallation and configuration of ViewVC on your system.  Here's a brief\noverview of the remaining steps:\n\n  1) Edit the \/usr\/local\/viewvc-1.1.10\/viewvc.conf file.\n\n  2) Either configure an existing web server to run\n     \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/viewvc.cgi.\n\n     Or, copy \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/viewvc.cgi to an\n     already-configured cgi-bin directory.\n\n     Or, use the standalone server provided by this distribution at\n     \/usr\/local\/viewvc-1.1.10\/bin\/standalone.py.\n<\/pre>\n<\/ol>\n<p>3. Edit \/viewvc.conf for your specific<br \/>\nconfiguration.  In particular, examine the following configuration options:<\/p>\n<ol>\n<pre class=\"code\">      svn_roots (for Subversion)\n      root_parents (for CVS or Subversion)\n      default_root\n      root_as_url_component\n      rcs_dir\n      mime_types_files\n<\/pre>\n<\/ol>\n<ol>\n<pre class=\"code\">[root@server ~]# vi \/usr\/local\/viewvc-1.1.10\/viewvc.conf\n<\/pre>\n<\/ol>\n<ol>\n<pre class=\"code\">\n    147 ## Example:\n    148 ## root_parents = \/opt\/svn: svn,\n    149 ##                \/opt\/cvs: cvs\n    150 ##\n    151 root_parents =\n    152\n<\/pre>\n<\/ol>\n<p>Uncomment line 151 and define the subversion root repositories.<\/p>\n<ol>\n<pre class=\"code\">\nroot_parents = \/svn\/repos: svn,\n<\/pre>\n<\/ol>\n<p>4. Locate your Apache configuration file. Typical locations are:<\/p>\n<ol>\n<pre class=\"code\">\/etc\/httpd\/httpd.conf,\n\/etc\/httpd\/conf\/httpd.conf, and\n\/etc\/apache\/httpd.conf.\n<\/pre>\n<\/ol>\n<p>Depending on how Apache was installed. Configure Apache to expose ViewVC to users at the URL of your choice. Edit the apache web server config file as below:<\/p>\n<ol>\n<pre class=\"code\">[root@server ~]# vi \/etc\/httpd\/conf\/httpd.conf\n<\/pre>\n<\/ol>\n<ol>\n<pre class=\"code\">565 ScriptAlias \/viewvc \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/viewvc.cgi\n566 ScriptAlias \/query \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/query.cgi\n<\/pre>\n<\/ol>\n<p>or if without line number, it will be as below:<\/p>\n<ol>\n<pre class=\"code\">ScriptAlias \/viewvc \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/viewvc.cgi\nScriptAlias \/query \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/query.cgi\n<\/pre>\n<\/ol>\n<ol>\n<pre class=\"code\"># ScriptAlias: This controls which directories contain server scripts.\n# ScriptAliases are essentially the same as Aliases, except that\n# documents in the realname directory are treated as applications and\n# run by the server when requested rather than as documents sent to the client.\n# The same rules about trailing \"\/\" apply to ScriptAlias directives as to\n# Alias.\n#\nScriptAlias \/cgi-bin\/ \"\/var\/www\/cgi-bin\/\"\nScriptAlias \/viewvc \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/viewvc.cgi\nScriptAlias \/query \/usr\/local\/viewvc-1.1.10\/bin\/cgi\/query.cgi\n#\n# \"\/var\/www\/cgi-bin\" should be changed to whatever your ScriptAliased\n# CGI directory exists, if you have that configured.\n<\/pre>\n<\/ol>\n<p>5. Save the httpd.conf then restart the apache server.<br \/>\n6. Test your http:\/\/servername\/viewvc. If everything properly configured, you should see the page that lists your repositories.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another alternative for subversion repositories web viewer is ViewVC. Just like WebSVN, viewvc having many useful features such as viewing subversion repositories, directories, to view change log listings and it&#8230;<\/p>\n","protected":false},"author":6,"featured_media":349,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1060],"tags":[1536,1811],"class_list":["post-772","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-subversion","tag-linux","tag-subversion"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=772"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/772\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/349"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}